File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed
examples/dist/image-picker Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -78,26 +78,37 @@ Component({
78
78
attached : function ( ) {
79
79
// 在组件实例进入页面节点树时执行
80
80
let newOrOld = this . judgeNewOrOld ( ) ;
81
-
82
81
// 对 cells 的兼容处理
83
82
if ( this . data . cells !== null ) {
84
83
newOrOld = 'new' ;
85
84
this . setData ( {
86
- newOrOld,
87
85
urls : this . data . cells
88
86
} ) ;
89
- } else {
87
+ }
88
+ this . setData ( {
89
+ 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 ( ) ;
90
100
this . setData ( {
91
101
newOrOld
92
102
} ) ;
93
103
}
94
- } ,
104
+ }
95
105
} ,
96
106
97
107
/**
98
108
* 组件的方法列表
99
109
*/
100
110
methods : {
111
+
101
112
handleClear ( ) {
102
113
let urls = this . data . urls ;
103
114
this . setData ( {
You can’t perform that action at this time.
0 commit comments