Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
啊嘞嘞EC
vue-vben-admin
提交
cb1ae34f
V
vue-vben-admin
项目概览
啊嘞嘞EC
/
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 搜索 >>
提交
cb1ae34f
编写于
11月 12, 2020
作者:
V
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: fix notify type error
上级
d9b19600
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
35 deletion
+17
-35
src/components/Menu/src/MenuContent.tsx
src/components/Menu/src/MenuContent.tsx
+4
-5
src/hooks/web/useMessage.tsx
src/hooks/web/useMessage.tsx
+12
-29
src/router/index.ts
src/router/index.ts
+1
-1
未找到文件。
src/components/Menu/src/MenuContent.tsx
浏览文件 @
cb1ae34f
...
@@ -40,8 +40,8 @@ export default defineComponent({
...
@@ -40,8 +40,8 @@ export default defineComponent({
}
}
function
renderTag
()
{
function
renderTag
()
{
const
{
item
,
showTitle
}
=
props
;
const
{
item
,
showTitle
,
isTop
}
=
props
;
if
(
!
item
||
showTitle
)
return
null
;
if
(
!
item
||
showTitle
||
isTop
)
return
null
;
const
{
tag
}
=
item
;
const
{
tag
}
=
item
;
if
(
!
tag
)
return
null
;
if
(
!
tag
)
return
null
;
...
@@ -60,16 +60,15 @@ export default defineComponent({
...
@@ -60,16 +60,15 @@ export default defineComponent({
if
(
!
props
.
item
)
{
if
(
!
props
.
item
)
{
return
null
;
return
null
;
}
}
const
{
showTitle
,
isTop
}
=
props
;
const
{
showTitle
}
=
props
;
const
{
name
,
icon
}
=
props
.
item
;
const
{
name
,
icon
}
=
props
.
item
;
const
searchValue
=
props
.
searchValue
||
''
;
const
searchValue
=
props
.
searchValue
||
''
;
const
index
=
name
.
indexOf
(
searchValue
);
const
index
=
name
.
indexOf
(
searchValue
);
const
beforeStr
=
name
.
substr
(
0
,
index
);
const
beforeStr
=
name
.
substr
(
0
,
index
);
const
afterStr
=
name
.
substr
(
index
+
searchValue
.
length
);
const
afterStr
=
name
.
substr
(
index
+
searchValue
.
length
);
le
t
cls
=
showTitle
?
[
'
show-title
'
]
:
[
'
basic-menu__name
'
];
cons
t
cls
=
showTitle
?
[
'
show-title
'
]
:
[
'
basic-menu__name
'
];
isTop
&&
!
showTitle
&&
(
cls
=
[]);
return
(
return
(
<>
<>
{
renderIcon
(
icon
!
)
}
{
renderIcon
(
icon
!
)
}
...
...
src/hooks/web/useMessage.tsx
浏览文件 @
cb1ae34f
import
type
{
ModalFunc
,
ModalFuncProps
}
from
'
ant-design-vue/lib/modal/Modal
'
;
import
type
{
ModalFunc
,
ModalFuncProps
}
from
'
ant-design-vue/lib/modal/Modal
'
;
import
type
{
MessageApi
}
from
'
ant-design-vue/lib/message
'
;
import
type
{
MessageApi
}
from
'
ant-design-vue/lib/message
'
;
import
type
{
VNodeTypes
,
CSSProperties
}
from
'
vue
'
;
import
{
Modal
,
message
as
Message
,
notification
}
from
'
ant-design-vue
'
;
import
{
Modal
,
message
as
Message
,
notification
}
from
'
ant-design-vue
'
;
import
{
InfoCircleFilled
,
CheckCircleFilled
,
CloseCircleFilled
}
from
'
@ant-design/icons-vue
'
;
import
{
InfoCircleFilled
,
CheckCircleFilled
,
CloseCircleFilled
}
from
'
@ant-design/icons-vue
'
;
import
{
useSetting
}
from
'
/@/hooks/core/useSetting
'
;
import
{
useSetting
}
from
'
/@/hooks/core/useSetting
'
;
import
{
ArgsProps
,
ConfigProps
}
from
'
ant-design-vue/lib/notification
'
;
export
interface
ArgsProps
{
export
interface
NotifyApi
{
message
:
VNodeTypes
;
info
(
config
:
ArgsProps
):
void
;
description
?:
VNodeTypes
;
success
(
config
:
ArgsProps
):
void
;
btn
?:
VNodeTypes
;
error
(
config
:
ArgsProps
):
void
;
key
?:
string
;
warn
(
config
:
ArgsProps
):
void
;
onClose
?:
()
=>
void
;
warning
(
config
:
ArgsProps
):
void
;
duration
?:
number
|
null
;
open
(
args
:
ArgsProps
):
void
;
icon
?:
VNodeTypes
;
close
(
key
:
String
):
void
;
placement
?:
NotificationPlacement
;
config
(
options
:
ConfigProps
):
void
;
style
?:
CSSProperties
;
destroy
():
void
;
prefixCls
?:
string
;
class
?:
string
;
readonly
type
?:
IconType
;
onClick
?:
()
=>
void
;
top
?:
number
;
bottom
?:
number
;
getContainer
?:
()
=>
HTMLElement
;
closeIcon
?:
VNodeTypes
;
}
}
export
declare
type
NotificationPlacement
=
'
topLeft
'
|
'
topRight
'
|
'
bottomLeft
'
|
'
bottomRight
'
;
export
declare
type
NotificationPlacement
=
'
topLeft
'
|
'
topRight
'
|
'
bottomLeft
'
|
'
bottomRight
'
;
export
declare
type
IconType
=
'
success
'
|
'
info
'
|
'
error
'
|
'
warning
'
;
export
declare
type
IconType
=
'
success
'
|
'
info
'
|
'
error
'
|
'
warning
'
;
export
interface
ConfigProps
{
top
?:
string
|
number
;
bottom
?:
string
|
number
;
duration
?:
number
;
placement
?:
NotificationPlacement
;
getContainer
?:
()
=>
HTMLElement
;
closeIcon
?:
VNodeTypes
;
}
export
interface
ModalOptionsEx
extends
Omit
<
ModalFuncProps
,
'
iconType
'
>
{
export
interface
ModalOptionsEx
extends
Omit
<
ModalFuncProps
,
'
iconType
'
>
{
iconType
:
'
warning
'
|
'
success
'
|
'
error
'
|
'
info
'
;
iconType
:
'
warning
'
|
'
success
'
|
'
error
'
|
'
info
'
;
}
}
...
@@ -118,7 +101,7 @@ notification.config({
...
@@ -118,7 +101,7 @@ notification.config({
export
function
useMessage
()
{
export
function
useMessage
()
{
return
{
return
{
createMessage
:
Message
as
MessageApi
,
createMessage
:
Message
as
MessageApi
,
notification
:
notification
as
(
arg
:
ArgsProps
)
=>
void
,
notification
:
notification
as
NotifyApi
,
createConfirm
:
createConfirm
,
createConfirm
:
createConfirm
,
createSuccessModal
,
createSuccessModal
,
createErrorModal
,
createErrorModal
,
...
...
src/router/index.ts
浏览文件 @
cb1ae34f
...
@@ -37,7 +37,7 @@ export function resetRouter() {
...
@@ -37,7 +37,7 @@ export function resetRouter() {
router
.
getRoutes
().
forEach
((
route
)
=>
{
router
.
getRoutes
().
forEach
((
route
)
=>
{
const
{
name
}
=
route
;
const
{
name
}
=
route
;
if
(
name
&&
!
resetWhiteNameList
.
includes
(
name
as
string
))
{
if
(
name
&&
!
resetWhiteNameList
.
includes
(
name
as
string
))
{
router
.
removeRoute
(
name
);
router
.
hasRoute
(
name
)
&&
router
.
removeRoute
(
name
);
}
}
});
});
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录