Files
MALL_MP_WX/uni_modules/vehicle-code/readme.md
dt_2916866708 f756390529 第一次提交
2024-02-28 17:26:46 +08:00

44 lines
1.4 KiB
Markdown
Raw 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.
## 功能介绍
- 简洁的车牌号选择组件(适用于 `移动端`
## 使用方法
- `uni_modules` 方式
1. 点击右上角的 `使用 HBuilder X 导入插件` 按钮直接导入项目或点击 `下载插件 ZIP` 按钮下载插件包并解压到项目的 `uni_modules/vehicle-code` 目录下
2. 在需要使用页面的 `(n)vue` 文件中添加
```html
<!-- 不需要引入,可直接使用 -->
<vehicle-code ref="child" @changes="confirms" :codeList="cardList"/>
<!-- 按钮触发 -->
<!-- vehicleCode:车牌号(可选项) -->
<!-- index:指定选中下标高亮 -->
<button type="primary" @click="$refs.child.checkcart(vehicleCode, index)"></button>
```
```javascript
export default {
data() {
return {
cardList:[],
}
},
methods:{
confirms(e){
//e 获取返回车牌号
},
}
}
```
3. 需要更新版本时在 `HBuilder X` 中右键 `uni_modules/vehicle-code` 目录选择 `从插件市场更新` 即可
## 组件属性
| 属性 | 类型 | 默认值 | 说明 |
|:---:|:---:|:---:|---|
| title | String | '例如:车牌号' | 弹框标题 |
| mask | Boolean | false | 蒙板点击是否关闭弹窗 |
| codeList | Array | [] | 默认35个省车牌号新增台 |
## 组件事件
| 名称 | 触发时机 |
|:---:|---|
| changes | 确认选择车牌后触发 |