【优化】全局:动态表单的注释、error log 打印
This commit is contained in:
parent
41cbabcf88
commit
0222eef6b5
@ -69,7 +69,7 @@ export const useApiSelect = (option: ApiSelectProps) => {
|
|||||||
}))
|
}))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log(`接口[${props.url}] 返回结果不是一个数组`)
|
console.error(`接口[${props.url}] 返回结果不是一个数组`)
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
@ -5,6 +5,7 @@ import { SelectRuleOption } from '@/components/FormCreate/src/type'
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用选择器规则 hook
|
* 通用选择器规则 hook
|
||||||
|
*
|
||||||
* @param option 规则配置
|
* @param option 规则配置
|
||||||
*/
|
*/
|
||||||
export const useSelectRule = (option: SelectRuleOption) => {
|
export const useSelectRule = (option: SelectRuleOption) => {
|
||||||
|
@ -17,6 +17,7 @@ import {
|
|||||||
import FcDesigner from '@form-create/designer'
|
import FcDesigner from '@form-create/designer'
|
||||||
import formCreate from '@form-create/element-ui'
|
import formCreate from '@form-create/element-ui'
|
||||||
import install from '@form-create/element-ui/auto-import'
|
import install from '@form-create/element-ui/auto-import'
|
||||||
|
|
||||||
//======================= 自定义组件 =======================
|
//======================= 自定义组件 =======================
|
||||||
import { UploadFile, UploadImg, UploadImgs } from '@/components/UploadFile'
|
import { UploadFile, UploadImg, UploadImgs } from '@/components/UploadFile'
|
||||||
import { useApiSelect } from '@/components/FormCreate'
|
import { useApiSelect } from '@/components/FormCreate'
|
||||||
|
@ -445,7 +445,7 @@ export function jsonParse(str: string) {
|
|||||||
try {
|
try {
|
||||||
return JSON.parse(str)
|
return JSON.parse(str)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(`str[${str}] 不是一个 JSON 字符串`)
|
console.error(`str[${str}] 不是一个 JSON 字符串`)
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user