Skip to content

Commit d4b5962

Browse files
committed
fix(Album): 修复图片无法正常显示的问题
当 urls 初始化为空数组,并在后期修改为字符串数组时 组件无法显示出图片,因为默认将空数组识别为对象数组 该 commit 增加数据监听器,每次设置 urls 都将重新判断类型,保证图片正常显示 close #921
1 parent a80cc78 commit d4b5962

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/album/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ Component({
8282
},
8383
},
8484

85+
observers: {
86+
'urls': function () {
87+
this.preview();
88+
}
89+
},
90+
8591
/**
8692
* 组件的方法列表
8793
*/

0 commit comments

Comments
 (0)