Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-vue-admin
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-vue-admin
Commits
bcab4b77
提交
bcab4b77
authored
11月 03, 2020
作者:
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
perf(use-message): fix typo
上级
0f4b847d
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
56 行增加
和
17 行删除
+56
-17
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+1
-0
useMessage.tsx
src/hooks/web/useMessage.tsx
+35
-2
exception.ts
src/router/menus/modules/demo/exception.ts
+0
-4
feat.ts
src/router/menus/modules/demo/feat.ts
+4
-0
exception.ts
src/router/routes/modules/demo/exception.ts
+0
-8
feat.ts
src/router/routes/modules/demo/feat.ts
+8
-0
index.vue
src/views/sys/error-log/index.vue
+8
-3
没有找到文件。
CHANGELOG.zh_CN.md
浏览文件 @
bcab4b77
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
-
修复升级之后 table 类型问题
-
修复升级之后 table 类型问题
-
修复分割菜单且左侧菜单没有数据时候,继续展示上一次子菜单的问题
-
修复分割菜单且左侧菜单没有数据时候,继续展示上一次子菜单的问题
-
修复
`useMessage`
类型问题
## 2.0.0-rc.8 (2020-11-2)
## 2.0.0-rc.8 (2020-11-2)
...
...
src/hooks/web/useMessage.tsx
浏览文件 @
bcab4b77
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/index'
;
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'
;
export
interface
ArgsProps
{
message
:
VNodeTypes
;
description
?:
VNodeTypes
;
btn
?:
VNodeTypes
;
key
?:
string
;
onClose
?:
()
=>
void
;
duration
?:
number
|
null
;
icon
?:
VNodeTypes
;
placement
?:
NotificationPlacement
;
style
?:
CSSProperties
;
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
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'
;
}
}
...
@@ -84,8 +117,8 @@ notification.config({
...
@@ -84,8 +117,8 @@ notification.config({
*/
*/
export
function
useMessage
()
{
export
function
useMessage
()
{
return
{
return
{
createMessage
:
Message
,
createMessage
:
Message
as
MessageApi
,
notification
,
notification
:
notification
as
(
arg
:
ArgsProps
)
=>
void
,
createConfirm
:
createConfirm
,
createConfirm
:
createConfirm
,
createSuccessModal
,
createSuccessModal
,
createErrorModal
,
createErrorModal
,
...
...
src/router/menus/modules/demo/exception.ts
浏览文件 @
bcab4b77
...
@@ -25,10 +25,6 @@ const menu: MenuModule = {
...
@@ -25,10 +25,6 @@ const menu: MenuModule = {
path
:
'not-data'
,
path
:
'not-data'
,
name
:
'无数据'
,
name
:
'无数据'
,
},
},
{
path
:
'error-log'
,
name
:
'错误日志'
,
},
],
],
},
},
};
};
...
...
src/router/menus/modules/demo/feat.ts
浏览文件 @
bcab4b77
...
@@ -46,6 +46,10 @@ const menu: MenuModule = {
...
@@ -46,6 +46,10 @@ const menu: MenuModule = {
name
:
'全屏'
,
name
:
'全屏'
,
},
},
{
{
path
:
'error-log'
,
name
:
'错误日志'
,
},
{
path
:
'testTab'
,
path
:
'testTab'
,
name
:
'带参Tab'
,
name
:
'带参Tab'
,
children
:
[
children
:
[
...
...
src/router/routes/modules/demo/exception.ts
浏览文件 @
bcab4b77
...
@@ -78,13 +78,5 @@ export default {
...
@@ -78,13 +78,5 @@ export default {
afterCloseLoading
:
true
,
afterCloseLoading
:
true
,
},
},
},
},
{
path
:
'/error-log'
,
name
:
'ErrorLog'
,
component
:
()
=>
import
(
'/@/views/sys/error-log/index.vue'
),
meta
:
{
title
:
'错误日志'
,
},
},
],
],
}
as
AppRouteModule
;
}
as
AppRouteModule
;
src/router/routes/modules/demo/feat.ts
浏览文件 @
bcab4b77
...
@@ -97,6 +97,14 @@ export default {
...
@@ -97,6 +97,14 @@ export default {
},
},
},
},
{
{
path
:
'/error-log'
,
name
:
'ErrorLog'
,
component
:
()
=>
import
(
'/@/views/sys/error-log/index.vue'
),
meta
:
{
title
:
'错误日志'
,
},
},
{
path
:
'/testTab/:id'
,
path
:
'/testTab/:id'
,
name
:
'TestTab'
,
name
:
'TestTab'
,
component
:
()
=>
import
(
'/@/views/demo/feat/tab-params/index.vue'
),
component
:
()
=>
import
(
'/@/views/demo/feat/tab-params/index.vue'
),
...
...
src/views/sys/error-log/index.vue
浏览文件 @
bcab4b77
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
import
DetailModal
from
'./DetailModal.vue'
;
import
DetailModal
from
'./DetailModal.vue'
;
import
{
useModal
}
from
'/@/components/Modal/index'
;
import
{
useModal
}
from
'/@/components/Modal/index'
;
import
{
useMessage
}
from
'/@/hooks/web/useMessage'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'/@/components/Table/index'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'/@/components/Table/index'
;
...
@@ -32,6 +33,7 @@
...
@@ -32,6 +33,7 @@
import
{
getColumns
}
from
'./data'
;
import
{
getColumns
}
from
'./data'
;
import
{
cloneDeep
}
from
'lodash-es'
;
import
{
cloneDeep
}
from
'lodash-es'
;
import
{
isDevMode
}
from
'/@/utils/env'
;
export
default
defineComponent
({
export
default
defineComponent
({
name
:
'ErrorHandler'
,
name
:
'ErrorHandler'
,
...
@@ -39,8 +41,8 @@
...
@@ -39,8 +41,8 @@
setup
()
{
setup
()
{
const
rowInfoRef
=
ref
<
ErrorInfo
>
();
const
rowInfoRef
=
ref
<
ErrorInfo
>
();
const
imgListRef
=
ref
<
string
[]
>
([]);
const
imgListRef
=
ref
<
string
[]
>
([]);
const
[
register
,
{
setTableData
}]
=
useTable
({
const
[
register
,
{
setTableData
}]
=
useTable
({
titleHelpMessage
:
'只在`/src/settings/projectSetting.ts` 内的useErrorHandle=true时生效!'
,
title
:
'错误日志列表'
,
title
:
'错误日志列表'
,
columns
:
getColumns
(),
columns
:
getColumns
(),
actionColumn
:
{
actionColumn
:
{
...
@@ -50,8 +52,8 @@
...
@@ -50,8 +52,8 @@
slots
:
{
customRender
:
'action'
},
slots
:
{
customRender
:
'action'
},
},
},
});
});
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerModal
,
{
openModal
}]
=
useModal
();
watch
(
watch
(
()
=>
errorStore
.
getErrorInfoState
,
()
=>
errorStore
.
getErrorInfoState
,
(
list
)
=>
{
(
list
)
=>
{
...
@@ -63,7 +65,10 @@
...
@@ -63,7 +65,10 @@
immediate
:
true
,
immediate
:
true
,
}
}
);
);
const
{
createMessage
}
=
useMessage
();
if
(
isDevMode
())
{
createMessage
.
info
(
'只在`/src/settings/projectSetting.ts` 内的useErrorHandle=true时生效!'
);
}
// 查看详情
// 查看详情
function
handleDetail
(
row
:
ErrorInfo
)
{
function
handleDetail
(
row
:
ErrorInfo
)
{
rowInfoRef
.
value
=
row
;
rowInfoRef
.
value
=
row
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论