"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 }); } } });