diff --git a/CHANGELOG.md b/CHANGELOG.md index b383bdcf..cb5485c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,12 @@ # Change Log +## 0.8.6 +- [+] [wxc-ep-slider](https://apache.github.io/incubator-weex-ui/#/packages/wxc-ep-slider/) add `enable-swipe` param + ## 0.8.5 -- [!] wxc-dialog: 文档上补充上 `show` 参数 -- [!] wxc-mask: 修正了单击“关闭”按钮和单击“覆盖”之间不一致行为的错误 -- [+] wxc-pan-item: 使用元素前添加判断 +- [!] wxc-dialog: supplement missing parameters ` show` in document +- [!] wxc-mask: fix bug that inconsistent behavior between clicking close button and clicking overlay +- [+] wxc-pan-item: add judgment before using element ## 0.8.4 diff --git a/CHANGELOG_cn.md b/CHANGELOG_cn.md index bbe0b6e5..bd41d633 100644 --- a/CHANGELOG_cn.md +++ b/CHANGELOG_cn.md @@ -1,9 +1,13 @@ # 升级日志 +## 0.8.6 +- [+] [wxc-ep-slider](https://apache.github.io/incubator-weex-ui/#/cn/packages/wxc-ep-slider/) 增加 `enable-swipe` 参数 + + ## 0.8.5 -- [!] wxc-dialog: supplement missing parameters ` show` in document -- [!] wxc-mask: fix bug that inconsistent behavior between clicking close button and clicking overlay -- [+] wxc-pan-item: add judgment before using element +- [!] wxc-dialog: 文档上补充上 `show` 参数 +- [!] wxc-mask: 修正了单击“关闭”按钮和单击“覆盖”之间不一致行为的错误 +- [+] wxc-pan-item: 使用元素前添加判断 ## 0.8.4 - [+] [wxc-lightbox](https://apache.github.io/incubator-weex-ui/#/cn/packages/wxc-lightbox/) 增加 `show-indicator` 参数控制是否显示indicator diff --git a/package.json b/package.json index 02585d74..f825e831 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "weex-ui", - "version": "0.8.5", + "version": "0.8.6", "description": "A rich interaction, lightweight, high performance UI library based on Weex", "main": "index.js", "lib": "vue", diff --git a/packages/wxc-ep-slider/README.md b/packages/wxc-ep-slider/README.md index 2d49d219..0467cd9d 100644 --- a/packages/wxc-ep-slider/README.md +++ b/packages/wxc-ep-slider/README.md @@ -1,4 +1,4 @@ -# wxc-ep-slider +# wxc-ep-slider > Binding Slider @@ -101,6 +101,7 @@ More details can be found in [here](https://github.com/apache/incubator-weex-ui/ | card-s | `Object` | `Y`|`{width: 360,height: 300,spacing: 0,scale: 0.75}` | card style| | auto-play | `Boolean` | `N`|`false` |whether is auto-play| | interval | `Number` | `N`|`1200` |interval of auto-play| +| enable-swipe | `Boolean` | `N`|`true` |which can swipe| ### More @@ -108,14 +109,14 @@ More details can be found in [here](https://github.com/apache/incubator-weex-ui/ ``` // 这个富交互体验组件依赖于 [BindingX](https://alibaba.github.io/bindingx/) 特性,使用前请确定你的App [是否安装](https://github.com/alibaba/bindingx#installation) > Weex Binding 效果的 slider 组件 ### 规则 -- 用于丰富 slide,包括商品橱窗,图片列表等 +- 用于丰富 slide,包括商品橱窗,图片列表等 - **假如子组件有点击事件,在 Android 由于 [此约束](http://weex-project.io/cn/references/gesture.html#约束),目前需要在子元素里面绑定对应事件,Weex Ui 提供了 [wxc-pan-cell](https://github.com/apache/incubator-weex-ui/tree/master/packages/wxc-pan-item) 包裹器来解决此情况,具体可参考 [demo](https://github.com/apache/incubator-weex-ui/tree/master/example/ep-slider)** - 支持滑到最右时候显示加载更多和事件回调,需要传入 `pull-more` slot,详细可见 demo @@ -103,12 +103,13 @@ | card-s | `Object` | `Y`|`{width: 360,height: 300,spacing: 0,scale: 0.75}` | item容器的样式| | auto-play | `Boolean` | `N`|`false` |是否需要自动播放| | interval | `Number` | `N`|`1200` |自动播放时候的间隔| +| enable-swipe | `Boolean` | `N`|`true` |是否支持滑动| ### 渲染滑到最右时候的加载更多 ``` // 样式需要自己根据个数和长度计算,详细参考 [demo](https://github.com/apache/incubator-weex-ui/blob/master/example/ep-slider/index.vue) 代码 -
加载更多
@@ -121,7 +122,7 @@ ``` // 直接在wxc-ep-slider组件上面绑定ref="wxc-ep-slider",然后调用即可 // 譬如设置第二张 -this.$refs['wxc-ep-slider'].manualSetPage(1); +this.$refs['wxc-ep-slider'].manualSetPage(1); ``` ### Rebind diff --git a/packages/wxc-ep-slider/index.vue b/packages/wxc-ep-slider/index.vue index 4f793553..259a8e6d 100644 --- a/packages/wxc-ep-slider/index.vue +++ b/packages/wxc-ep-slider/index.vue @@ -137,7 +137,7 @@ under the License. }, methods: { onPanStart (e) { - if (BindEnv.supportsEB()) { + if (!this.enableSwipe || BindEnv.supportsEB()) { return; } this.clearAutoPlay(); @@ -145,7 +145,7 @@ under the License. this.startTime = Date.now(); }, onPanMove (e) { - if (BindEnv.supportsEB()) { + if (!this.enableSwipe || BindEnv.supportsEB()) { return; } const moveX = e.changedTouches[0].clientX - this.startX; @@ -203,7 +203,7 @@ under the License. } }, onEpPanStart (e) { - if (BindEnv.supportsEB() && e.state === 'start') { + if (this.enableSwipe && BindEnv.supportsEB() && e.state === 'start') { this.clearAutoPlay(); setTimeout(() => { const sliderCtn = this.$refs[`sliderCtn_${this.sliderId}`]; @@ -212,7 +212,7 @@ under the License. } }, onPanEnd (e) { - if (BindEnv.supportsEB()) { + if (!this.enableSwipe || BindEnv.supportsEB()) { return; } this.panEnd(e);