Skip to content

Commit 0222eef

Browse files
committed
【优化】全局:动态表单的注释、error log 打印
1 parent 41cbabc commit 0222eef

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

src/components/FormCreate/src/components/useApiSelect.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export const useApiSelect = (option: ApiSelectProps) => {
6969
}))
7070
return
7171
}
72-
console.log(`接口[${props.url}] 返回结果不是一个数组`)
72+
console.error(`接口[${props.url}] 返回结果不是一个数组`)
7373
}
7474

7575
onMounted(async () => {

src/components/FormCreate/src/config/useSelectRule.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { SelectRuleOption } from '@/components/FormCreate/src/type'
55

66
/**
77
* 通用选择器规则 hook
8+
*
89
* @param option 规则配置
910
*/
1011
export const useSelectRule = (option: SelectRuleOption) => {

src/plugins/formCreate/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
import FcDesigner from '@form-create/designer'
1818
import formCreate from '@form-create/element-ui'
1919
import install from '@form-create/element-ui/auto-import'
20+
2021
//======================= 自定义组件 =======================
2122
import { UploadFile, UploadImg, UploadImgs } from '@/components/UploadFile'
2223
import { useApiSelect } from '@/components/FormCreate'

src/utils/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {toNumber} from 'lodash-es'
1+
import { toNumber } from 'lodash-es'
22

33
/**
44
*
@@ -445,7 +445,7 @@ export function jsonParse(str: string) {
445445
try {
446446
return JSON.parse(str)
447447
} catch (e) {
448-
console.log(`str[${str}] 不是一个 JSON 字符串`)
448+
console.error(`str[${str}] 不是一个 JSON 字符串`)
449449
return ''
450450
}
451451
}

0 commit comments

Comments
 (0)