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 useTabBar = () => {
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
tabBar: [
|
tabBar: [
|
||||||
{
|
{
|
||||||
title: '首页',
|
title: '首页',
|
||||||
to: {
|
to: {
|
||||||
name: 'Home'
|
name: 'Home'
|
||||||
},
|
},
|
||||||
icon: 'home-o'
|
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: '我的',
|
title: '我的',
|
||||||
to: {
|
to: {
|
||||||
name:'About'
|
name:'About'
|
||||||
},
|
},
|
||||||
icon: 'user-o'
|
icon: 'user-o'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
return toRefs(state)
|
return toRefs(state)
|
||||||
@ -47,7 +26,7 @@ const useTabBar = () => {
|
|||||||
const { tabBar } = useTabBar()
|
const { tabBar } = useTabBar()
|
||||||
|
|
||||||
const handleChange = (value) => {
|
const handleChange = (value) => {
|
||||||
console.log(value,'valueeeeeee');
|
// console.log(value,'valueeeeeee');
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@ -61,7 +40,7 @@ const handleChange = (value) => {
|
|||||||
<router-view v-else></router-view>
|
<router-view v-else></router-view>
|
||||||
</div>
|
</div>
|
||||||
<div class="layout-footer">
|
<div class="layout-footer">
|
||||||
<!-- <TabBar :data="tabBar" @chang="handleChange"></TabBar> -->
|
<TabBar :data="tabBar" @chang="handleChange"></TabBar>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user