12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- // components/diy-intro/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,
- column
- } = options
- let {
- className,
- filter
- } = data
- this.setData({
- list,
- style,
- className,
- filter,
- column
- })
- },
- }
- })
|