From 8f6852673a7ab98e147d7eb39299714d41c1be2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=80=E7=82=B9=E7=82=B9?= <251904080@qq.com> Date: Fri, 30 May 2025 17:45:26 +0800 Subject: [PATCH] =?UTF-8?q?FIX:#ICBNYK=20=E7=82=B9=E5=87=BB=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E9=85=8D=E7=BD=AE=EF=BC=8C=E4=BC=9A=E5=8F=91=E9=80=81?= =?UTF-8?q?=E5=A4=9A=E6=AC=A1=E8=8E=B7=E5=8F=96=E5=AD=97=E5=85=B8=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=20bug:=20=E7=82=B9=E5=87=BB=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=EF=BC=8C=E4=BC=9A=E5=8F=91=E9=80=81=E5=A4=9A?= =?UTF-8?q?=E6=AC=A1=E8=8E=B7=E5=8F=96=E5=AD=97=E5=85=B8=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=20https://gitee.com/lab1024/smart-admin/issues/ICBNYK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../support/dict-code-select/index.vue | 14 ++++++++++++-- .../code-generator-table-config-form-field.vue | 12 ++++++++++-- .../support/dict-code-select/index.vue | 16 +++++++++++++--- .../code-generator-table-config-form-field.vue | 12 ++++++++++-- 4 files changed, 45 insertions(+), 9 deletions(-) diff --git a/smart-admin-web-javascript/src/components/support/dict-code-select/index.vue b/smart-admin-web-javascript/src/components/support/dict-code-select/index.vue index e8d1c893..73945036 100644 --- a/smart-admin-web-javascript/src/components/support/dict-code-select/index.vue +++ b/smart-admin-web-javascript/src/components/support/dict-code-select/index.vue @@ -54,17 +54,27 @@ type: Number, default: null, }, + dictList: { + type: Array, + default: null, + }, }); // -------------------------- 查询 字典数据 -------------------------- - const dictList = ref([]); + const dictList = ref(props.dictList || []); async function queryDict() { + if (props.dictList) { + dictList.value = props.dictList; + return; + } let response = await dictApi.getAllDict(); dictList.value = response.data; } - onMounted(queryDict); + if (!props.dictList) { + queryDict(); + } // -------------------------- 选中 相关、事件 -------------------------- const emit = defineEmits(['update:value', 'change']); diff --git a/smart-admin-web-javascript/src/views/support/code-generator/components/form/code-generator-table-config-form-field.vue b/smart-admin-web-javascript/src/views/support/code-generator/components/form/code-generator-table-config-form-field.vue index 8ac2e387..e5cd304b 100644 --- a/smart-admin-web-javascript/src/views/support/code-generator/components/form/code-generator-table-config-form-field.vue +++ b/smart-admin-web-javascript/src/views/support/code-generator/components/form/code-generator-table-config-form-field.vue @@ -68,7 +68,7 @@