Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
najiu-frontend
najiu-admin-template
Commits
a2c413a8
Commit
a2c413a8
authored
Oct 27, 2020
by
vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: the useMessage icon style problem
parent
8f5016e3
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
3 deletions
+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
No files found.
CHANGELOG.zh_CN.md
View file @
a2c413a8
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
-
修复热更新时多次注册组件警告问题
-
修复热更新时多次注册组件警告问题
-
修复登录后出现登录标签页
-
修复登录后出现登录标签页
-
修复路由切换参数消失问题
-
修复路由切换参数消失问题
-
修复 useMessage 图标样式问题
## 2.0.0-rc.5 (2020-10-26)
## 2.0.0-rc.5 (2020-10-26)
...
...
src/design/ant/index.less
View file @
a2c413a8
...
@@ -27,6 +27,10 @@
...
@@ -27,6 +27,10 @@
color: @error-color !important;
color: @error-color !important;
}
}
.modal-icon-info {
color: @primary-color !important;
}
.ant-modal-mask {
.ant-modal-mask {
background-color: rgba(0, 0, 0, 0.2);
background-color: rgba(0, 0, 0, 0.2);
}
}
...
...
src/hooks/core/types.ts
View file @
a2c413a8
...
@@ -87,6 +87,6 @@ export interface MessageOptions {
...
@@ -87,6 +87,6 @@ export interface MessageOptions {
offset
?:
number
;
offset
?:
number
;
}
}
export
interface
ModalOptionsEx
extends
Omit
<
ModalOptions
,
'
iconType
'
>
{
export
interface
ModalOptionsEx
extends
Omit
<
ModalOptions
,
'
iconType
'
>
{
iconType
:
'
warning
'
|
'
success
'
|
'
error
'
;
iconType
:
'
warning
'
|
'
success
'
|
'
error
'
|
'
info
'
;
}
}
export
type
ModalOptionsPartial
=
Partial
<
ModalOptionsEx
>
&
Pick
<
ModalOptionsEx
,
'
content
'
>
;
export
type
ModalOptionsPartial
=
Partial
<
ModalOptionsEx
>
&
Pick
<
ModalOptionsEx
,
'
content
'
>
;
src/hooks/web/useMessage.tsx
View file @
a2c413a8
...
@@ -13,6 +13,8 @@ function getIcon(iconType: string) {
...
@@ -13,6 +13,8 @@ function getIcon(iconType: string) {
return
<
InfoCircleFilled
class=
"modal-icon-warning"
/>;
return
<
InfoCircleFilled
class=
"modal-icon-warning"
/>;
}
else
if
(
iconType
===
'
success
'
)
{
}
else
if
(
iconType
===
'
success
'
)
{
return
<
CheckCircleFilled
class=
"modal-icon-success"
/>;
return
<
CheckCircleFilled
class=
"modal-icon-success"
/>;
}
else
if
(
iconType
===
'
info
'
)
{
return
<
InfoCircleFilled
class=
"modal-icon-info"
/>;
}
else
{
}
else
{
return
<
CloseCircleFilled
class=
"modal-icon-error"
/>;
return
<
CloseCircleFilled
class=
"modal-icon-error"
/>;
}
}
...
@@ -49,7 +51,7 @@ function createModalOptions(options: ModalOptionsPartial, icon: string): ModalOp
...
@@ -49,7 +51,7 @@ function createModalOptions(options: ModalOptionsPartial, icon: string): ModalOp
};
};
}
}
function
createSuccessModal
(
options
:
ModalOptionsPartial
)
{
function
createSuccessModal
(
options
:
ModalOptionsPartial
)
{
return
Modal
.
success
(
createModalOptions
(
options
,
'
check
'
));
return
Modal
.
success
(
createModalOptions
(
options
,
'
success
'
));
}
}
function
createErrorModal
(
options
:
ModalOptionsPartial
)
{
function
createErrorModal
(
options
:
ModalOptionsPartial
)
{
return
Modal
.
error
(
createModalOptions
(
options
,
'
close
'
));
return
Modal
.
error
(
createModalOptions
(
options
,
'
close
'
));
...
@@ -58,7 +60,7 @@ function createInfoModal(options: ModalOptionsPartial) {
...
@@ -58,7 +60,7 @@ function createInfoModal(options: ModalOptionsPartial) {
return
Modal
.
info
(
createModalOptions
(
options
,
'
info
'
));
return
Modal
.
info
(
createModalOptions
(
options
,
'
info
'
));
}
}
function
createWarningModal
(
options
:
ModalOptionsPartial
)
{
function
createWarningModal
(
options
:
ModalOptionsPartial
)
{
return
Modal
.
warning
(
createModalOptions
(
options
,
'
info
'
));
return
Modal
.
warning
(
createModalOptions
(
options
,
'
warning
'
));
}
}
notification
.
config
({
notification
.
config
({
...
...
src/views/demo/feat/msg/index.vue
View file @
a2c413a8
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
</CollapseContainer>
</CollapseContainer>
<CollapseContainer
class=
"px-20 bg-white w-full h-32 rounded-md mt-5"
title=
"Comfirm"
>
<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('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('success')"
color=
"success"
class=
"mr-2"
>
Success
</a-button>
<a-button
@
click=
"handleConfirm('error')"
color=
"error"
class=
"mr-2"
>
Error
</a-button>
<a-button
@
click=
"handleConfirm('error')"
color=
"error"
class=
"mr-2"
>
Error
</a-button>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment