From 59ee88ac19d0a11a9ab50fe4bf59e7f01c10d5a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=95=E9=87=91=E6=B3=BD?= <1098696801@qq.com> Date: Thu, 9 Jun 2022 21:43:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20magic-import=20=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E4=B8=BA=E6=96=B9=E6=B3=95=E6=97=B6=20import=20?= =?UTF-8?q?=E5=80=BC=E4=B8=BA=20undefine=E9=97=AE=E9=A2=98=20=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E7=94=9F=E6=88=90=20=E6=95=B0=E6=8D=AE=E6=BA=90?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=20=E5=A6=82=E6=9E=9C=E4=B8=BAnull=20?= =?UTF-8?q?=E5=B0=B1=E8=BD=AC=E6=8D=A2=E4=B8=BA=20=E7=A9=BA=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- magic-boot-ui/src/scripts/magic-import.js | 3 +++ magic-boot-ui/src/views/lowcode/code-gen-form.vue | 1 + 2 files changed, 4 insertions(+) diff --git a/magic-boot-ui/src/scripts/magic-import.js b/magic-boot-ui/src/scripts/magic-import.js index b6f6ec3..62f9464 100644 --- a/magic-boot-ui/src/scripts/magic-import.js +++ b/magic-boot-ui/src/scripts/magic-import.js @@ -6,5 +6,8 @@ const libs = { 'element-plus': ElementPlus } window.___magic__import__ = function(lib, name){ + if(typeof(libs[lib]) == 'function'){ + return libs[lib] + } return (libs[lib] || {})[name] } diff --git a/magic-boot-ui/src/views/lowcode/code-gen-form.vue b/magic-boot-ui/src/views/lowcode/code-gen-form.vue index d42aded..1ab08fb 100644 --- a/magic-boot-ui/src/views/lowcode/code-gen-form.vue +++ b/magic-boot-ui/src/views/lowcode/code-gen-form.vue @@ -403,6 +403,7 @@ import {reactive, ref, watch, getCurrentInstance, onMounted, nextTick} from 'vue function getDetail(id){ proxy.$get('/system/code/gen/get', { id: id }).then(res => { var formData = {...res.data} + formData.datasource = formData.datasource || '' formData.info = JSON.parse(formData.info) formData.columns = JSON.parse(formData.columns) genInfo.value = formData