Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
球球不吃虾
vue-vben-admin
提交
a2c413a8
V
vue-vben-admin
项目概览
球球不吃虾
/
vue-vben-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-vben-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
a2c413a8
编写于
10月 27, 2020
作者:
V
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: the useMessage icon style problem
上级
8f5016e3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
11 addition
and
3 deletion
+11
-3
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+1
-0
src/design/ant/index.less
src/design/ant/index.less
+4
-0
src/hooks/core/types.ts
src/hooks/core/types.ts
+1
-1
src/hooks/web/useMessage.tsx
src/hooks/web/useMessage.tsx
+4
-2
src/views/demo/feat/msg/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
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录