|
@@ -4,7 +4,6 @@
|
4
|
4
|
<van-swipe-item v-for="(image, index) in images" :key="index" >
|
5
|
5
|
<van-image
|
6
|
6
|
height="300"
|
7
|
|
- fit="contain"
|
8
|
7
|
:src="image.image"
|
9
|
8
|
@click="onPerView(index)"
|
10
|
9
|
/>
|
|
@@ -24,9 +23,7 @@
|
24
|
23
|
v-for="(image, index) in images"
|
25
|
24
|
:key="index"
|
26
|
25
|
:title="image.text"
|
27
|
|
-
|
28
|
26
|
>
|
29
|
|
- <!-- {{ image.text }} -->
|
30
|
27
|
</van-tab>
|
31
|
28
|
</van-tabs>
|
32
|
29
|
</div>
|
|
@@ -53,12 +50,6 @@ export default {
|
53
|
50
|
[Tabs.name]: Tabs,
|
54
|
51
|
[Tab.name]: Tab,
|
55
|
52
|
},
|
56
|
|
-
|
57
|
|
- // images = [
|
58
|
|
- // 'https://img.yzcdn.cn/vant/apple-1.jpg',
|
59
|
|
- // 'https://img.yzcdn.cn/vant/apple-2.jpg',
|
60
|
|
- // ];
|
61
|
|
-
|
62
|
53
|
props: {
|
63
|
54
|
images: {
|
64
|
55
|
type: Array,
|
|
@@ -68,7 +59,7 @@ export default {
|
68
|
59
|
|
69
|
60
|
setup(props,) {
|
70
|
61
|
const current = ref(0);
|
71
|
|
-const swipe = ref();
|
|
62
|
+ const swipe = ref();
|
72
|
63
|
|
73
|
64
|
const onChange = (index) => {
|
74
|
65
|
current.value = index;
|
|
@@ -82,8 +73,8 @@ const swipe = ref();
|
82
|
73
|
};
|
83
|
74
|
const onClickTab = (index) => {
|
84
|
75
|
current.value=index
|
85
|
|
- swipe.value.swipeTo(index)
|
86
|
|
-swipe.value.resize()
|
|
76
|
+ swipe.value.swipeTo(index)
|
|
77
|
+ swipe.value.resize()
|
87
|
78
|
|
88
|
79
|
console.log(index, "ongchawng");
|
89
|
80
|
};
|
|
@@ -91,7 +82,7 @@ swipe.value.resize()
|
91
|
82
|
// refs.checkbox.toggle();
|
92
|
83
|
onPerView;
|
93
|
84
|
return {
|
94
|
|
- swipe,
|
|
85
|
+ swipe,
|
95
|
86
|
current,
|
96
|
87
|
onChange,
|
97
|
88
|
onPerView,
|