@daysnap/horn-ui
Version:
hron ui
91 lines (69 loc) • 1.51 kB
Markdown
# HorLicensePlate
### 介绍
一个车牌号选择组件,支持前缀组件的所有属性如扩展车牌
## 代码演示
### 基础用法
```html
<hor-license-plate :show-none="true" :expand="['港', '澳', '王']" required v-model="plate" />
<dd>车牌:{{ plate }}</dd>
<hor-license-plate label="(禁用回显)" disabled required v-model="plate2" />
<dd>车牌(禁用回显):{{ plate2 }}</dd>
<script setup lang="ts">
import { HorLicensePlate } from '@daysnap/horn-ui'
import { ref } from 'vue'
const plate = ref('')
const plate2 = ref('沪888888')
</script>
```
## API
### 属性 Props
<table>
<tr>
<td>名称</td>
<td>类型</td>
<td>默认值</td>
</tr>
<tr v-for="(item, key) in horLicensePlateProps" :key="key">
<td>{{ key }}</td>
<td>{{ parseType(item.type || item) }}</td>
<td>{{ reserve(item.default, '-') }}</td>
</tr>
</table>
<table>
<tr>
<td>名称</td>
<td>说明</td>
</tr>
<tr>
<td>xx</td>
<td>xxx</td>
</tr>
</table>
### 插槽 Slots
<table>
<tr>
<td>名称</td>
<td>说明</td>
</tr>
<tr>
<td>xx</td>
<td>xxx</td>
</tr>
</table>
### 实例方法
<table>
<tr>
<td>名称</td>
<td>说明</td>
</tr>
<tr>
<td>xx</td>
<td>xxx</td>
</tr>
</table>
<script setup lang="ts">
import { reserve } from '@daysnap/utils'
import { HorCell } from '../hor-cell'
import { HorLicensePlate, horLicensePlateProps } from '.'
import { parseType } from '../utils'
</script>