You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
815 B
33 lines
815 B
"use strict";
|
|
Component({
|
|
properties: {
|
|
topList: {
|
|
type: Array,
|
|
value: []
|
|
}
|
|
},
|
|
data: {
|
|
singleComponent: ''
|
|
},
|
|
lifetimes: {
|
|
attached: function () {
|
|
console.log('topList attached');
|
|
this.initComponentData();
|
|
},
|
|
detached: function () {
|
|
},
|
|
ready: function () {
|
|
console.log('topList组件渲染完毕');
|
|
this.triggerEvent('callParentFun');
|
|
}
|
|
},
|
|
methods: {
|
|
initComponentData: function () {
|
|
console.log(this.data.topList[0].componentFrontId);
|
|
var componentFrontId = this.data.topList[0].componentFrontId;
|
|
this.setData({
|
|
singleComponent: componentFrontId
|
|
});
|
|
}
|
|
}
|
|
});
|
|
|