template使用
2018-05-07 本文已影响0人
陈小井_
1.template中只包含wxml和wxss文件,在template下新建文件wxml和wxss

2.将template的name属性命名,然后进行页面布局

3.在文件中通过import导入模板文件,通过is="模板的name”进行区别引用,引入css样式


4.template中没有js文件,可在模板中声明js操作,在引用文件中实现js操作

1.template中只包含wxml和wxss文件,在template下新建文件wxml和wxss
2.将template的name属性命名,然后进行页面布局
3.在文件中通过import导入模板文件,通过is="模板的name”进行区别引用,引入css样式
4.template中没有js文件,可在模板中声明js操作,在引用文件中实现js操作