计算购物车钱之前
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view>
|
||||
<Nav />
|
||||
<Nav v-if="store.scrollTop>=44" />
|
||||
<view class="content">
|
||||
</view>
|
||||
</view>
|
||||
@@ -15,7 +15,8 @@
|
||||
import {
|
||||
onLoad,
|
||||
onReady,
|
||||
onShow
|
||||
onShow,
|
||||
onPageScroll
|
||||
} from '@dcloudio/uni-app'
|
||||
import Nav from '@/components/CustomNavbar.vue'; //导航栏
|
||||
// pinia管理
|
||||
@@ -24,15 +25,23 @@
|
||||
} from '@/stores/navbarStore';
|
||||
const store = useNavbarStore();
|
||||
|
||||
// 大于44显示导航栏
|
||||
const navScroll = ref(false)
|
||||
|
||||
// 动态更新导航栏配置
|
||||
store.updateNavbarConfig({
|
||||
showBack: true, //左边返回键
|
||||
rightText: '', //右边文字
|
||||
showSearch: true, //true是标题其他事文字
|
||||
title: '我的页面',
|
||||
title: '',
|
||||
isTransparent: false,
|
||||
hasPlaceholder: false //是否要占位符
|
||||
});
|
||||
|
||||
//动态导航栏滑动距离
|
||||
onPageScroll((res) => {
|
||||
uni.$u.debounce(store.scrollTop = res.scrollTop, 500)
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user