From 5ee06b380cfac0bd3d224efa0938e7d2fa0185e2 Mon Sep 17 00:00:00 2001 From: fangxiang Date: Mon, 11 Jul 2022 17:38:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E7=BF=BB=E8=AF=91.=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E8=87=AA=E5=8A=A8=E8=8E=B7=E5=8F=96IP=E6=97=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=BD=93=E5=89=8D=E8=AE=BE=E5=A4=87=E7=9A=84?= =?UTF-8?q?=E7=BD=91=E7=BB=9C=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 - src/App.vue | 31 +++++++------------- src/components/BackgroundImageDialog.vue | 1 + src/components/GridSettingDialog.vue | 4 +-- src/components/SignalSourceDialog.vue | 30 +++++++++++++++---- src/components/SystemSettingDialog.vue | 17 +++++++++-- src/components/UpgradeDialog.vue | 2 +- src/i18n/en-US/index.ts | 37 ++++++++++++++++++++++-- src/i18n/zh-CN/index.ts | 4 +-- yarn.lock | 24 ++------------- 10 files changed, 90 insertions(+), 61 deletions(-) diff --git a/package.json b/package.json index 35e3444..edf1282 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ "ts-md5": "^1.2.11", "update": "^0.7.4", "v-viewer": "^3.0.9", - "vconsole": "^3.14.6", "vue": "^3.0.0", "vue-i18n": "^9.1.9", "vue-router": "^4.0.0", diff --git a/src/App.vue b/src/App.vue index b7c4e1a..bfce0c9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -12,15 +12,6 @@ import { useI18n } from "vue-i18n"; import EventBus, { EventNamesDefine } from "src/common/EventBus"; import { useStore } from "src/store"; -import VConsole from "vconsole"; - -// 根据条件加载 vConsole -{ - if (window.location.href.indexOf("__showDebug__=_1025_") != -1) { - new VConsole(); - } -} - export default defineComponent({ name: "App", @@ -59,19 +50,17 @@ export default defineComponent({ } try { - { - const user_search = (window).user_search || {}; - if (typeof user_search == "object") { - $store.commit( - "setAvancedDebug", - typeof user_search["debug"] != "undefined" - ); + const user_search = (window).user_search || {}; + if (typeof user_search == "object") { + $store.commit( + "setAvancedDebug", + typeof user_search["debug"] != "undefined" + ); - $store.commit( - "setFactoryMode", - typeof user_search["factory"] != "undefined" - ); - } + $store.commit( + "setFactoryMode", + typeof user_search["factory"] != "undefined" + ); } } catch (e) { console.log(e); diff --git a/src/components/BackgroundImageDialog.vue b/src/components/BackgroundImageDialog.vue index 2460771..31c82a3 100644 --- a/src/components/BackgroundImageDialog.vue +++ b/src/components/BackgroundImageDialog.vue @@ -65,6 +65,7 @@ @@ -55,7 +55,7 @@ diff --git a/src/components/SignalSourceDialog.vue b/src/components/SignalSourceDialog.vue index 9f66ab8..69a82a3 100644 --- a/src/components/SignalSourceDialog.vue +++ b/src/components/SignalSourceDialog.vue @@ -12,7 +12,7 @@ " > - +
@@ -175,12 +175,12 @@ media_url_label.startsWith($t('file path')) ? $t('dbclick select file') : media_url_label.startsWith($t('clock')) - ? $t('dbclick config') + $t('clock') + ? $t('dbclick config ') + $t('clock') : media_url_label.startsWith($t('weather')) - ? $t('dbclick config') + $t('weather') + ? $t('dbclick config ') + $t('weather') : media_url_label.startsWith($t('timer')) - ? $t('dbclick config') + $t('timer') - : $t('please input') + + ? $t('dbclick config ') + $t('timer') + : $t('please input ') + media_url_label.substr(0, media_url_label.length - 1) " lazy-rules @@ -189,7 +189,19 @@ (val && val.length > 0) || $t('Please type something') + ',' + - $t('dbclick select file'), + (media_url_label.startsWith($t('file path')) + ? $t('dbclick select file') + : media_url_label.startsWith($t('clock')) + ? $t('dbclick config ') + $t('clock') + : media_url_label.startsWith($t('weather')) + ? $t('dbclick config ') + $t('weather') + : media_url_label.startsWith($t('timer')) + ? $t('dbclick config ') + $t('timer') + : $t('please input ') + + media_url_label.substr( + 0, + media_url_label.length - 1 + )), ]" @keydown=" (evt) => { @@ -360,6 +372,7 @@ export default defineComponent({ let weather_dialog: any = ref(null); let timer_dialog: any = ref(null); let file_manage_dialog: any = ref(null); + const signal_source_form: any = ref(null); let suppored_window_types = new Set([ "EwindowType::Multimedia", @@ -603,6 +616,8 @@ export default defineComponent({ weather_dialog, timer_dialog, file_manage_dialog, + signal_source_form, + showDialog(options: any) { if (options) { type.value = options.type ?? 1; @@ -635,6 +650,9 @@ export default defineComponent({ return node.is_group && !node.item_data?.system_default; }, onSelected(value: any) { + if (signal_source_form.value) { + signal_source_form.value.resetValidation(); + } setMediaUrlLabel(value as string); }, async onSubmit() { diff --git a/src/components/SystemSettingDialog.vue b/src/components/SystemSettingDialog.vue index 00ba7c4..3793df9 100644 --- a/src/components/SystemSettingDialog.vue +++ b/src/components/SystemSettingDialog.vue @@ -83,6 +83,7 @@ - + {{ $t("ip address") + ":" }} @@ -131,7 +135,10 @@ /> - + {{ $t("gateway") + ":" }} @@ -153,7 +160,10 @@ /> - + {{ $t("netmask") + ":" }} @@ -961,6 +971,7 @@ diff --git a/src/components/UpgradeDialog.vue b/src/components/UpgradeDialog.vue index 4029d29..a7be73d 100644 --- a/src/components/UpgradeDialog.vue +++ b/src/components/UpgradeDialog.vue @@ -44,7 +44,7 @@