1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
| <template>
| <view>
| <uni-segmented-control :current="current" :values="items" @clickItem="onClickItem">
| </uni-segmented-control>
| <view v-if="current === 0" class="headerstyle">
| <view class="itemstyle"></view>
| </view>
| <view v-if="current === 1" class="headerstyle">
| <view class="itemstyle"></view>
| </view>
|
| <u-toast ref="uToast" />
| </view>
| </template>
|
| <script>
| export default {
| data() {
| return {
| items: ['半成品组盘', '库存绑定'],
| current: 0,
| }
| },
| onLoad(res) {},
| methods: {
| onClickItem(e) {
| if (this.current !== e.currentIndex) {
| this.current = e.currentIndex;
| }
| }
| }
| }
| </script>
|
| <style lang="scss">
| @import '@/common/uni-ui.scss';
|
| .content {
| display: flex;
| height: 150px;
| }
|
| .content-text {
| font-size: 14px;
| color: #666;
| }
|
| .itemstyle {
| margin-top: 20px;
| margin-left: 5%;
| }
|
| .headerstyle {
| width: 90%;
| }
| </style>
|
|