xingyy
xingyy 10 months ago
parent 6bed08fdd2
commit 93fe808801

@ -1,27 +1,30 @@
<template> <template>
<tm-app> <tm-app>
<tm-sheet> <tm-tabbar :showSafe="true" :autoSelect="false" v-model:active="acc">
<tm-text label="点击中间+按钮可以体验异步加载动态效果."></tm-text>
</tm-sheet>
<tm-tabbar :autoSelect="false" v-model:active="acc">
<tm-tabbar-item <tm-tabbar-item
@click="acc = 0" @click="acc = 0"
activeColor="orange" activeColor="#EB783C"
count="HOT"
open-type="reLaunch" open-type="reLaunch"
text="选票" text="选票"
icon="tmicon-collection-fill"
></tm-tabbar-item> >
<tm-tabbar-item @click="acc = 1" activeColor="orange" text="我的" icon="tmicon-cog-fill"></tm-tabbar-item> <div style="width: 52rpx;height: 52rpx">
<img v-if="acc===0" style="width: 100%;height: 100%" src="../../static/zu618.png" alt="">
<img v-else style="width: 100%;height: 100%" src="../../static/zu759@3x (1).png" alt="">
</div>
</tm-tabbar-item>
<tm-tabbar-item @click="acc = 1" activeColor="#EB783C" text="我的" >
<div style="width: 52rpx;height: 52rpx">
<img v-if="acc===0" style="width: 100%;height: 100%" src="../../static/zu628.png" alt="">
<img v-else style="width: 100%;height: 100%" src="../../static/zu-44.png" alt="">
</div>
</tm-tabbar-item>
</tm-tabbar> </tm-tabbar>
</tm-app> </tm-app>
</template> </template>
<script setup> <script setup>
import {ref, getCurrentInstance, defineProps, defineEmits, watch,} from 'vue' import {ref, getCurrentInstance, defineProps, defineEmits, watch,} from 'vue'
import { onShow, onLoad } from '@dcloudio/uni-app'
import tmApp from '@/tmui/components/tm-app/tm-app.vue' import tmApp from '@/tmui/components/tm-app/tm-app.vue'
import tmSheet from '@/tmui/components/tm-sheet/tm-sheet.vue'
import tmText from '@/tmui/components/tm-text/tm-text.vue'
import tmTabbar from '@/tmui/components/tm-tabbar/tm-tabbar.vue' import tmTabbar from '@/tmui/components/tm-tabbar/tm-tabbar.vue'
import tmTabbarItem from '@/tmui/components/tm-tabbar-item/tm-tabbar-item.vue' import tmTabbarItem from '@/tmui/components/tm-tabbar-item/tm-tabbar-item.vue'
const emit=defineEmits(['update:modelValue']) const emit=defineEmits(['update:modelValue'])
@ -29,12 +32,4 @@ const acc = ref(1)
watch(acc,()=>{ watch(acc,()=>{
emit('update:modelValue',acc.value) emit('update:modelValue',acc.value)
}) })
function laodingfun(val) {
return new Promise((res) => {
setTimeout(function () {
console.log('选中了:', val)
res(true)
}, 2000)
})
}
</script> </script>

@ -0,0 +1,15 @@
<template>
<div>home
<div>
<tm-button>13212121212</tm-button>
</div>
homehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehome
homehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehomehome
</div>
</template>
<script setup>
</script>
<style scoped>
</style>

@ -1,11 +1,14 @@
<template> <template>
<div> <div>
<home v-if="acc===0"/>
<mine v-if="acc===1"/>
<self-tabbar v-model="acc"></self-tabbar> <self-tabbar v-model="acc"></self-tabbar>
</div> </div>
</template> </template>
<script setup> <script setup>
import home from '../home/index.vue'
import mine from '../mine/index.vue'
import selfTabbar from '../../components/self-tabbar/index.vue' import selfTabbar from '../../components/self-tabbar/index.vue'
import {ref} from "vue"; import {ref} from "vue";
const acc=ref(0) const acc=ref(0)
</script> </script>

@ -0,0 +1,12 @@
<template>
<div>mineminemineminemineminemineminemineminemineminemineminemineminemineminemineminemineminemine</div>
</template>
<script setup>
</script>
<style scoped>
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Loading…
Cancel
Save