Merge remote-tracking branch 'main/dev' into dev

This commit is contained in:
陈嘉涵 2017-08-21 10:05:41 +08:00
commit 80e877ea56
3 changed files with 30 additions and 0 deletions

View File

@ -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`,即会自动轮播。

View File

@ -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",

View File

@ -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);