Compare commits
2 Commits
55f0be6eb8
...
84f4f2667e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84f4f2667e | ||
|
|
af1acb6771 |
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user