mirror of
https://github.com/talktao/Vue3-Vite-Vant-TS-H5.git
synced 2025-04-06 03:57:55 +08:00
feat:底部tab栏数据调整
This commit is contained in:
parent
7966819513
commit
d17b14b0bc
@ -5,41 +5,20 @@ import { ref, reactive, toRefs } from 'vue'
|
||||
const useTabBar = () => {
|
||||
const state = reactive({
|
||||
tabBar: [
|
||||
{
|
||||
{
|
||||
title: '首页',
|
||||
to: {
|
||||
name: 'Home'
|
||||
},
|
||||
icon: 'home-o'
|
||||
},
|
||||
{
|
||||
title: '分类',
|
||||
to: {
|
||||
name: 'Category'
|
||||
},
|
||||
icon: 'apps-o'
|
||||
},
|
||||
{
|
||||
title: '福利票',
|
||||
to: {
|
||||
name:'Welfare'
|
||||
},
|
||||
icon: 'gift-o'
|
||||
},
|
||||
{
|
||||
title: '订单',
|
||||
to: {
|
||||
name:'Orders'
|
||||
},
|
||||
icon: 'orders-o'
|
||||
},
|
||||
{
|
||||
},
|
||||
{
|
||||
title: '我的',
|
||||
to: {
|
||||
name:'About'
|
||||
},
|
||||
icon: 'user-o'
|
||||
}
|
||||
}
|
||||
]
|
||||
})
|
||||
return toRefs(state)
|
||||
@ -47,7 +26,7 @@ const useTabBar = () => {
|
||||
const { tabBar } = useTabBar()
|
||||
|
||||
const handleChange = (value) => {
|
||||
console.log(value,'valueeeeeee');
|
||||
// console.log(value,'valueeeeeee');
|
||||
}
|
||||
|
||||
</script>
|
||||
@ -61,7 +40,7 @@ const handleChange = (value) => {
|
||||
<router-view v-else></router-view>
|
||||
</div>
|
||||
<div class="layout-footer">
|
||||
<!-- <TabBar :data="tabBar" @chang="handleChange"></TabBar> -->
|
||||
<TabBar :data="tabBar" @chang="handleChange"></TabBar>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
Loading…
x
Reference in New Issue
Block a user