// components/diy-myfunction/index.js var Nova = getApp().Nova; Component({ /** * 组件的属性列表 */ properties: { options: null, }, /** * 组件的初始数据 */ data: { list: [], }, /** * 组件的方法列表 */ ready: function() { // 在组件布局完成后执行,确保options参数中有data信息 this.loadData(); }, methods: { async loadData() { await Nova.checkComponentsDataProperties(this); let list = await Nova.getBlockData(this.data.options.data); let { options } = this.data; console.log("我的功能组", options); console.log(list); let { data, src, style } = options; let { className, filter } = data; this.setData({ list, style, className, filter, }); }, goNovaURL: function(ev) { console.log(ev); let url = ev.currentTarget.dataset.url; console.log(url); wx.navigateTo({ url: url, }); }, }, });