[Doc] Swipe: update custom indicator document (#1978)

This commit is contained in:
neverland 2018-10-25 11:02:14 +08:00 committed by GitHub
parent a4b71aa402
commit 5564fbf624
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 16 deletions

View File

@ -51,11 +51,9 @@
<van-swipe-item>3</van-swipe-item>
<van-swipe-item>4</van-swipe-item>
<template slot="indicator">
<div class="custom-indicator">
{{ this.current + 1 }}/4
</div>
</template>
<div class="custom-indicator" slot="indicator">
{{ current + 1 }}/4
</div>
</van-swipe>
</demo-block>
</demo-section>

View File

@ -97,11 +97,9 @@ export default {
<van-swipe-item>3</van-swipe-item>
<van-swipe-item>4</van-swipe-item>
<template slot="indicator">
<div class="custom-indicator">
{{ this.current + 1 }}/4
</div>
</template>
<div class="custom-indicator" slot="indicator">
{{ current + 1 }}/4
</div>
</van-swipe>
```
@ -113,6 +111,7 @@ export default {
current: 0
}
},
onChange(index) {
this.current = index;
}

View File

@ -22,7 +22,6 @@
/>
</div>
</slot>
</div>
</template>

View File

@ -97,11 +97,9 @@ export default {
<van-swipe-item>3</van-swipe-item>
<van-swipe-item>4</van-swipe-item>
<template slot="indicator">
<div class="custom-indicator">
{{ this.current + 1 }}/4
</div>
</template>
<div class="custom-indicator" slot="indicator">
{{ current + 1 }}/4
</div>
</van-swipe>
```
@ -113,6 +111,7 @@ export default {
current: 0
}
},
onChange(index) {
this.current = index;
}