From d5ed1dd461c1557ff1bd1bde69ea50b9f00e4ff6 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Wed, 19 Jul 2023 17:32:53 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/generate/components/structure.vue | 14 +++++++++++ .../Develop/views/schema/steps/structure.vue | 24 +------------------ 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/modules/Develop/views/generate/components/structure.vue b/modules/Develop/views/generate/components/structure.vue index a6e3bfb..80dd051 100644 --- a/modules/Develop/views/generate/components/structure.vue +++ b/modules/Develop/views/generate/components/structure.vue @@ -60,6 +60,20 @@ import { Delete } from '@element-plus/icons-vue' const generateStore = useGenerateStore() const structures = computed(() => { + generateStore.getStructures.forEach(struct => { + if (struct.field === 'id' || struct.field === 'created_at' || struct.field === 'updated_at') { + struct.form = false + } + + if (struct.field === 'sort') { + struct.form_component = 'input-number' + } + + if (struct.field === 'status') { + struct.form_component = 'select' + } + }) + return generateStore.getStructures }) diff --git a/modules/Develop/views/schema/steps/structure.vue b/modules/Develop/views/schema/steps/structure.vue index 9b9237f..b7672d6 100644 --- a/modules/Develop/views/schema/steps/structure.vue +++ b/modules/Develop/views/schema/steps/structure.vue @@ -88,14 +88,13 @@