mirror of
https://github.com/talktao/Vue3-Vite-Vant-TS-H5.git
synced 2025-08-16 01:29:51 +08:00
add:底部TabBar公共组件封装
This commit is contained in:
parent
3e99d73a82
commit
a7b83f5f63
@ -14,7 +14,7 @@ import { reactive, ref } from 'vue'
|
|||||||
}
|
}
|
||||||
|
|
||||||
const props = defineProps<tabProps>()
|
const props = defineProps<tabProps>()
|
||||||
console.log(props.data,'props.data');
|
console.log(props.data,'props.data');
|
||||||
|
|
||||||
|
|
||||||
const emit = defineEmits(['chang'])
|
const emit = defineEmits(['chang'])
|
||||||
@ -30,11 +30,11 @@ import { reactive, ref } from 'vue'
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<van-tabbar fixed route v-model="active" @change="onChange">
|
<van-tabbar fixed route v-model="active" @change="onChange">
|
||||||
<van-tabbar-item v-for="(item, index) in props.data" :to="item.to" :name="item.name" :key="index" :icon="item.icon">{{item.title}}</van-tabbar-item>
|
<van-tabbar-item v-for="(item, index) in props.data" :to="item.to" :name="item.name" :key="index" :icon="item.icon">{{item.title}}</van-tabbar-item>
|
||||||
</van-tabbar>
|
</van-tabbar>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user