Applet - the process of creating a template components

Component
I feel explain the official documentation of relatively long-winded, I would like to briefly describe here, but also to facilitate their memories, have any questions, you are welcome harassment;

Create a template:

  1. Create a component in the applet, the proposed Page with the same level, easy to find;
  2. Click the right mouse button to create the directory components;
  3. You can right click 'New Component' to quickly create a component;

Reference templates:
the introduction of the template in the page's path to the json;

"usingComponents": {
    "banner": "/component/banner/index"
  }
  
<banner normal-banner='{{false}}' banner-list='{{desgin_jx}}'></banner>

Parameter passing in the assembly, can be directly used instead of using nonePic incoming data in the page;

nonePic: {
  type: String,
  value: '',
  observer: function (newVal, oldVal, changedPath) {

  }
},

Guess you like

Origin blog.csdn.net/jiaodeqiangs/article/details/95317504