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
9f704fb8
authored
May 06, 2024
by
puhui999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
form-create: 字体图标扩展
parent
7c158af3
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
4 deletions
+37
-4
src/components/FormCreate/src/config/useDictSelectRule.ts
+1
-1
src/components/FormCreate/src/config/useSelectRule.ts
+1
-1
src/components/FormCreate/src/type/index.ts
+1
-0
src/components/FormCreate/src/useFormCreateDesigner.ts
+11
-2
src/styles/FormCreate/fonts/fontello.woff
+0
-0
src/styles/FormCreate/index.scss
+22
-0
src/styles/index.scss
+1
-0
No files found.
src/components/FormCreate/src/config/useDictSelectRule.ts
View file @
9f704fb8
...
@@ -22,7 +22,7 @@ export const useDictSelectRule = () => {
...
@@ -22,7 +22,7 @@ export const useDictSelectRule = () => {
}))
??
[]
}))
??
[]
})
})
return
{
return
{
icon
:
'icon-
selec
t'
,
icon
:
'icon-
doc-tex
t'
,
label
,
label
,
name
,
name
,
rule
()
{
rule
()
{
...
...
src/components/FormCreate/src/config/useSelectRule.ts
View file @
9f704fb8
...
@@ -11,7 +11,7 @@ export const useSelectRule = (option: SelectRuleOption) => {
...
@@ -11,7 +11,7 @@ export const useSelectRule = (option: SelectRuleOption) => {
const
label
=
option
.
label
const
label
=
option
.
label
const
name
=
option
.
name
const
name
=
option
.
name
return
{
return
{
icon
:
'icon-select'
,
icon
:
option
.
icon
,
label
,
label
,
name
,
name
,
rule
()
{
rule
()
{
...
...
src/components/FormCreate/src/type/index.ts
View file @
9f704fb8
...
@@ -45,5 +45,6 @@ export interface ApiSelectProps {
...
@@ -45,5 +45,6 @@ export interface ApiSelectProps {
export
interface
SelectRuleOption
{
export
interface
SelectRuleOption
{
label
:
string
// label 名称
label
:
string
// label 名称
name
:
string
// 组件名称
name
:
string
// 组件名称
icon
:
string
// 组件图标
props
?:
any
[]
// 组件规则
props
?:
any
[]
// 组件规则
}
}
src/components/FormCreate/src/useFormCreateDesigner.ts
View file @
9f704fb8
...
@@ -48,12 +48,21 @@ export const useFormCreateDesigner = async (designer: Ref) => {
...
@@ -48,12 +48,21 @@ export const useFormCreateDesigner = async (designer: Ref) => {
})
})
}
}
const
userSelectRule
=
useSelectRule
({
name
:
'UserSelect'
,
label
:
'用户选择器'
})
const
userSelectRule
=
useSelectRule
({
const
deptSelectRule
=
useSelectRule
({
name
:
'DeptSelect'
,
label
:
'部门选择器'
})
name
:
'UserSelect'
,
label
:
'用户选择器'
,
icon
:
'icon-user-o'
})
const
deptSelectRule
=
useSelectRule
({
name
:
'DeptSelect'
,
label
:
'部门选择器'
,
icon
:
'icon-address-card-o'
})
const
dictSelectRule
=
useDictSelectRule
()
const
dictSelectRule
=
useDictSelectRule
()
const
apiSelectRule0
=
useSelectRule
({
const
apiSelectRule0
=
useSelectRule
({
name
:
'ApiSelect'
,
name
:
'ApiSelect'
,
label
:
'接口选择器'
,
label
:
'接口选择器'
,
icon
:
'icon-server'
,
props
:
[...
apiSelectRule
]
props
:
[...
apiSelectRule
]
})
})
...
...
src/styles/FormCreate/fonts/fontello.woff
0 → 100644
View file @
9f704fb8
File added
src/styles/FormCreate/index.scss
0 → 100644
View file @
9f704fb8
// 使用字体图标来源 https://fontello.com/
@font-face
{
font-family
:
'fc-icon'
;
src
:
url('@/styles/FormCreate/fonts/fontello.woff')
format
(
'woff'
);
}
.icon-doc-text
:before
{
content
:
'\f0f6'
;
}
.icon-server
:before
{
content
:
'\f233'
;
}
.icon-address-card-o
:before
{
content
:
'\f2bc'
;
}
.icon-user-o
:before
{
content
:
'\f2c0'
;
}
src/styles/index.scss
View file @
9f704fb8
@import
'./var.css'
;
@import
'./var.css'
;
@import
'./FormCreate/index.scss'
;
@import
'element-plus/theme-chalk/dark/css-vars.css'
;
@import
'element-plus/theme-chalk/dark/css-vars.css'
;
.reset-margin
[
class
*=
'el-icon'
]
+
span
{
.reset-margin
[
class
*=
'el-icon'
]
+
span
{
...
...
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