mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
Merge remote-tracking branch 'main/dev' into dev
This commit is contained in:
commit
80e877ea56
@ -64,6 +64,33 @@ export default {
|
|||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
#### 隐藏指示器
|
||||||
|
|
||||||
|
需要设置`show-indicators`属性为`false`,即会隐藏指示器。
|
||||||
|
|
||||||
|
:::demo 隐藏指示器
|
||||||
|
```html
|
||||||
|
<van-swipe :show-indicators="false">
|
||||||
|
<van-swipe-item v-for="(img, index) in autoImages" :key="index">
|
||||||
|
<img v-lazy="img" alt="">
|
||||||
|
</van-swipe-item>
|
||||||
|
</van-swipe>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
autoImages: [
|
||||||
|
'https://img.yzcdn.cn/upload_files/2017/03/09/FvkZahKoq1vkxLQFdVWeLf2UCqDz.png',
|
||||||
|
'https://img.yzcdn.cn/upload_files/2017/03/09/Fk0rpe_svu9d5Xk3MUCWd1QeMXOu.png'
|
||||||
|
]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
```
|
||||||
|
:::
|
||||||
|
|
||||||
#### 自动轮播
|
#### 自动轮播
|
||||||
|
|
||||||
需要设置`auto-play`属性为`true`,即会自动轮播。
|
需要设置`auto-play`属性为`true`,即会自动轮播。
|
||||||
|
@ -73,6 +73,8 @@
|
|||||||
"friendly-errors-webpack-plugin": "^1.6.1",
|
"friendly-errors-webpack-plugin": "^1.6.1",
|
||||||
"gh-pages": "^1.0.0",
|
"gh-pages": "^1.0.0",
|
||||||
"gulp": "^3.9.1",
|
"gulp": "^3.9.1",
|
||||||
|
"gulp-cssmin": "^0.2.0",
|
||||||
|
"gulp-postcss": "^7.0.0",
|
||||||
"gulp-util": "^3.0.8",
|
"gulp-util": "^3.0.8",
|
||||||
"highlight.js": "^9.12.0",
|
"highlight.js": "^9.12.0",
|
||||||
"html-webpack-plugin": "^2.29.0",
|
"html-webpack-plugin": "^2.29.0",
|
||||||
|
@ -26,6 +26,7 @@ Input.prototype = Object.create(new EventEmitter());
|
|||||||
extend(Input.prototype, {
|
extend(Input.prototype, {
|
||||||
bind: function(host) {
|
bind: function(host) {
|
||||||
if (Vue.prototype.$isServer) return;
|
if (Vue.prototype.$isServer) return;
|
||||||
|
bindEvents(host, 'dragstart', e => e.preventDefault());
|
||||||
bindEvents(host, 'touchstart mousedown', this.onTouchStart);
|
bindEvents(host, 'touchstart mousedown', this.onTouchStart);
|
||||||
if (this.options.listenMoving) {
|
if (this.options.listenMoving) {
|
||||||
bindEvents(window, 'touchmove mousemove', this.onTouchMove);
|
bindEvents(window, 'touchmove mousemove', this.onTouchMove);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user