From 962fee4c3eb9bada01b24cda4f7b16e4d05871e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E7=99=BD?= <499055803@qq.com> Date: Wed, 31 Jul 2019 20:41:39 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix:wx.lin=20=E8=B0=83=E7=94=A8=E6=97=B6?= =?UTF-8?q?=E6=9C=BA=E4=BF=AE=E6=94=B9=20(#387)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/build-prod.js | 4 ++-- dist/action-sheet/index.js | 2 +- dist/dialog/index.js | 2 +- dist/message/index.js | 2 +- dist/toast/index.js | 2 +- examples/dist/action-sheet/index.js | 2 +- examples/dist/dialog/index.js | 2 +- examples/dist/message/index.js | 2 +- examples/dist/toast/index.js | 2 +- examples/pages/components/layout/pages/grid/index.wxml | 4 ++-- examples/pages/components/layout/pages/grid/index.wxss | 2 +- src/action-sheet/index.js | 2 +- src/dialog/index.js | 2 +- src/message/index.js | 2 +- src/toast/index.js | 2 +- 15 files changed, 17 insertions(+), 17 deletions(-) diff --git a/build/build-prod.js b/build/build-prod.js index e82a6ba5..596f555e 100644 --- a/build/build-prod.js +++ b/build/build-prod.js @@ -4,7 +4,7 @@ const cssmin = require('gulp-clean-css'); const rename = require('gulp-rename'); const componentData = require('./build-tool'); const result = `{common,behaviors,${componentData()}}`; -const isCustom = result == `{common,behaviors}`; +const isCustom = (result != `{common,behaviors,}`); // js => js gulp.task('dispose-js', () => { @@ -61,4 +61,4 @@ gulp.task('default', gulp.series( 'dispose-wxs', 'dispose-copy', 'dispose-json' -)); \ No newline at end of file +)); diff --git a/dist/action-sheet/index.js b/dist/action-sheet/index.js index ed24607e..7ab61bcf 100644 --- a/dist/action-sheet/index.js +++ b/dist/action-sheet/index.js @@ -27,7 +27,7 @@ Component({ this.initUIAdapter(); }, - lifetimes: { + pageLifetimes: { show() { if (this.data.openApi) { this.initActionSheet(); diff --git a/dist/dialog/index.js b/dist/dialog/index.js index 805c9426..a87905c4 100644 --- a/dist/dialog/index.js +++ b/dist/dialog/index.js @@ -72,7 +72,7 @@ Component({ } }, - lifetimes: { + pageLifetimes: { show() { if (this.data.openApi) { this.initDialog(); diff --git a/dist/message/index.js b/dist/message/index.js index 83b2fc49..37467673 100644 --- a/dist/message/index.js +++ b/dist/message/index.js @@ -27,7 +27,7 @@ Component({ this.initMessage(); }, - lifetimes: { + pageLifetimes: { show() { this.initMessage(); }, diff --git a/dist/toast/index.js b/dist/toast/index.js index 67c806a3..0b02ab09 100644 --- a/dist/toast/index.js +++ b/dist/toast/index.js @@ -94,7 +94,7 @@ Component({ } }, - lifetimes: { + pageLifetimes: { show() { if (this.data.openApi) { this.initToast(); diff --git a/examples/dist/action-sheet/index.js b/examples/dist/action-sheet/index.js index ed24607e..7ab61bcf 100644 --- a/examples/dist/action-sheet/index.js +++ b/examples/dist/action-sheet/index.js @@ -27,7 +27,7 @@ Component({ this.initUIAdapter(); }, - lifetimes: { + pageLifetimes: { show() { if (this.data.openApi) { this.initActionSheet(); diff --git a/examples/dist/dialog/index.js b/examples/dist/dialog/index.js index 805c9426..a87905c4 100644 --- a/examples/dist/dialog/index.js +++ b/examples/dist/dialog/index.js @@ -72,7 +72,7 @@ Component({ } }, - lifetimes: { + pageLifetimes: { show() { if (this.data.openApi) { this.initDialog(); diff --git a/examples/dist/message/index.js b/examples/dist/message/index.js index 83b2fc49..37467673 100644 --- a/examples/dist/message/index.js +++ b/examples/dist/message/index.js @@ -27,7 +27,7 @@ Component({ this.initMessage(); }, - lifetimes: { + pageLifetimes: { show() { this.initMessage(); }, diff --git a/examples/dist/toast/index.js b/examples/dist/toast/index.js index 67c806a3..0b02ab09 100644 --- a/examples/dist/toast/index.js +++ b/examples/dist/toast/index.js @@ -94,7 +94,7 @@ Component({ } }, - lifetimes: { + pageLifetimes: { show() { if (this.data.openApi) { this.initToast(); diff --git a/examples/pages/components/layout/pages/grid/index.wxml b/examples/pages/components/layout/pages/grid/index.wxml index 569d000d..dfacc260 100644 --- a/examples/pages/components/layout/pages/grid/index.wxml +++ b/examples/pages/components/layout/pages/grid/index.wxml @@ -21,8 +21,8 @@ - - + + {{item.text}} diff --git a/examples/pages/components/layout/pages/grid/index.wxss b/examples/pages/components/layout/pages/grid/index.wxss index 914f0d7f..7627b028 100644 --- a/examples/pages/components/layout/pages/grid/index.wxss +++ b/examples/pages/components/layout/pages/grid/index.wxss @@ -22,4 +22,4 @@ .grid-item { height: 200rpx; -} +} diff --git a/src/action-sheet/index.js b/src/action-sheet/index.js index ed24607e..7ab61bcf 100644 --- a/src/action-sheet/index.js +++ b/src/action-sheet/index.js @@ -27,7 +27,7 @@ Component({ this.initUIAdapter(); }, - lifetimes: { + pageLifetimes: { show() { if (this.data.openApi) { this.initActionSheet(); diff --git a/src/dialog/index.js b/src/dialog/index.js index 805c9426..a87905c4 100644 --- a/src/dialog/index.js +++ b/src/dialog/index.js @@ -72,7 +72,7 @@ Component({ } }, - lifetimes: { + pageLifetimes: { show() { if (this.data.openApi) { this.initDialog(); diff --git a/src/message/index.js b/src/message/index.js index 83b2fc49..37467673 100644 --- a/src/message/index.js +++ b/src/message/index.js @@ -27,7 +27,7 @@ Component({ this.initMessage(); }, - lifetimes: { + pageLifetimes: { show() { this.initMessage(); }, diff --git a/src/toast/index.js b/src/toast/index.js index 67c806a3..0b02ab09 100644 --- a/src/toast/index.js +++ b/src/toast/index.js @@ -94,7 +94,7 @@ Component({ } }, - lifetimes: { + pageLifetimes: { show() { if (this.data.openApi) { this.initToast(); From 189689256dd0700b379c1f420493363576e85e35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E4=B8=80?= <1774732369@qq.com> Date: Sat, 3 Aug 2019 22:02:00 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix:=E6=9B=B4=E6=96=B0=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=86=85=E4=BA=8B=E4=BB=B6=E5=86=92=E6=B3=A1=E5=92=8C=E9=98=BB?= =?UTF-8?q?=E6=AD=A2=E5=86=92=E6=B3=A1=20(#391)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/dist/action-sheet/index.js | 4 ++-- examples/dist/badge/index.js | 3 +-- examples/dist/count-selector/index.js | 6 +++--- examples/dist/custom-tab-bar/index.js | 2 +- examples/dist/dialog/index.js | 4 ++-- examples/dist/grid-item/index.js | 4 +--- examples/dist/grid/index.js | 2 +- examples/dist/list/index.js | 2 +- examples/dist/loadmore/index.js | 3 +-- examples/dist/mask/index.js | 2 +- examples/dist/notice-bar/index.js | 8 +++----- examples/dist/popup/index.js | 2 +- examples/dist/segment/index.wxml | 2 +- examples/dist/slide-view/index.js | 6 +++--- examples/dist/status-show/index.js | 3 +-- examples/dist/toast/index.js | 4 ++-- src/action-sheet/index.js | 4 ++-- src/badge/index.js | 3 +-- src/count-selector/index.js | 6 +++--- src/custom-tab-bar/index.js | 2 +- src/dialog/index.js | 4 ++-- src/grid-item/index.js | 4 +--- src/grid/index.js | 2 +- src/list/index.js | 2 +- src/loadmore/index.js | 3 +-- src/mask/index.js | 2 +- src/notice-bar/index.js | 8 +++----- src/popup/index.js | 2 +- src/segment/index.wxml | 2 +- src/slide-view/index.js | 6 +++--- src/status-show/index.js | 3 +-- src/toast/index.js | 4 ++-- 32 files changed, 50 insertions(+), 64 deletions(-) diff --git a/examples/dist/action-sheet/index.js b/examples/dist/action-sheet/index.js index 7ab61bcf..74f969e0 100644 --- a/examples/dist/action-sheet/index.js +++ b/examples/dist/action-sheet/index.js @@ -87,7 +87,7 @@ Component({ success } = this.data; success && success({ ...e.currentTarget.dataset }); - this.triggerEvent('linitemtap', { ...e.currentTarget.dataset }); + this.triggerEvent('linitemtap', { ...e.currentTarget.dataset },{ bubbles: true, composed: true }); this._hideActionSheet(); }, @@ -112,7 +112,7 @@ Component({ }); this.triggerEvent('lincancel', { errMsg: 'showactionsheet:fail cancel' - }); + },{ bubbles: true, composed: true }); this._hideActionSheet(); }, diff --git a/examples/dist/badge/index.js b/examples/dist/badge/index.js index a1275d86..4dd44d43 100644 --- a/examples/dist/badge/index.js +++ b/examples/dist/badge/index.js @@ -56,8 +56,7 @@ Component({ }, // 点击事件 handleTap() { - this.triggerEvent('lintap'); - this.triggerEvent('lintapcatch', {}, { bubbles: true }); + this.triggerEvent('lintap',{},{ bubbles: true, composed: true }); }, } }); \ No newline at end of file diff --git a/examples/dist/count-selector/index.js b/examples/dist/count-selector/index.js index f7dfe4ac..921a5cd9 100644 --- a/examples/dist/count-selector/index.js +++ b/examples/dist/count-selector/index.js @@ -67,7 +67,7 @@ Component({ count: this.data.count, type: 'blur' } - this.triggerEvent('lintap', detail) + this.triggerEvent('lintap', detail,{ bubbles: true, composed: true }) }, reduceTap() { @@ -84,7 +84,7 @@ Component({ count: this.data.count, type: 'reduce' } - this.triggerEvent('lintap', detail) + this.triggerEvent('lintap', detail,{ bubbles: true, composed: true }) }, addTap() { @@ -101,7 +101,7 @@ Component({ count: this.data.count, type: 'add' } - this.triggerEvent('lintap', detail) + this.triggerEvent('lintap', detail,{ bubbles: true, composed: true }) }, } }) \ No newline at end of file diff --git a/examples/dist/custom-tab-bar/index.js b/examples/dist/custom-tab-bar/index.js index a3309a04..c4dd6580 100644 --- a/examples/dist/custom-tab-bar/index.js +++ b/examples/dist/custom-tab-bar/index.js @@ -90,7 +90,7 @@ Component({ idx, path:this.route }; - let option = {}; + let option = { bubbles: true, composed: true }; this.triggerEvent('lintap', detail, option); }, showRedDot(idx) { diff --git a/examples/dist/dialog/index.js b/examples/dist/dialog/index.js index a87905c4..9cad9271 100644 --- a/examples/dist/dialog/index.js +++ b/examples/dist/dialog/index.js @@ -155,7 +155,7 @@ Component({ onCancelTap(e) { let detail = 'cancel'; - let option = {}; + let option = { bubbles: true, composed: true }; const { success @@ -175,7 +175,7 @@ Component({ // 背景点击事件 onDialogTap(e) { let detail = true; - let option = {}; + let option = { bubbles: true, composed: true }; if (this.data.locked !== true) { this.setData({ diff --git a/examples/dist/grid-item/index.js b/examples/dist/grid-item/index.js index ff43aec6..cb1e500d 100644 --- a/examples/dist/grid-item/index.js +++ b/examples/dist/grid-item/index.js @@ -22,9 +22,7 @@ Component({ tapGridItem(e) { this.triggerEvent('lintap', { ...e - }, { - composed: true - }) + }, { bubbles: true, composed: true }) }, } }); \ No newline at end of file diff --git a/examples/dist/grid/index.js b/examples/dist/grid/index.js index 7dd1f849..a303962f 100644 --- a/examples/dist/grid/index.js +++ b/examples/dist/grid/index.js @@ -70,7 +70,7 @@ Component({ tapGrid(e) { this.triggerEvent('lintap', { index:this.data.currentIndex - }) + },{ bubbles: true, composed: true }) } } }); \ No newline at end of file diff --git a/examples/dist/list/index.js b/examples/dist/list/index.js index 75728a45..e9e2ab42 100644 --- a/examples/dist/list/index.js +++ b/examples/dist/list/index.js @@ -77,7 +77,7 @@ Component({ } this.triggerEvent('lintap', { e - }, {}) + }, { bubbles: true, composed: true }) } } }); \ No newline at end of file diff --git a/examples/dist/loadmore/index.js b/examples/dist/loadmore/index.js index 5a0c482e..62946262 100644 --- a/examples/dist/loadmore/index.js +++ b/examples/dist/loadmore/index.js @@ -31,8 +31,7 @@ Component({ }, methods: { onLoadmore(){ - this.triggerEvent('lintap'); - this.triggerEvent('lintapcatch',{},{ bubbles: true }); + this.triggerEvent('lintap',{},{ bubbles: true, composed: true }); } } }); diff --git a/examples/dist/mask/index.js b/examples/dist/mask/index.js index c8040846..17637022 100644 --- a/examples/dist/mask/index.js +++ b/examples/dist/mask/index.js @@ -64,7 +64,7 @@ Component({ onMaskTap(e) { let detail = true; - let option = {}; + let option = { bubbles: true, composed: true }; if (this.data.locked !== true) { this.setData({ diff --git a/examples/dist/notice-bar/index.js b/examples/dist/notice-bar/index.js index 46953681..594a0e0d 100644 --- a/examples/dist/notice-bar/index.js +++ b/examples/dist/notice-bar/index.js @@ -126,8 +126,7 @@ Component({ } }, handleTap() { - this.triggerEvent('lintap'); - this.triggerEvent('lincatchtap', {}, { bubbles: true }); + this.triggerEvent('lintap',{},{ bubbles: true, composed: true }); this.setData({ timer: null }); @@ -135,11 +134,10 @@ Component({ onSwip(e){ this.triggerEvent('lintap', { ...e.currentTarget.dataset - }); + },{ bubbles: true, composed: true }); }, onIconTap(){ - this.triggerEvent('linicontap'); - this.triggerEvent('liniconcatchtap', {}, { bubbles: true }); + this.triggerEvent('linicontap',{},{ bubbles: true, composed: true }); this.setData({ timer: null }); diff --git a/examples/dist/popup/index.js b/examples/dist/popup/index.js index 112a8b76..5fbfd543 100644 --- a/examples/dist/popup/index.js +++ b/examples/dist/popup/index.js @@ -54,7 +54,7 @@ Component({ // 点击事件 onPupopTap(e) { let detail = true; - let option = {}; + let option = { bubbles: true, composed: true }; if (this.data.locked !== true) { this.setData({ show: !this.data.show diff --git a/examples/dist/segment/index.wxml b/examples/dist/segment/index.wxml index 93ea85b5..e2ae10e3 100644 --- a/examples/dist/segment/index.wxml +++ b/examples/dist/segment/index.wxml @@ -9,7 +9,7 @@