Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cocktail-party-server
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
cocktail-party
cocktail-party-server
Commits
4eea8cdb
提交
4eea8cdb
authored
3月 18, 2023
作者:
刘元博
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化选择图标组件
上级
cfce89be
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
70 行增加
和
71 行删除
+70
-71
index.vue
ruoyi-ui/src/components/IconSelect/index.vue
+68
-68
index.vue
ruoyi-ui/src/views/system/menu/index.vue
+2
-3
没有找到文件。
ruoyi-ui/src/components/IconSelect/index.vue
浏览文件 @
4eea8cdb
<!-- @author zhengjie -->
<!-- @author zhengjie -->
<
template
>
<
template
>
<div
class=
"icon-body"
>
<div
class=
"icon-body"
>
<el-input
v-model=
"name"
style=
"position: relative;"
clearable
placeholder=
"请输入图标名称"
@
clear=
"filterIcons"
@
input
.
native=
"filterIcons"
>
<el-input
v-model=
"name"
style=
"position: relative;"
clearable
placeholder=
"请输入图标名称"
@
clear=
"filterIcons"
@
input
=
"filterIcons"
>
<i
slot=
"suffix"
class=
"el-icon-search el-input__icon"
/>
<i
slot=
"suffix"
class=
"el-icon-search el-input__icon"
/>
</el-input>
</el-input>
<div
class=
"icon-list"
>
<div
class=
"icon-list"
>
<div
v-for=
"(item, index) in iconList"
:key=
"index"
@
click=
"selectedIcon(item)"
>
<div
v-for=
"(item, index) in iconList"
:key=
"index"
@
click=
"selectedIcon(item)"
>
<svg-icon
:icon-class=
"item"
style=
"height: 30px;width: 16px;"
/>
<svg-icon
:icon-class=
"item"
style=
"height: 30px;width: 16px;"
/>
<span>
{{
item
}}
</span>
<span>
{{
item
}}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
icons
from
'./requireIcons'
import
icons
from
'./requireIcons'
export
default
{
export
default
{
name
:
'IconSelect'
,
name
:
'IconSelect'
,
data
()
{
data
()
{
return
{
return
{
name
:
''
,
name
:
''
,
iconList
:
icons
iconList
:
icons
}
}
},
},
methods
:
{
methods
:
{
filterIcons
()
{
filterIcons
()
{
this
.
iconList
=
icons
this
.
iconList
=
icons
if
(
this
.
name
)
{
if
(
this
.
name
)
{
this
.
iconList
=
this
.
iconList
.
filter
(
item
=>
item
.
includes
(
this
.
name
))
this
.
iconList
=
this
.
iconList
.
filter
(
item
=>
item
.
includes
(
this
.
name
))
}
}
},
},
selectedIcon
(
name
)
{
selectedIcon
(
name
)
{
this
.
$emit
(
'selected'
,
name
)
this
.
$emit
(
'selected'
,
name
)
document
.
body
.
click
()
document
.
body
.
click
()
},
},
reset
()
{
reset
()
{
this
.
name
=
''
this
.
name
=
''
this
.
iconList
=
icons
this
.
iconList
=
icons
}
}
}
}
}
}
</
script
>
</
script
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
<
style
rel=
"stylesheet/scss"
lang=
"scss"
scoped
>
.icon-body
{
.icon-body
{
width
:
100%
;
width
:
100%
;
padding
:
10px
;
padding
:
10px
;
.icon-list
{
.icon-list
{
height
:
200px
;
height
:
200px
;
overflow-y
:
scroll
;
overflow-y
:
scroll
;
div
{
div
{
height
:
30px
;
height
:
30px
;
line-height
:
30px
;
line-height
:
30px
;
margin-bottom
:
-5px
;
margin-bottom
:
-5px
;
cursor
:
pointer
;
cursor
:
pointer
;
width
:
33%
;
width
:
33%
;
float
:
left
;
float
:
left
;
}
}
span
{
span
{
display
:
inline-block
;
display
:
inline-block
;
vertical-align
:
-0
.15em
;
vertical-align
:
-0
.15em
;
fill
:
currentColor
;
fill
:
currentColor
;
overflow
:
hidden
;
overflow
:
hidden
;
}
}
}
}
}
}
</
style
>
</
style
>
ruoyi-ui/src/views/system/menu/index.vue
浏览文件 @
4eea8cdb
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
<el-button
size=
"mini"
size=
"mini"
type=
"text"
type=
"text"
icon=
"el-icon-edit"
icon=
"el-icon-edit"
...
@@ -140,8 +140,7 @@
...
@@ -140,8 +140,7 @@
v-if=
"form.icon"
v-if=
"form.icon"
slot=
"prefix"
slot=
"prefix"
:icon-class=
"form.icon"
:icon-class=
"form.icon"
class=
"el-input__icon"
style=
"width: 25px;"
style=
"height: 32px;width: 16px;"
/>
/>
<i
v-else
slot=
"prefix"
class=
"el-icon-search el-input__icon"
/>
<i
v-else
slot=
"prefix"
class=
"el-icon-search el-input__icon"
/>
</el-input>
</el-input>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论