微信小程序—引入页面/组件include、import1.

第一种:我在include页面引入import页面一定要注意include和import标签后面的/

!--引入整个import页面--includesrc"../import/import.wxml"/text我是被include页面引入的import页面/text2.

效果:

3.

第二种:引入import页面中的组件

importsrc"../import/import"/templateis"a"data"{{a:'模版a的内容'}}"///data要在include.wxml里写templatename"a"text这里是import页面的模版a--{{a}}/text/templatetemplatename"b"text这里是import页面的模版b/text/template4.

效果:

TAG标签: 微信小程序引入页面组件includeimport图文微信小程序引用组件微信小程序组件开发

http://www.xiaochengxub.com/read-96286.html