You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
926 B
50 lines
926 B
# cowain-add-license |
|
|
|
> 添加车牌功能 |
|
|
|
 |
|
|
|
## 使用 |
|
|
|
```vue |
|
<template> |
|
<view class="content"> |
|
<button type="default" @click="addLicenseDialog">添加车牌</button> |
|
<cowain-add-licensee v-if="showLicenseDialog" @onCancel='cancelLicenseDialog' @onOk='okLicense'/> |
|
</view> |
|
</template> |
|
|
|
<script> |
|
export default { |
|
data() { |
|
return { |
|
showLicenseDialog: false, //是否显示添加车牌的dialog |
|
} |
|
}, |
|
methods: { |
|
//显示添加车牌 |
|
addLicenseDialog() { |
|
this.showLicenseDialog = true; |
|
}, |
|
//取消添加车牌 |
|
cancelLicenseDialog() { |
|
this.showLicenseDialog = false; |
|
}, |
|
//添加车牌成功 |
|
okLicense(license) { |
|
console.log(license); |
|
}, |
|
} |
|
} |
|
</script> |
|
|
|
<style lang="less"> |
|
|
|
.content { |
|
display: flex; |
|
flex-direction: column; |
|
align-items: center; |
|
justify-content: center; |
|
} |
|
</style> |
|
``` |