# first-weapp-0213
**Repository Path**: johnkuo/first-weapp-0213
## Basic Information
- **Project Name**: first-weapp-0213
- **Description**: first-weapp-0213first-weapp-0213
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2023-02-13
- **Last Updated**: 2023-02-21
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# 小程序
```
.wxml, .wxss, .json, .js
```
## 全局
- app.js => 全局js文件
- app.json => 全局配置文件
- app.wxss => 全局css文件
## 页面级
- index.js => 页面js文件
- index.json => 页面配置文件
- index.wxss => 页面css文件
- index.wxml => 页面
## WXML模板使用
1. ` + `
```
type a!
type b!
type c!
Not A/B/C!
```
2. ``
```
{{ ind * 10 }}.
{{ it.text }}
```
## 自定义组件
### 定义组件
```
// index.json
{
"component": true
}
// index.wxml
{{counter}}
// index.wxss
.counter {
padding: 20rpx;
background-color: deepskyblue;
display: flex;
justify-content: space-between;
align-items: center;
}
//index.js
Component({
data: {
counter: 0
},
})
```
### 使用组件
```
// 注册组件 页面.json 或 app.json
{
"usingComponents": {
"my-counter": "/components/my-counter/index"
}
}
// 使用
```