From 67aca76bc8d1a3115d9f2dd7406664b0574aba5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=87=A4=E5=90=89?= Date: Sat, 5 Jul 2025 16:58:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BA=8C=E3=80=81=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E6=9D=83=E9=99=90=E8=AF=B4=E6=98=8E=20=20=20=20=20=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=91=98=E7=94=A8=E6=88=B7=EF=BC=9A=E5=85=B7=E5=A4=87?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=86=85=E6=89=80=E6=9C=89=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=92=8C=E6=93=8D=E4=BD=9C=E6=9D=83=E9=99=90=E3=80=82=20=20=20?= =?UTF-8?q?=20=20=E6=99=AE=E9=80=9A=E7=94=A8=E6=88=B7=EF=BC=9A=20=20=20=20?= =?UTF-8?q?=202.1=E9=85=8D=E6=96=B9=E9=A1=B5=20=20=20=20=20=E5=8F=AA?= =?UTF-8?q?=E5=8F=AF=E9=A2=84=E8=A7=88=E9=85=8D=E6=96=B9=E3=80=81=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=E9=85=8D=E6=96=B9=EF=BC=8C=E4=B8=8D=E5=8F=AF=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E3=80=81=E5=88=A0=E9=99=A4=E9=85=8D=E6=96=B9=E3=80=82?= =?UTF-8?q?=20=20=20=20=202.2=E6=B5=8B=E8=AF=95=E9=A1=B5=20=20=20=20=20?= =?UTF-8?q?=E6=97=A0=E6=9D=83=E9=99=90=E5=B9=B6=E9=9A=90=E8=97=8F=E3=80=82?= =?UTF-8?q?=20=20=20=20=202.3=E5=AE=A1=E8=AE=A1=E9=A1=B5=20=20=20=20=20?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E8=AE=B0=E5=BD=95=E9=80=89=E9=A1=B9=EF=BC=8C?= =?UTF-8?q?=E5=8F=AF=E6=9F=A5=E7=9C=8B=E6=B6=88=E6=AF=92=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E3=80=81=E5=AF=BC=E5=87=BA=E3=80=81=E6=89=93=E5=8D=B0=E3=80=81?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E8=AF=A6=E6=83=85=E3=80=82=20=20=20=20=20?= =?UTF-8?q?=E6=B6=88=E6=AF=92=E8=AE=B0=E5=BD=95=E9=80=89=E9=A1=B9=EF=BC=8C?= =?UTF-8?q?=E6=97=A0=E6=9D=83=E9=99=90=E5=B9=B6=E9=9A=90=E8=97=8F=E3=80=82?= =?UTF-8?q?=20=20=20=20=202.4=E8=AE=BE=E7=BD=AE=E9=A1=B5=20=20=20=20=20?= =?UTF-8?q?=E6=B6=88=E6=AF=92=E9=BB=98=E8=AE=A4=E9=85=8D=E7=BD=AE=E9=80=89?= =?UTF-8?q?=E9=A1=B9=EF=BC=9A=E4=BB=85=E6=9F=A5=E7=9C=8B=E3=80=82=20=20=20?= =?UTF-8?q?=20=20=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86=E9=80=89=E9=A1=B9?= =?UTF-8?q?=EF=BC=9A=E4=BB=85=E5=85=81=E8=AE=B8=E6=9F=A5=E7=9C=8B=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=BF=AE=E6=94=B9=E6=9C=AC=E4=BA=BA=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E3=80=82=20=20=20=20=20=E6=97=A5=E6=9C=9F=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=80=89=E9=A1=B9=EF=BC=9A=E6=97=A0=E6=9D=83=E9=99=90=E5=B9=B6?= =?UTF-8?q?=E9=9A=90=E8=97=8F=E3=80=82=20=20=20=20=20=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=80=89=E9=A1=B9=EF=BC=9A=E4=BB=85=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/formula/FormulaConfig.vue | 18 ++- src/components/formula/FormulaTable.vue | 4 +- src/components/setting/User.vue | 6 +- src/layouts/default.vue | 6 +- src/router/index.ts | 5 +- src/router/routes.ts | 257 ++++++++++++++----------------- src/stores/settingStore.ts | 2 +- src/views/audit/index.vue | 8 +- src/views/formula/index.vue | 6 +- src/views/setting/index.vue | 8 +- 10 files changed, 162 insertions(+), 158 deletions(-) diff --git a/src/components/formula/FormulaConfig.vue b/src/components/formula/FormulaConfig.vue index c7037a1..eb02c4f 100644 --- a/src/components/formula/FormulaConfig.vue +++ b/src/components/formula/FormulaConfig.vue @@ -22,6 +22,7 @@ import { useFormulaStore } from '@/stores/formulaStore' const props = defineProps<{ type: string formulaNameVisible: boolean + editable?: boolean }>() const homeStore = useHomeStore() @@ -415,6 +416,19 @@ const addFormula = async () => { defineExpose({ addFormula, }) +const isDisabled = computed(() => { + console.log('112223344', props.editable) + // 如果editable显式传了false,则禁用 + if (props.editable === false) { + return true + } + // 如果editable显式传了true,则始终可编辑 + if (props.editable === true) { + return false + } + // 如果没传editable,沿用旧逻辑 + return props.type === 'home' +})