1. 微信小程序中如何引用模板文件?
两种方式:<include>和<import>
//首先新建header和footer模板文件
//footer.wxml
<template name="footer">
<text>footer001</text>
</template>
//include
<include src="header.wxml"/>
//import
<import src="footer.wxml"/>
<template is="footer">
//is后面是引入的template对应的name属性的值