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:
duanshuwen
2026-07-17 09:29:38 +08:00
parent 767ecb197b
commit b04e3a4613
5 changed files with 36 additions and 4 deletions

View File

@@ -2,7 +2,9 @@
<view class="aigc-topbar" :style="topbarStyle">
<view class="aigc-nav-row">
<view class="aigc-topbar-back" @tap="emit('back')">
<uni-icons class="aigc-back-icon" fontFamily="znicons" size="22" color="#172033">
<uni-icons v-if="leftAction === 'home'" class="aigc-back-icon is-home" type="home-filled" size="20"
color="#172033" />
<uni-icons v-else class="aigc-back-icon" fontFamily="znicons" size="22" color="#172033">
{{ zniconsMap["zn-nav-arrow-left"] }}
</uni-icons>
</view>
@@ -43,6 +45,11 @@ const props = defineProps({
type: Boolean,
default: true,
},
leftAction: {
type: String,
default: "back",
validator: (value) => ["back", "home"].includes(value),
},
});
const emit = defineEmits(["back", "history", "recharge"]);

View File

@@ -48,6 +48,10 @@
transform: translateX(-1px);
}
.aigc-back-icon.is-home {
transform: none;
}
.aigc-topbar-actions {
flex: 1 1 auto;
width: auto;