更新记录
1.0(2021-02-26) 下载此版本
首次上传
平台兼容性
<template>
<view class="page-content" @tap="hidePlateKeyboard">
<view class="plate-number-view">
<plate-number ref="plateNumber" />
</view>
<button type="primary" @tap="clickSearch">查询</button>
</view>
</template>
<script>
import PlateNumber from '@/components/plate/plate-number.vue';
export default {
components: {
PlateNumber,
},
methods: {
hidePlateKeyboard() {
if (this.$refs.plateNumber) {
this.$refs.plateNumber.hidePlateKeyboard();
}
},
clickSearch() {
let plate = this.$refs.plateNumber.getPlate();
uni.showToast({
title: plate,
icon: 'none'
});
}
},
}
</script>
<style scoped>
.page-content {
background-color: #EEEEEE;
height: 100vh;
padding: 20rpx;
}
.plate-number-view {
background: #FFFFFF;
border-radius: 12rpx;
padding: 40rpx 0;
}
button {
margin: 50rpx 0;
}
</style>