1、首先打开微信开发者工具,在项目文件目录中找到一个js文件。

3、然后打开wxml文件。

5、使用template标签,指定使用哪一个模板,用is=“模板名称”表示。

7、接着为这个模板传递刚才在js中设置的数据。例子如下:data="{{content:item.content,friend:item.friend}}"

时间:2024-10-11 19:44:24
1、首先打开微信开发者工具,在项目文件目录中找到一个js文件。
3、然后打开wxml文件。
5、使用template标签,指定使用哪一个模板,用is=“模板名称”表示。
7、接着为这个模板传递刚才在js中设置的数据。例子如下:data="{{content:item.content,friend:item.friend}}"