mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[Doc] Swipe: update custom indicator document (#1978)
This commit is contained in:
parent
a4b71aa402
commit
5564fbf624
@ -51,11 +51,9 @@
|
|||||||
<van-swipe-item>3</van-swipe-item>
|
<van-swipe-item>3</van-swipe-item>
|
||||||
<van-swipe-item>4</van-swipe-item>
|
<van-swipe-item>4</van-swipe-item>
|
||||||
|
|
||||||
<template slot="indicator">
|
<div class="custom-indicator" slot="indicator">
|
||||||
<div class="custom-indicator">
|
{{ current + 1 }}/4
|
||||||
{{ this.current + 1 }}/4
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
|
||||||
</van-swipe>
|
</van-swipe>
|
||||||
</demo-block>
|
</demo-block>
|
||||||
</demo-section>
|
</demo-section>
|
||||||
|
@ -97,11 +97,9 @@ export default {
|
|||||||
<van-swipe-item>3</van-swipe-item>
|
<van-swipe-item>3</van-swipe-item>
|
||||||
<van-swipe-item>4</van-swipe-item>
|
<van-swipe-item>4</van-swipe-item>
|
||||||
|
|
||||||
<template slot="indicator">
|
<div class="custom-indicator" slot="indicator">
|
||||||
<div class="custom-indicator">
|
{{ current + 1 }}/4
|
||||||
{{ this.current + 1 }}/4
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
|
||||||
</van-swipe>
|
</van-swipe>
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -113,6 +111,7 @@ export default {
|
|||||||
current: 0
|
current: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onChange(index) {
|
onChange(index) {
|
||||||
this.current = index;
|
this.current = index;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</slot>
|
</slot>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -97,11 +97,9 @@ export default {
|
|||||||
<van-swipe-item>3</van-swipe-item>
|
<van-swipe-item>3</van-swipe-item>
|
||||||
<van-swipe-item>4</van-swipe-item>
|
<van-swipe-item>4</van-swipe-item>
|
||||||
|
|
||||||
<template slot="indicator">
|
<div class="custom-indicator" slot="indicator">
|
||||||
<div class="custom-indicator">
|
{{ current + 1 }}/4
|
||||||
{{ this.current + 1 }}/4
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
|
||||||
</van-swipe>
|
</van-swipe>
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -113,6 +111,7 @@ export default {
|
|||||||
current: 0
|
current: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onChange(index) {
|
onChange(index) {
|
||||||
this.current = index;
|
this.current = index;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user