From 0222eef6b5e6f736888b783a7f1b3872bbeae33e Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 6 May 2024 22:51:26 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=E5=85=A8?= =?UTF-8?q?=E5=B1=80=EF=BC=9A=E5=8A=A8=E6=80=81=E8=A1=A8=E5=8D=95=E7=9A=84?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E3=80=81error=20log=20=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FormCreate/src/components/useApiSelect.tsx | 2 +- src/components/FormCreate/src/config/useSelectRule.ts | 1 + src/plugins/formCreate/index.ts | 1 + src/utils/index.ts | 4 ++-- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/FormCreate/src/components/useApiSelect.tsx b/src/components/FormCreate/src/components/useApiSelect.tsx index 54c0a33b..a67e6f68 100644 --- a/src/components/FormCreate/src/components/useApiSelect.tsx +++ b/src/components/FormCreate/src/components/useApiSelect.tsx @@ -69,7 +69,7 @@ export const useApiSelect = (option: ApiSelectProps) => { })) return } - console.log(`接口[${props.url}] 返回结果不是一个数组`) + console.error(`接口[${props.url}] 返回结果不是一个数组`) } onMounted(async () => { diff --git a/src/components/FormCreate/src/config/useSelectRule.ts b/src/components/FormCreate/src/config/useSelectRule.ts index 732c5269..bf20588d 100644 --- a/src/components/FormCreate/src/config/useSelectRule.ts +++ b/src/components/FormCreate/src/config/useSelectRule.ts @@ -5,6 +5,7 @@ import { SelectRuleOption } from '@/components/FormCreate/src/type' /** * 通用选择器规则 hook + * * @param option 规则配置 */ export const useSelectRule = (option: SelectRuleOption) => { diff --git a/src/plugins/formCreate/index.ts b/src/plugins/formCreate/index.ts index adc12136..44556de5 100644 --- a/src/plugins/formCreate/index.ts +++ b/src/plugins/formCreate/index.ts @@ -17,6 +17,7 @@ import { import FcDesigner from '@form-create/designer' import formCreate from '@form-create/element-ui' import install from '@form-create/element-ui/auto-import' + //======================= 自定义组件 ======================= import { UploadFile, UploadImg, UploadImgs } from '@/components/UploadFile' import { useApiSelect } from '@/components/FormCreate' diff --git a/src/utils/index.ts b/src/utils/index.ts index 5b29e41a..2590bce8 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,4 +1,4 @@ -import {toNumber} from 'lodash-es' +import { toNumber } from 'lodash-es' /** * @@ -445,7 +445,7 @@ export function jsonParse(str: string) { try { return JSON.parse(str) } catch (e) { - console.log(`str[${str}] 不是一个 JSON 字符串`) + console.error(`str[${str}] 不是一个 JSON 字符串`) return '' } }