template-demo/node_modules/@jdmini/components/README.md

32 lines
558 B
Markdown
Raw Normal View History

2025-09-24 00:55:36 +08:00
## 安装/更新
1、终端使用命令安装 npm 包
```bash
npm install --save @jdmini/components@latest
```
2、在小程序开发者工具中菜单选择工具 -> 构建 npm
`注意:依赖@jdmini/api请确保小程序项目已安装@jdmini/api`
## 使用
1、在页面的 json 文件中引入组件:
```json
{
"usingComponents": {
"jdwx-ad": "@jdmini/components/jdwx-ad",
"jdwx-link": "@jdmini/components/jdwx-link"
}
}
```
2、在页面的 wxml 文件中使用组件:
```html
<jdwx-ad type="custom" />
<jdwx-link />
```