Files
pj_h5_cloud/src/pages/tabbar/tabSearch.vue
T
2025-05-12 10:08:43 +08:00

35 lines
783 B
Vue

<template>
<view class="flex-row h-100rpx bg-#f6f8fa px-10rpx py-10rpx rounded-16rpx">
<view class="w-50% flex-row-center color-#818898 font-size-28rpx! rounded-16rpx"
:style="{color: index == cur ? '#fff' : '#818898',
backgroundColor: index == cur ? '#00a624' : '#f6f8fa'
}"
v-for="(item,index) in tablist" @click="changeTab(index)">
{{ item.name }}
</view>
</view>
</template>
<script setup lang="ts">
import { reactive,ref } from "vue";
import { onLoad,onShow } from "@dcloudio/uni-app"
let cur = ref(0);
let tablist = ref([{
name:'我的订单',
},{
name:'历史订单',
}
]);
onLoad(()=>{
})
const changeTab = (index:number)=>{
cur.value = index;
}
</script>
<style scoped lang="scss">
</style>