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:
@@ -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"]);
|
||||
|
||||
@@ -48,6 +48,10 @@
|
||||
transform: translateX(-1px);
|
||||
}
|
||||
|
||||
.aigc-back-icon.is-home {
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.aigc-topbar-actions {
|
||||
flex: 1 1 auto;
|
||||
width: auto;
|
||||
|
||||
Reference in New Issue
Block a user