style: 购物车、我的页面ui

This commit is contained in:
2026-06-02 14:00:17 +08:00
parent 1fe0a6351c
commit f83068a3fc
12 changed files with 274 additions and 82 deletions
+13 -3
View File
@@ -9,7 +9,7 @@
left: sticky ? 'auto' : '0px',
top: state.fixed && !bottom ? (noNav ? val : val + sys_navBar) + 'px' : 'auto',
bottom: insetHeight,
zIndex: index + sheep.$zIndex.navbar,
zIndex: resolvedZIndex,
},
!alway ? { opacity: state.opacityVal } : '',
]"
@@ -17,7 +17,7 @@
<view
class="ui-fixed-content"
@tap="toTop"
:style="[{ zIndex: index + sheep.$zIndex.navbar }]"
:style="[{ zIndex: resolvedZIndex }]"
>
<slot></slot>
<view
@@ -31,7 +31,7 @@
class="ui-fixed-bg"
:class="[ui, bg]"
:style="[
{ zIndex: index + sheep.$zIndex.navbar - 1 },
{ zIndex: resolvedZIndex - 1 },
bgStyles,
opacity ? { opacity: state.opacityVal } : '',
]"
@@ -134,9 +134,19 @@
type: Boolean,
default: true,
},
zIndex: {
type: [Number, String],
default: null,
},
});
state.fixed = !unref(props.sticky);
const resolvedZIndex = computed(() => {
if (props.zIndex !== null && props.zIndex !== undefined && props.zIndex !== '') {
return Number(props.zIndex);
}
return unref(props.index) + sheep.$zIndex.navbar;
});
onPageScroll((e) => {
let top = e.scrollTop;
state.scrollTop = top;