Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0222eef6
authored
May 06, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【优化】全局:动态表单的注释、error log 打印
parent
41cbabcf
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
3 deletions
+5
-3
src/components/FormCreate/src/components/useApiSelect.tsx
+1
-1
src/components/FormCreate/src/config/useSelectRule.ts
+1
-0
src/plugins/formCreate/index.ts
+1
-0
src/utils/index.ts
+2
-2
No files found.
src/components/FormCreate/src/components/useApiSelect.tsx
View file @
0222eef6
...
@@ -69,7 +69,7 @@ export const useApiSelect = (option: ApiSelectProps) => {
...
@@ -69,7 +69,7 @@ export const useApiSelect = (option: ApiSelectProps) => {
}))
}))
return
return
}
}
console
.
log
(
`接口[
${
props
.
url
}
] 返回结果不是一个数组`
)
console
.
error
(
`接口[
${
props
.
url
}
] 返回结果不是一个数组`
)
}
}
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
...
...
src/components/FormCreate/src/config/useSelectRule.ts
View file @
0222eef6
...
@@ -5,6 +5,7 @@ import { SelectRuleOption } from '@/components/FormCreate/src/type'
...
@@ -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
)
=>
{
...
...
src/plugins/formCreate/index.ts
View file @
0222eef6
...
@@ -17,6 +17,7 @@ import {
...
@@ -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'
...
...
src/utils/index.ts
View file @
0222eef6
import
{
toNumber
}
from
'lodash-es'
import
{
toNumber
}
from
'lodash-es'
/**
/**
*
*
...
@@ -445,7 +445,7 @@ export function jsonParse(str: string) {
...
@@ -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
''
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment