2024-04-25 16:53:53 +08:00

33 lines
722 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 郑州
## 开发
# 框架采用 Vant Weapp https://youzan.github.io/vant-weapp
# 开发环境初始化
```
1. npm install
2. 打开微信开发者工具,点击 工具 -> 构建 npm并勾选 使用 npm 模块 选项,构建完成后,即可引入组件。
```
# 引入组件-全局引入
```
// app.json 文件里配置 usingComponents 选项
"usingComponents": {
"van-button": "@vant/weapp/button/index"
}
```
# 引入组件-局部引入
```
// 在页面的 json 文件里配置 usingComponents 选项
"usingComponents": {
"van-button": "@vant/weapp/button/index"
}
```
# 使用组件
```
// 引入组件后,可以在 wxml 中直接使用组件
<van-button type="primary">按钮</van-button>
```