40 lines
729 B
Vue
40 lines
729 B
Vue
<template>
|
|
<view>
|
|
<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">
|
|
|
|
</view>
|
|
<view v-show="current === 1">
|
|
选项卡2的内容
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
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>
|