diff --git a/package-lock.json b/package-lock.json index 3b9be9e..89521f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "dreamworks-frontend-template", "version": "0.0.0", "dependencies": { + "@vant/touch-emulator": "^1.4.0", "axios": "^1.3.4", "echarts": "^5.4.3", "moment": "^2.29.4", @@ -57,6 +58,11 @@ "resolved": "https://registry.npmmirror.com/@vant/popperjs/-/popperjs-1.3.0.tgz", "integrity": "sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw==" }, + "node_modules/@vant/touch-emulator": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/@vant/touch-emulator/-/touch-emulator-1.4.0.tgz", + "integrity": "sha512-Zt+zISV0+wpOew2S1siOJ3G22y+hapHAKmXM+FhpvWzsRc4qahaYXatCAITuuXt0EcDp7WvEeTO4F7p9AtX/pw==" + }, "node_modules/@vant/use": { "version": "1.5.2", "resolved": "https://registry.npmmirror.com/@vant/use/-/use-1.5.2.tgz", @@ -912,6 +918,11 @@ "resolved": "https://registry.npmmirror.com/@vant/popperjs/-/popperjs-1.3.0.tgz", "integrity": "sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw==" }, + "@vant/touch-emulator": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/@vant/touch-emulator/-/touch-emulator-1.4.0.tgz", + "integrity": "sha512-Zt+zISV0+wpOew2S1siOJ3G22y+hapHAKmXM+FhpvWzsRc4qahaYXatCAITuuXt0EcDp7WvEeTO4F7p9AtX/pw==" + }, "@vant/use": { "version": "1.5.2", "resolved": "https://registry.npmmirror.com/@vant/use/-/use-1.5.2.tgz", diff --git a/package.json b/package.json index d915d6e..a94e844 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "preview": "vite preview" }, "dependencies": { + "@vant/touch-emulator": "^1.4.0", "axios": "^1.3.4", "echarts": "^5.4.3", "moment": "^2.29.4", diff --git a/src/components/LiquidHandle.vue b/src/components/LiquidHandle.vue index 22ded7d..28bc019 100644 --- a/src/components/LiquidHandle.vue +++ b/src/components/LiquidHandle.vue @@ -8,7 +8,7 @@ :clickable="true" :maxlength="4" readonly - @touchstart.stop="numberKeyboardShow = true" + @click.stop="numberKeyboardShow = true" class="add_liquid_input" />

设置加液

diff --git a/src/components/Setting/components/Device.vue b/src/components/Setting/components/Device.vue index 7584a40..7feb188 100644 --- a/src/components/Setting/components/Device.vue +++ b/src/components/Setting/components/Device.vue @@ -10,7 +10,7 @@ :formatter="formatter6" :maxlength="4" readonly - @touchstart.stop="hideClickKey(1)" + @click.stop="hideClickKey(1)" />

设置
@@ -25,7 +25,7 @@ :formatter="formatter7" :maxlength="4" readonly - @touchstart.stop="hideClickKey(2)" + @click.stop="hideClickKey(2)" />

设置
@@ -40,7 +40,7 @@ :formatter="formatter1" :maxlength="4" readonly - @touchstart.stop="hideClickKey(3)" + @click.stop="hideClickKey(3)" />

设置
@@ -55,7 +55,7 @@ :maxlength="4" :formatter="formatter2" readonly - @touchstart.stop="hideClickKey(4)" + @click.stop="hideClickKey(4)" />

设置
@@ -70,7 +70,7 @@ :clickable="true" :maxlength="3" readonly - @touchstart.stop="hideClickKey(5)" + @click.stop="hideClickKey(5)" />

设置
@@ -85,7 +85,7 @@ :clickable="true" :maxlength="3" readonly - @touchstart.stop="hideClickKey(6)" + @click.stop="hideClickKey(6)" />

设置
@@ -100,7 +100,7 @@ :clickable="true" :maxlength="3" readonly - @touchstart.stop="hideClickKey(7)" + @click.stop="hideClickKey(7)" />

设置
@@ -114,7 +114,7 @@ v-model="pre_heat_time_s" :clickable="true" readonly - @touchstart.stop="hideClickKey(8)" + @click.stop="hideClickKey(8)" />

设置
diff --git a/src/components/Test.vue b/src/components/Test.vue index 7d3f87c..3537d9f 100644 --- a/src/components/Test.vue +++ b/src/components/Test.vue @@ -9,7 +9,7 @@ :clickable="true" :formatter="formatter6" readonly - @touchstart.stop="hideAllKeyboards(1)" + @click.stop="hideAllKeyboards(1)" class="add_liquid_input" />

RPM

@@ -21,7 +21,7 @@ :clickable="true" readonly :formatter="formatter" - @touchstart.stop="hideAllKeyboards(2)" + @click.stop="hideAllKeyboards(2)" class="add_liquid_input" />

P

@@ -47,7 +47,7 @@ v-model="addLiquidVal2" :clickable="true" readonly - @touchstart.stop="hideAllKeyboards(3)" + @click.stop="hideAllKeyboards(3)" class="add_liquid_input" />

RPM

@@ -59,7 +59,7 @@ v-model="addLiquidPower2" :clickable="true" readonly - @touchstart.stop="hideAllKeyboards(4)" + @click.stop="hideAllKeyboards(4)" class="add_liquid_input" />

P

diff --git a/src/main.js b/src/main.js index ab0429b..016f9b6 100644 --- a/src/main.js +++ b/src/main.js @@ -12,6 +12,7 @@ import { Toast, Overlay, } from 'vant' +import '@vant/touch-emulator' import 'vant/lib/index.css' import '@/assets/css/reset.css' import './style.scss' diff --git a/yarn.lock b/yarn.lock index 71e758c..ef29cd6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -122,6 +122,11 @@ resolved "https://registry.npmmirror.com/@vant/popperjs/-/popperjs-1.3.0.tgz" integrity sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw== +"@vant/touch-emulator@^1.4.0": + version "1.4.0" + resolved "https://registry.npmmirror.com/@vant/touch-emulator/-/touch-emulator-1.4.0.tgz" + integrity sha512-Zt+zISV0+wpOew2S1siOJ3G22y+hapHAKmXM+FhpvWzsRc4qahaYXatCAITuuXt0EcDp7WvEeTO4F7p9AtX/pw== + "@vant/use@^1.5.1": version "1.5.2" resolved "https://registry.npmmirror.com/@vant/use/-/use-1.5.2.tgz" @@ -356,9 +361,9 @@ form-data@^4.0.0: mime-types "^2.1.12" fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + version "2.3.3" + resolved "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== function-bind@^1.1.1: version "1.1.1"