submit
This commit is contained in:
parent
6bed08fdd2
commit
93fe808801
@ -1,27 +1,30 @@
|
||||
<template>
|
||||
<tm-app>
|
||||
<tm-sheet>
|
||||
<tm-text label="点击中间+按钮可以体验异步加载动态效果."></tm-text>
|
||||
</tm-sheet>
|
||||
<tm-tabbar :autoSelect="false" v-model:active="acc">
|
||||
<tm-tabbar :showSafe="true" :autoSelect="false" v-model:active="acc">
|
||||
<tm-tabbar-item
|
||||
@click="acc = 0"
|
||||
activeColor="orange"
|
||||
count="HOT"
|
||||
activeColor="#EB783C"
|
||||
open-type="reLaunch"
|
||||
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-app>
|
||||
</template>
|
||||
<script setup>
|
||||
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 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 tmTabbarItem from '@/tmui/components/tm-tabbar-item/tm-tabbar-item.vue'
|
||||
const emit=defineEmits(['update:modelValue'])
|
||||
@ -29,12 +32,4 @@ const acc = ref(1)
|
||||
watch(acc,()=>{
|
||||
emit('update:modelValue',acc.value)
|
||||
})
|
||||
function laodingfun(val) {
|
||||
return new Promise((res) => {
|
||||
setTimeout(function () {
|
||||
console.log('选中了:', val)
|
||||
res(true)
|
||||
}, 2000)
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
15
src/pages/home/index.vue
Normal file
15
src/pages/home/index.vue
Normal file
@ -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>
|
||||
<div>
|
||||
<home v-if="acc===0"/>
|
||||
<mine v-if="acc===1"/>
|
||||
<self-tabbar v-model="acc"></self-tabbar>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import home from '../home/index.vue'
|
||||
import mine from '../mine/index.vue'
|
||||
import selfTabbar from '../../components/self-tabbar/index.vue'
|
||||
import {ref} from "vue";
|
||||
const acc=ref(0)
|
||||
|
||||
</script>
|
||||
|
12
src/pages/mine/index.vue
Normal file
12
src/pages/mine/index.vue
Normal file
@ -0,0 +1,12 @@
|
||||
<template>
|
||||
<div>mineminemineminemineminemineminemineminemineminemineminemineminemineminemineminemineminemine</div>
|
||||
</template>
|
||||
<script setup>
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
BIN
src/static/zu-44.png
Normal file
BIN
src/static/zu-44.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
src/static/zu618.png
Normal file
BIN
src/static/zu618.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
src/static/zu628.png
Normal file
BIN
src/static/zu628.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
BIN
src/static/zu759@3x (1).png
Normal file
BIN
src/static/zu759@3x (1).png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
|
||||
|
||||
<view>
|
||||
|
||||
|
||||
<view
|
||||
class="fixed l-0 b-0 flex tabbar"
|
||||
:style="{
|
||||
|
Loading…
Reference in New Issue
Block a user