This commit is contained in:
winter_born
2026-04-15 15:05:52 +08:00
parent af1acb6771
commit 84f4f2667e

View File

@@ -1,9 +1,12 @@
<template>
<view>
<uni-segmented-control :current="current" :values="" @clickItem=""></uni-segmented-control>
<view class="headers_top">
学习心得
</view>
<uni-segmented-control :current="current" :values="value" @clickItem="oncheck()" activeColor="red" styleType="text"></uni-segmented-control>
<view class="content">
<view v-show="current === 0">
选项卡1的内容
</view>
<view v-show="current === 1">
选项卡2的内容
@@ -17,15 +20,20 @@
data() {
return {
current:0,
value:["学习感言","学习历史"]
}
},
methods: {
oncheck(e){
if(this.current != e.currentIndex){
this.current = e.currentIndex
}
}
}
}
</script>
<style>
.headers_top{font-size:1.3rem;font-weight: bold;text-align: center;}
</style>