mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2025-01-19 03:52:50 +08:00
修复 magic-import 类型为方法时 import 值为 undefine问题
代码生成 数据源字段 如果为null 就转换为 空字符串
This commit is contained in:
parent
84b7b0ece1
commit
59ee88ac19
@ -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]
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user