Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-vue-admin
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-vue-admin
Commits
6dd7d0f9
Unverified
提交
6dd7d0f9
authored
4月 13, 2021
作者:
LiuYa
提交者:
GitHub
4月 13, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: add spin prop for Icon (#477)
Co-authored-by: 刘亚 <liuya54892@outlook.com>
上级
021c6364
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
22 行增加
和
3 行删除
+22
-3
SvgIcon.vue
src/components/Icon/src/SvgIcon.vue
+13
-1
index.vue
src/components/Icon/src/index.vue
+9
-2
没有找到文件。
src/components/Icon/src/SvgIcon.vue
浏览文件 @
6dd7d0f9
<
template
>
<
template
>
<svg
:class=
"[prefixCls, $attrs.class]"
:style=
"getStyle"
aria-hidden=
"true"
>
<svg
:class=
"[prefixCls, $attrs.class, spin && 'svg-icon-spin']"
:style=
"getStyle"
aria-hidden=
"true"
>
<use
:xlink:href=
"symbolId"
/>
<use
:xlink:href=
"symbolId"
/>
</svg>
</svg>
</
template
>
</
template
>
...
@@ -23,6 +27,10 @@
...
@@ -23,6 +27,10 @@
type
:
[
Number
,
String
],
type
:
[
Number
,
String
],
default
:
16
,
default
:
16
,
},
},
spin
:
{
type
:
Boolean
,
default
:
false
,
},
},
},
setup
(
props
)
{
setup
(
props
)
{
const
{
prefixCls
}
=
useDesign
(
'svg-icon'
);
const
{
prefixCls
}
=
useDesign
(
'svg-icon'
);
...
@@ -52,4 +60,8 @@
...
@@ -52,4 +60,8 @@
vertical-align
:
-0.15em
;
vertical-align
:
-0.15em
;
fill
:
currentColor
;
fill
:
currentColor
;
}
}
.svg-icon-spin
{
animation
:
loadingCircle
1s
infinite
linear
;
}
</
style
>
</
style
>
src/components/Icon/src/index.vue
浏览文件 @
6dd7d0f9
<
template
>
<
template
>
<SvgIcon
:size=
"size"
:name=
"getSvgIcon"
v-if=
"isSvgIcon"
:class=
"[$attrs.class]"
/>
<SvgIcon
:size=
"size"
:name=
"getSvgIcon"
v-if=
"isSvgIcon"
:class=
"[$attrs.class]"
:spin=
"spin"
/>
<span
<span
v-else
v-else
ref=
"elRef"
ref=
"elRef"
:class=
"[$attrs.class, 'app-iconify anticon']"
:class=
"[$attrs.class, 'app-iconify anticon'
, spin && 'app-iconify-spin'
]"
:style=
"getWrapStyle"
:style=
"getWrapStyle"
></span>
></span>
</
template
>
</
template
>
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
type
:
[
String
,
Number
]
as
PropType
<
string
|
number
>
,
type
:
[
String
,
Number
]
as
PropType
<
string
|
number
>
,
default
:
16
,
default
:
16
,
},
},
spin
:
propTypes
.
bool
.
def
(
false
),
prefix
:
propTypes
.
string
.
def
(
''
),
prefix
:
propTypes
.
string
.
def
(
''
),
},
},
setup
(
props
)
{
setup
(
props
)
{
...
@@ -99,6 +100,12 @@
...
@@ -99,6 +100,12 @@
.app-iconify
{
.app-iconify
{
display
:
inline-block
;
display
:
inline-block
;
vertical-align
:
middle
;
vertical-align
:
middle
;
&-spin
{
svg
{
animation
:
loadingCircle
1s
infinite
linear
;
}
}
}
}
span
.iconify
{
span
.iconify
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论