Commit a92dc0116349068c414d61ea0be928b394b2d61b

Authored by vking
1 parent e8f61a6d

taocan-share-pinglun

Showing 1 changed file with 10 additions and 3 deletions
@@ -18,9 +18,16 @@ Component({ @@ -18,9 +18,16 @@ Component({
18 18
19 }, 19 },
20 attached(){ 20 attached(){
21 - this.setData({  
22 - enclosure:JSON.parse(this.data.post.enclosure||null)  
23 - }) 21 + // this.setData({
  22 + // enclosure:JSON.parse(this.data.post.enclosure||null)
  23 + // })
  24 + },
  25 + observers: {
  26 + 'post': function(post) {
  27 + this.setData({
  28 + enclosure:JSON.parse(post.enclosure||null)
  29 + })
  30 + }
24 }, 31 },
25 /** 32 /**
26 * 组件的方法列表 33 * 组件的方法列表