From 2f3246b444a2da469b7fff955899632a8dfcea04 Mon Sep 17 00:00:00 2001 From: Lufaneng Date: Mon, 21 Jul 2025 10:18:39 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=AE=E7=9B=98=E6=9A=82=E5=AD=981?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BaseKeyboardInput.vue | 4 ++-- src/views/ParamsConfig/index.vue | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/BaseKeyboardInput.vue b/src/components/BaseKeyboardInput.vue index 31128cb..b00124e 100644 --- a/src/components/BaseKeyboardInput.vue +++ b/src/components/BaseKeyboardInput.vue @@ -28,7 +28,7 @@ const props = defineProps({ // 保留几位小数 layoutName为number时生效 precision: { type: Number, - default: 2 + default: 10 }, // 获取焦点打开键盘 isOpen: { @@ -132,7 +132,7 @@ const keyboardInit = () => { } const onInit = (keyboard: any) => { - keyboard.setInput(model.value) + keyboard.setInput(String(model.value || '')) keyboard.setCaretPosition(inputRef.value?.ref.selectionEnd) document.addEventListener('click', handlePopClose) } diff --git a/src/views/ParamsConfig/index.vue b/src/views/ParamsConfig/index.vue index ce331fc..9b01438 100644 --- a/src/views/ParamsConfig/index.vue +++ b/src/views/ParamsConfig/index.vue @@ -32,12 +32,14 @@
大地经度
- + +
大地纬度
- + +
@@ -128,7 +130,7 @@
-
+
@@ -188,8 +190,8 @@ import TableDialog from './TableDialog.vue'; import BaseKeyboardInput from '@/components/BaseKeyboardInput.vue'; const test = ref({ - value: '', - number: '' + value: '123', + number: 90 }) const router = useRouter()