当前位置:网站首页>Wechat applet custom component
Wechat applet custom component
2022-06-29 02:26:00 【hello php】
First step : newly build components Catalog
The second step : stay components A new directory is added under the directory , It's called myHeader
The third step : stay myHeader Right click on the directory , Select from the pop-up menu " newly build Component", Then the name is myHeader, Wechat developer tool will automatically create 4 File , Respectively myHeader.js、myHeader.json、myHeader.wxml、myHeader.wxss, And the four files have default contents

among myHeader.js The content of is :
// components/myHeader/myHeader.js
Component({
/**
* A list of properties of a component
*/
properties: {
},
/**
* The initial data of the component
*/
data: {
},
/**
* A list of methods for a component
*/
methods: {
}
})
myHeader.json The contents of the file are :
{
"component": true,
"usingComponents": {}
}
myHeader.wxml The contents of the file are :
<!--components/myHeader/myHeader.wxml-->
<text>components/myHeader/myHeader.wxml</text>
myHeader.wxss The contents of the file are :
/* components/myHeader/myHeader.wxss */
Use of custom components :
边栏推荐
猜你喜欢
![[redis] get to know redis for the first time](/img/02/3c6a7f6ea8c563386a4cd458024728.png)
[redis] get to know redis for the first time

Quelques tests pour compléter l'environnement wasm

SystemVerilog structure (I)

Talk about the copyonwritearraylist of JUC

Ctfhub web password default password

2022.02.15
![[redis] hash type](/img/8b/2585908318f5fe88b455323d3f392e.png)
[redis] hash type

Learning Tai Chi Maker - mqtt Chapter II (IX) test of this chapter

【Redis】Key的层级结构

SAP ui5 beginner tutorial 22 - development and use of filter
随机推荐
Query any field of any table in JPA to the util method of entity class dto
Quelques tests pour compléter l'environnement wasm
瀑布型项目管理最常用的10个小工具,可以自由搭建使用
B1009 irony
Koa 快速入门
目标检测——ADAS实战
矩阵特征值和特征向量求解——特征值分解(EVD)
China's flexible employment has reached 200million
CTFHub-Web-密码口令-默认口令
SystemVerilog-结构体(一)
[redis] key hierarchy
【Redis】Key的层级结构
Download and installation of MySQL
fsockopen函数的应用
字符串分段组合
SAP ui5 beginner tutorial 22 - development and use of filter
扁平结构转换为树结构
在按钮禁用时消除hover效果
字符串输出
Smart world 2030