From 199c9951f5bb1f5bbfdb12d2269e4c60ff47904d Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 2 Dec 2025 13:07:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A1=A8=E5=8D=95=E6=9E=84?= =?UTF-8?q?=E5=BB=BA=E7=A7=BB=E9=99=A4=E6=89=80=E6=9C=89=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E5=90=8E=E5=88=87=E6=8D=A2=E8=B7=AF=E7=94=B1=E5=9B=9E=E6=9D=A5?= =?UTF-8?q?=E7=A9=BA=E7=99=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/generator/drawingDefalut.js | 29 --------------------------- src/views/tool/build/index.vue | 11 ++++++---- 2 files changed, 7 insertions(+), 33 deletions(-) delete mode 100644 src/utils/generator/drawingDefalut.js diff --git a/src/utils/generator/drawingDefalut.js b/src/utils/generator/drawingDefalut.js deleted file mode 100644 index 1105c28..0000000 --- a/src/utils/generator/drawingDefalut.js +++ /dev/null @@ -1,29 +0,0 @@ -export default [ - { - layout: 'colFormItem', - tagIcon: 'input', - label: '手机号', - vModel: 'mobile', - formId: 6, - tag: 'el-input', - placeholder: '请输入手机号', - defaultValue: '', - span: 24, - style: { width: '100%' }, - clearable: true, - prepend: '', - append: '', - 'prefix-icon': 'Cellphone', - 'suffix-icon': '', - maxlength: 11, - 'show-word-limit': true, - readonly: false, - disabled: false, - required: true, - changeTag: true, - regList: [{ - pattern: '/^1(3|4|5|7|8|9)\\d{9}$/', - message: '手机号格式错误' - }] - } -] diff --git a/src/views/tool/build/index.vue b/src/views/tool/build/index.vue index 60159b0..870d3d3 100644 --- a/src/views/tool/build/index.vue +++ b/src/views/tool/build/index.vue @@ -102,7 +102,7 @@ import beautifier from 'js-beautify' import logo from '@/assets/logo/logo.png' import { inputComponents, selectComponents, layoutComponents, formConf as formConfData } from '@/utils/generator/config' import { beautifierConf } from '@/utils/index' -import drawingDefalut from '@/utils/generator/drawingDefalut' +import { drawingDefaultValue, initDrawingDefaultValue, cleanDrawingDefaultValue } from '@/utils/generator/drawingDefault' import { makeUpHtml, vueTemplate, vueScript, cssStyle } from '@/utils/generator/html' import { makeUpJs } from '@/utils/generator/js' import { makeUpCss } from '@/utils/generator/css' @@ -113,14 +113,16 @@ import RightPanel from './RightPanel' import CodeTypeDialog from './CodeTypeDialog' import { onMounted, watch } from 'vue' -const drawingList = ref(drawingDefalut) +initDrawingDefaultValue() + +const drawingList = ref(drawingDefaultValue) const { proxy } = getCurrentInstance() const dialogVisible = ref(false) const showFileName = ref(false) const operationType = ref('') const idGlobal = ref(100) -const activeData = ref(drawingDefalut[0]) -const activeId = ref(drawingDefalut[0].formId) +const activeData = ref(drawingDefaultValue[0]) +const activeId = ref(drawingDefaultValue[0].formId) const generateConf = ref(null) const formData = ref({}) const formConf = ref(formConfData) @@ -145,6 +147,7 @@ function empty() { proxy.$modal.confirm('确定要清空所有组件吗?', '提示', { type: 'warning' }).then(() => { idGlobal.value = 100 drawingList.value = [] + cleanDrawingDefaultValue() } ) }