Files
files/pages/index/student.vue

43 lines
736 B
Vue

<template>
<view>
<view class="title">
学习心得
</view>
<uni-segmented-control :current="current" :values="value" style-type="text" @clickItem="onCheck"
activeColor="red"></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 >
.title{
font-size: 1.3rem;
font-weight: bold;
text-align: center;
}
</style>