Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
1b107fc6
提交
1b107fc6
编写于
12月 13, 2022
作者:
Shine-zwj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新图标组件
上级
e09de7c8
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
112 行增加
和
0 行删除
+112
-0
others.svg
public/assets/img/others.svg
+9
-0
app-register.ts
src/app-register.ts
+2
-0
app-icon.scss
src/components/app-icon/app-icon.scss
+32
-0
app-icon.vue
src/components/app-icon/app-icon.vue
+69
-0
未找到文件。
public/assets/img/others.svg
0 → 100644
浏览文件 @
1b107fc6
<svg
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
fill=
"none"
version=
"1.1"
width=
"30"
height=
"30"
viewBox=
"0 0 30 30"
>
<g
style=
"mix-blend-mode:passthrough"
>
<g
style=
"mix-blend-mode:passthrough"
>
<g
style=
"mix-blend-mode:passthrough"
>
<g
style=
"mix-blend-mode:passthrough"
>
</g>
<g
style=
"mix-blend-mode:passthrough"
>
<path
d=
"M7.5,12.5C6.125,12.5,5,13.625,5,15C5,16.375,6.125,17.5,7.5,17.5C8.875,17.5,10,16.375,10,15C10,13.625,8.875,12.5,7.5,12.5ZM12.5,15C12.5,13.625,13.625,12.5,15,12.5C16.375,12.5,17.5,13.625,17.5,15C17.5,16.375,16.375,17.5,15,17.5C13.625,17.5,12.5,16.375,12.5,15ZM22.5,12.5C21.125,12.5,20,13.625,20,15C20,16.375,21.125,17.5,22.5,17.5C23.875,17.5,25,16.375,25,15C25,13.625,23.875,12.5,22.5,12.5Z"
fill-rule=
"evenodd"
fill=
"#27ACAA"
fill-opacity=
"1"
/>
</g></g></g></g></svg>
\ No newline at end of file
src/app-register.ts
浏览文件 @
1b107fc6
...
...
@@ -14,6 +14,7 @@ import { entityServiceRegister } from '@/service/entity-service-register';
import
{
counterServiceRegister
}
from
'@/counter/counter-service-register'
;
import
{
codeListRegister
}
from
'@codelist/codelist-register'
;
import
{
messageServiceRegister
}
from
'@/message/message-service-register'
;
import
AppIcon
from
'./components/app-icon/app-icon.vue'
import
AppCaption
from
'./components/app-caption/app-caption.vue'
import
AppHelp
from
'./components/app-help/app-help.vue'
import
AppButton
from
'./components/app-button/app-button.vue'
...
...
@@ -179,6 +180,7 @@ export const AppComponents = {
v
.
prototype
.
$verify
=
Verify
;
v
.
prototype
.
$viewTool
=
ViewTool
;
v
.
prototype
.
$uiActionTool
=
UIActionTool
;
v
.
component
(
'app-icon'
,
AppIcon
);
v
.
component
(
'app-caption'
,
AppCaption
);
v
.
component
(
'app-help'
,
AppHelp
);
v
.
component
(
'app-button'
,
AppButton
);
...
...
src/components/app-icon/app-icon.scss
0 → 100644
浏览文件 @
1b107fc6
.app-icon
{
&
.app-icon--normal
{
cursor
:
pointer
;
color
:
var
(
--
app-color-blue-green
)
!
important
;
}
&
.app-icon--disabled
{
cursor
:
no-drop
;
color
:
var
(
--
app-color-gray-200
)
!
important
;
}
}
.app-icon-others
{
.ivu-poptip-inner
{
border-radius
:
0
;
}
.ivu-poptip-body
{
padding
:
0
;
}
.others-item
{
height
:
30px
;
display
:
flex
;
cursor
:
pointer
;
align-items
:
center
;
justify-content
:
center
;
color
:
var
(
--
app-color-gray-100
);
border-bottom
:
1px
solid
var
(
--
app-color-gray-250
);
&
:hover
{
background
:
rgba
(
39
,
172
,
170
,
0
.1
);
color
:
var
(
--
app-color-black
);
box-shadow
:
0px
3px
8px
0px
rgba
(
0
,
0
,
0
,
0
.16
);
}
}
}
\ No newline at end of file
src/components/app-icon/app-icon.vue
0 → 100644
浏览文件 @
1b107fc6
<
template
>
<tooltip
v-if=
"icons.length > 0"
:content=
"icons.length > 1 ? '其他' : icons[0].text"
:class=
"`app-icon $
{disabled ? 'app-icon--disabled' : 'app-icon--normal'}`" placement="top" :disabled="disabled" :transfer="true">
<template
v-if=
"icons.length > 1"
>
<poptip
v-model=
"visible"
trigger=
"hover"
content=
"content"
placement=
"bottom"
:transfer=
"true"
popper-class=
"app-icon-others"
:disabled=
"disabled"
>
<img
src=
"/assets/img/others.svg"
/>
<div
class=
"others"
slot=
"content"
>
<div
v-for=
"(icon, index) in icons"
:key=
"index"
class=
"others-item"
@
click=
"($event) => handleClick(icon, $event)"
>
<span
class=
"icon-text"
>
{{
icon
.
text
}}
</span>
</div>
</div>
</poptip>
</
template
>
<
template
v-else-if=
"icons.length == 1"
>
<img
v-if=
"icons[0].imgPath"
:src=
"icons[0].imgPath"
@
click=
"($event) => handleClick(icons[0], $event)"
/>
<i
v-else-if=
"icons[0].iconClass"
:class=
"icons[0].iconClass"
@
click=
"($event) => handleClick(icons[0], $event)"
></i>
</
template
>
</tooltip>
</template>
<
script
lang=
'ts'
>
import
{
Vue
,
Component
,
Prop
}
from
'vue-property-decorator'
;
@
Component
({})
export
default
class
AppIcon
extends
Vue
{
/**
* 禁用
*
* @type {boolean}
* @memberof AppIcon
*/
@
Prop
({
default
:
false
})
public
disabled
!
:
boolean
;
/**
* 图标集
*
* @type {any[]}
* @memberof AppIcon
*/
@
Prop
({
default
:
()
=>
[]
})
public
icons
!
:
any
[];
/**
* 显示poptip
*
* @type {any[]}
* @memberof AppIcon
*/
public
visible
:
boolean
=
false
;
/**
* 处理点击
*
* @memberof AppIcon
*/
public
handleClick
(
icon
:
any
,
$event
:
MouseEvent
)
{
$event
.
stopPropagation
();
$event
.
preventDefault
();
this
.
visible
=
false
;
if
(
!
this
.
disabled
)
{
this
.
$emit
(
'click'
,
icon
,
$event
);
}
}
}
</
script
>
<
style
lang=
"scss"
>
@import
'./app-icon.scss'
;
</
style
>
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录