当前位置:网站首页>Applet - use of template
Applet - use of template
2022-06-24 16:18:00 【Old love senior】
Directory structure :

result :

One 、wxmoban.wxml file
<text> Use of templates </text>
1.1 Definition of template
<!-- <template name="moban"> <view class="moban"> <view>{
{title}}</view> <view>{
{desc}}</view> <view> Definition </view> </view> </template> -->
1.2 Introduction of template wxml
<import src="/template/moban/moban.wxml"></import>
1.3 Use of templates
<template is="moban"/>
1.4 Template value transfer
<template is="moban" data="{
{title:' title ',desc:' details '}}"></template>
Two 、 wxmoban.wxss file
/* pages/wxmoban/wxmoban.wxss */
/* .moban{ margin: 10rpx; border: 1px solid #000; } */
1.5 Introduction of template wxss
@import "/template/moban/moban.wxss"
3、 ... and 、 Folder imported by template (import You can use the... Defined by the target file in this file template)
route :<import src="/template/moban/moban.wxml"></import>
<template name="moban">
<view class="moban">
<view>{
{title}}</view>
<view>{
{desc}}</view>
<view> Definition </view>
</view>
</template>
route :@import "/template/moban/moban.wxss"
.moban{
margin: 10rpx;
border: 1px solid #000;
}
Four 、include You can remove the target file from <template/> <wxs/> Outside the entire code into ( Public e.g : Head and tail wxml)

边栏推荐
- Installer la Bibliothèque imagemagick 7.1 et l'extension imagick de PHP
- great! The novel website project is completely open source
- April 23, 2021: there are n cities in the TSP problem, and there is a distance between any two cities
- D. Solve The Maze(思维+bfs)Codeforces Round #648 (Div. 2)
- Istio FAQ: virtualservice route matching sequence
- CAP:多重注意力机制,有趣的细粒度分类方案 | AAAI 2021
- Golang+redis reentrant lock
- My network relationship with "apifox"
- 【Prometheus】4. Monitoring cases
- MySQL Innodb和Myisam
猜你喜欢

我与“Apifox”的网络情缘

一文理解OpenStack网络

打破内存墙的新利器成行业“热搜”!持久内存让打工人也能玩转海量数据+高维模型

My network relationship with "apifox"

Logging is not as simple as you think

Siggraph 2022 | truly restore the hand muscles. This time, the digital human hands have bones, muscles and skin

B. Ternary Sequence(思维+贪心)Codeforces Round #665 (Div. 2)

ZOJ - 4104 sequence in the pocket

Implement Domain Driven Design - use ABP framework - domain logic & application logic
MySQL Advanced Series: locks - locks in InnoDB
随机推荐
【Prometheus】4. Monitoring cases
2021-05-04: given a non negative integer C, you need to judge whether there are two integers a and B, so that a*a+b*b=c.
MD5 verification based on stm32
Siggraph 2022 | truly restore the hand muscles. This time, the digital human hands have bones, muscles and skin
[golang] Introduction to golang (I) establishment of running environment
Global and Chinese market of inverted syrup 2022-2028: Research Report on technology, participants, trends, market size and share
Learning these 10 kinds of timed tasks, I'm a little floating
Global and Chinese markets of Leyte coin exchange 2022-2028: Research Report on technology, participants, trends, market size and share
Nature刊登量子计算重大进展:有史以来第一个量子集成电路实现
安装ImageMagick7.1库以及php的Imagick扩展
Understanding openstack network
几种常见的DoS攻击
Global and Chinese market of computer protective film 2022-2028: Research Report on technology, participants, trends, market size and share
Bitwise Operators
ZOJ——4104 Sequence in the Pocket(思维问题)
2021-04-29: given an array arr, it represents a row of balloons with scores. One for each blow
Snowflake algorithm implemented in go language
Detailed explanation of estab of Stata regression table output
用 Oasis 开发一个跳一跳(一)—— 场景搭建
Percona Toolkit series - Pt deadlock logger