We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01e4f51 commit 01dcbb7Copy full SHA for 01dcbb7
1 file changed
src/image-picker/index.js
@@ -78,26 +78,37 @@ Component({
78
attached: function () {
79
// 在组件实例进入页面节点树时执行
80
let newOrOld = this.judgeNewOrOld();
81
-
82
// 对 cells 的兼容处理
83
if (this.data.cells !== null) {
84
newOrOld = 'new';
85
this.setData({
86
- newOrOld,
87
urls: this.data.cells
88
});
89
- } else {
+ }
+ this.setData({
+ newOrOld
90
+ });
91
+ },
92
93
+
94
+ observers: {
95
+ // fix #1075 urls属性更新以后,图片不显示
96
+ // solution urls 更新时重新判断
97
+ urls() {
98
+ if (this.data.cells === null) {
99
+ let newOrOld = this.judgeNewOrOld();
100
101
newOrOld
102
103
}
- },
104
105
},
106
107
/**
108
* 组件的方法列表
109
*/
110
methods: {
111
112
handleClear() {
113
let urls = this.data.urls;
114
0 commit comments