|
@@ -49,12 +49,16 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, defineExpose, defineEmits } from 'vue';
|
|
|
+import { ref, defineExpose, defineEmits, defineProps } from 'vue';
|
|
|
import { showToast } from 'vant';
|
|
|
const show = ref(false);
|
|
|
const isNew = ref(false);
|
|
|
const emit = defineEmits(['changeIsNew']);
|
|
|
-
|
|
|
+const props = defineProps({
|
|
|
+ isNew: {
|
|
|
+ type: Boolean,
|
|
|
+ }
|
|
|
+})
|
|
|
const jp = [
|
|
|
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
|
|
|
['Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P'],
|
|
@@ -74,7 +78,6 @@ const setKey = key => {
|
|
|
if (fingerboardChepai.length >= 6) return showToast('超出车牌位数限制');
|
|
|
}
|
|
|
if (fingerboardChepai.length === 0 && /[0-9]/.test(key)) return showToast('车牌首位必须为字母');
|
|
|
- console.log(key)
|
|
|
key !== '' && fingerboardChepai.push(key);
|
|
|
};
|
|
|
|
|
@@ -89,6 +92,7 @@ const isNewFunc = () => {
|
|
|
|
|
|
const changeShow = (F = false, defaultText = []) => {
|
|
|
show.value = F;
|
|
|
+ isNew.value = props.isNew;
|
|
|
fingerboardChepai = defaultText;
|
|
|
};
|
|
|
defineExpose({
|