feat(aigc): add shared work top bar and back fixes
- add leftAction prop to AigcTopBar to switch between back arrow and home icon - pass source=sharedWork query param when reLaunching home from shared work page - update home page to detect shared work source, adjust top bar and back behavior - add CSS styling for home top bar icon - update root page back handler to exit WeChat mini program
This commit is contained in:
@@ -152,6 +152,17 @@ const hasBackListener = computed(() => {
|
||||
|
||||
// 处理返回事件
|
||||
const handleBack = () => {
|
||||
const pages = getCurrentPages();
|
||||
|
||||
if (pages.length <= 1) {
|
||||
// #ifdef MP-WEIXIN
|
||||
if (typeof wx !== "undefined" && typeof wx.exitMiniProgram === "function") {
|
||||
wx.exitMiniProgram();
|
||||
return;
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
|
||||
if (hasBackListener.value) {
|
||||
emit("back");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user