Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-vue-admin
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-vue-admin
Commits
a2c413a8
提交
a2c413a8
authored
10月 27, 2020
作者:
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: the useMessage icon style problem
上级
8f5016e3
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
11 行增加
和
3 行删除
+11
-3
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+1
-0
index.less
src/design/ant/index.less
+4
-0
types.ts
src/hooks/core/types.ts
+1
-1
useMessage.tsx
src/hooks/web/useMessage.tsx
+4
-2
index.vue
src/views/demo/feat/msg/index.vue
+1
-0
没有找到文件。
CHANGELOG.zh_CN.md
浏览文件 @
a2c413a8
...
...
@@ -27,6 +27,7 @@
-
修复热更新时多次注册组件警告问题
-
修复登录后出现登录标签页
-
修复路由切换参数消失问题
-
修复 useMessage 图标样式问题
## 2.0.0-rc.5 (2020-10-26)
...
...
src/design/ant/index.less
浏览文件 @
a2c413a8
...
...
@@ -27,6 +27,10 @@
color: @error-color !important;
}
.modal-icon-info {
color: @primary-color !important;
}
.ant-modal-mask {
background-color: rgba(0, 0, 0, 0.2);
}
...
...
src/hooks/core/types.ts
浏览文件 @
a2c413a8
...
...
@@ -87,6 +87,6 @@ export interface MessageOptions {
offset
?:
number
;
}
export
interface
ModalOptionsEx
extends
Omit
<
ModalOptions
,
'iconType'
>
{
iconType
:
'warning'
|
'success'
|
'error'
;
iconType
:
'warning'
|
'success'
|
'error'
|
'info'
;
}
export
type
ModalOptionsPartial
=
Partial
<
ModalOptionsEx
>
&
Pick
<
ModalOptionsEx
,
'content'
>
;
src/hooks/web/useMessage.tsx
浏览文件 @
a2c413a8
...
...
@@ -13,6 +13,8 @@ function getIcon(iconType: string) {
return
<
InfoCircleFilled
class=
"modal-icon-warning"
/>;
}
else
if
(
iconType
===
'success'
)
{
return
<
CheckCircleFilled
class=
"modal-icon-success"
/>;
}
else
if
(
iconType
===
'info'
)
{
return
<
InfoCircleFilled
class=
"modal-icon-info"
/>;
}
else
{
return
<
CloseCircleFilled
class=
"modal-icon-error"
/>;
}
...
...
@@ -49,7 +51,7 @@ function createModalOptions(options: ModalOptionsPartial, icon: string): ModalOp
};
}
function
createSuccessModal
(
options
:
ModalOptionsPartial
)
{
return
Modal
.
success
(
createModalOptions
(
options
,
'
check
'
));
return
Modal
.
success
(
createModalOptions
(
options
,
'
success
'
));
}
function
createErrorModal
(
options
:
ModalOptionsPartial
)
{
return
Modal
.
error
(
createModalOptions
(
options
,
'close'
));
...
...
@@ -58,7 +60,7 @@ function createInfoModal(options: ModalOptionsPartial) {
return
Modal
.
info
(
createModalOptions
(
options
,
'info'
));
}
function
createWarningModal
(
options
:
ModalOptionsPartial
)
{
return
Modal
.
warning
(
createModalOptions
(
options
,
'
info
'
));
return
Modal
.
warning
(
createModalOptions
(
options
,
'
warning
'
));
}
notification
.
config
({
...
...
src/views/demo/feat/msg/index.vue
浏览文件 @
a2c413a8
...
...
@@ -13,6 +13,7 @@
</CollapseContainer>
<CollapseContainer
class=
"px-20 bg-white w-full h-32 rounded-md mt-5"
title=
"Comfirm"
>
<a-button
@
click=
"handleConfirm('info')"
class=
"mr-2"
>
Info
</a-button>
<a-button
@
click=
"handleConfirm('warning')"
color=
"warning"
class=
"mr-2"
>
Warning
</a-button>
<a-button
@
click=
"handleConfirm('success')"
color=
"success"
class=
"mr-2"
>
Success
</a-button>
<a-button
@
click=
"handleConfirm('error')"
color=
"error"
class=
"mr-2"
>
Error
</a-button>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论