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
d05c67ff
authored
Mar 30, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
infra:code review 表单增强
parent
5ca33582
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
src/components/FormCreate/src/useFormCreateDesigner.ts
+3
-3
src/views/infra/build/index.vue
+1
-0
No files found.
src/components/FormCreate/src/useFormCreateDesigner.ts
View file @
d05c67ff
...
...
@@ -14,13 +14,13 @@ export const useFormCreateDesigner = (designer: Ref) => {
const
uploadImgsRule
=
useUploadImgsRule
()
onMounted
(()
=>
{
// 移除自带的上传组件规则
// 移除自带的上传组件规则
,使用 uploadFileRule、uploadImgRule、uploadImgsRule 替代
designer
.
value
?.
removeMenuItem
(
'upload'
)
const
components
=
[
uploadFileRule
,
uploadImgRule
,
uploadImgsRule
]
components
.
forEach
((
component
)
=>
{
//插入组件规则
//
插入组件规则
designer
.
value
?.
addComponent
(
component
)
//
插入拖拽按钮到`main`
分类下
//
插入拖拽按钮到 `main`
分类下
designer
.
value
?.
appendMenuItem
(
'main'
,
{
icon
:
component
.
icon
,
name
:
component
.
name
,
...
...
src/views/infra/build/index.vue
View file @
d05c67ff
...
...
@@ -51,6 +51,7 @@ const dialogTitle = ref('') // 弹窗的标题
const
formType
=
ref
(
-
1
)
// 表单的类型:0 - 生成 JSON;1 - 生成 Options;2 - 生成组件
const
formData
=
ref
(
''
)
// 表单数据
useFormCreateDesigner
(
designer
)
// 表单设计器增强
/** 打开弹窗 */
const
openModel
=
(
title
:
string
)
=>
{
dialogVisible
.
value
=
true
...
...
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