Skip to content

Commit 0d78e38

Browse files
zhc5253499657insummer
authored andcommitted
fix:linclear事件中增加返回内容,包含current和all。linchange事件更名为linpush,暂时还兼容linchange
1 parent 628bee2 commit 0d78e38

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed

dist/image-picker/index.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,19 @@ Component({
7878
*/
7979
methods: {
8080
handleClear() {
81+
var urls = this.data.urls;
8182
this.setData({
8283
urls: [],
8384
clear: false,
8485
showBtn: true
8586
});
86-
let detail = true;
87+
let info = {
88+
all: urls,
89+
current: urls,
90+
};
91+
8792
let option = {};
88-
this.triggerEvent('linclear', detail, option);
93+
this.triggerEvent('linclear', info, option);
8994
},
9095

9196
// 预览 preview
@@ -168,6 +173,7 @@ Component({
168173
let option = {};
169174

170175
that.triggerEvent('linchange', detail, option);
176+
that.triggerEvent('linpush', detail, option);
171177
}
172178
});
173179

examples/dist/image-picker/index.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,19 @@ Component({
7878
*/
7979
methods: {
8080
handleClear() {
81+
var urls = this.data.urls;
8182
this.setData({
8283
urls: [],
8384
clear: false,
8485
showBtn: true
8586
});
86-
let detail = true;
87+
let info = {
88+
all: urls,
89+
current: urls,
90+
};
91+
8792
let option = {};
88-
this.triggerEvent('linclear', detail, option);
93+
this.triggerEvent('linclear', info, option);
8994
},
9095

9196
// 预览 preview
@@ -168,6 +173,7 @@ Component({
168173
let option = {};
169174

170175
that.triggerEvent('linchange', detail, option);
176+
that.triggerEvent('linpush', detail, option);
171177
}
172178
});
173179

src/image-picker/index.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,19 @@ Component({
7878
*/
7979
methods: {
8080
handleClear() {
81+
var urls = this.data.urls;
8182
this.setData({
8283
urls: [],
8384
clear: false,
8485
showBtn: true
8586
});
86-
let detail = true;
87+
let info = {
88+
all: urls,
89+
current: urls,
90+
};
91+
8792
let option = {};
88-
this.triggerEvent('linclear', detail, option);
93+
this.triggerEvent('linclear', info, option);
8994
},
9095

9196
// 预览 preview
@@ -168,6 +173,7 @@ Component({
168173
let option = {};
169174

170175
that.triggerEvent('linchange', detail, option);
176+
that.triggerEvent('linpush', detail, option);
171177
}
172178
});
173179

0 commit comments

Comments
 (0)