From 49cbdc51d9736c355b35dc5d354a0d3b134d1d60 Mon Sep 17 00:00:00 2001 From: SikongJueluo Date: Tue, 15 Jul 2025 11:30:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=9A=E4=B8=AA?= =?UTF-8?q?=E5=A4=96=E8=AE=BE=E6=97=A0=E6=B3=95=E8=AE=A4=E8=AF=81=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20refactor:=20=E5=90=8C=E6=97=B6=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E6=9B=B4=E5=8A=A0=E4=BC=98=E9=9B=85=E7=9A=84=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E5=A4=84=E7=90=86injection?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Alert/Alert.vue | 5 +- .../LogicAnalyzer/LogicAnalyzerManager.ts | 0 .../equipments/DDSPropertyEditor.vue | 115 +++++++++++++----- src/stores/equipments.ts | 78 +++++++----- src/utils/BoardManager.ts | 10 +- src/utils/Common.ts | 60 ++++++--- 6 files changed, 184 insertions(+), 84 deletions(-) create mode 100644 src/components/LogicAnalyzer/LogicAnalyzerManager.ts diff --git a/src/components/Alert/Alert.vue b/src/components/Alert/Alert.vue index 2693e9e..74f0cf6 100644 --- a/src/components/Alert/Alert.vue +++ b/src/components/Alert/Alert.vue @@ -48,14 +48,15 @@ import { computed } from "vue"; import { CheckCircle, XCircle, AlertTriangle, Info, X } from "lucide-vue-next"; import { useAlertStore } from "."; +import { useRequiredInjection } from "@/utils/Common"; -const alertStore = useAlertStore(); +const alertStore = useRequiredInjection(useAlertStore); // Computed classes for different alert types const alertClasses = computed(() => { const baseClasses = "shadow-lg max-w-sm"; - switch (alertStore?.alertState.value.type) { + switch (alertStore.alertState.value.type) { case "success": return `${baseClasses} alert-success`; case "error": diff --git a/src/components/LogicAnalyzer/LogicAnalyzerManager.ts b/src/components/LogicAnalyzer/LogicAnalyzerManager.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/components/equipments/DDSPropertyEditor.vue b/src/components/equipments/DDSPropertyEditor.vue index 1586005..937ac17 100644 --- a/src/components/equipments/DDSPropertyEditor.vue +++ b/src/components/equipments/DDSPropertyEditor.vue @@ -7,7 +7,12 @@
- + @@ -16,7 +21,13 @@ φ: {{ phase }}° - + {{ displayTimebase }} @@ -35,10 +46,15 @@
-
+
{{ name }}
@@ -51,8 +67,13 @@ - + @@ -63,8 +84,13 @@ 相位:
- +
@@ -75,9 +101,12 @@
自定义波形
- + @keyup.enter="applyCustomWaveform" + /> @@ -86,17 +115,26 @@
示例函数:
- - -
@@ -105,8 +143,16 @@
波形绘制
- +
-