Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
啊嘞嘞EC
vue-vben-admin
提交
21a225c2
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,发现更多精彩内容 >>
提交
21a225c2
编写于
11月 03, 2020
作者:
V
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: abnormal page adjustment
上级
0c28ffa8
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
48 addition
and
78 deletion
+48
-78
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+1
-0
build/config/lessModifyVars.ts
build/config/lessModifyVars.ts
+2
-2
src/assets/images/exception/404.png
src/assets/images/exception/404.png
+0
-0
src/assets/images/exception/500.png
src/assets/images/exception/500.png
+0
-0
src/components/Form/src/FormItem.tsx
src/components/Form/src/FormItem.tsx
+0
-12
src/enums/exceptionEnum.ts
src/enums/exceptionEnum.ts
+4
-10
src/layouts/Logo.vue
src/layouts/Logo.vue
+1
-1
src/router/menus/modules/demo/exception.ts
src/router/menus/modules/demo/exception.ts
+4
-0
src/router/routes/modules/demo/exception.ts
src/router/routes/modules/demo/exception.ts
+12
-12
src/settings/projectSetting.ts
src/settings/projectSetting.ts
+1
-1
src/views/sys/exception/Exception.tsx
src/views/sys/exception/Exception.tsx
+23
-22
src/views/sys/exception/LoadTimeOut.vue
src/views/sys/exception/LoadTimeOut.vue
+0
-17
src/views/sys/exception/index.ts
src/views/sys/exception/index.ts
+0
-1
未找到文件。
CHANGELOG.zh_CN.md
浏览文件 @
21a225c2
...
...
@@ -10,6 +10,7 @@
-
删除菜单背景图
-
更新
`ant-design-vue`
版本为
`beta13`
-
更新
`vite`
版本为
`rc.9`
-
异常页调整
### 🐛 Bug Fixes
...
...
build/config/lessModifyVars.ts
浏览文件 @
21a225c2
...
...
@@ -17,8 +17,8 @@ const modifyVars = {
'
background-color-base
'
:
'
#F0F2F5
'
,
// background color
'
font-size-base
'
:
'
14px
'
,
// Main font size
'
box-shadow-base
'
:
'
0 2px 8px rgba(0, 0, 0, 0.15)
'
,
// Floating shadow
'
border-color-base
'
:
'
#
cececd
'
,
// Border color,
'
border-color-split
'
:
'
#
cececd
'
,
// Border color,
'
border-color-base
'
:
'
#
F0F0F0
'
,
// Border color,
'
border-color-split
'
:
'
#
F0F0F0
'
,
// Border color,
'
border-radius-base
'
:
'
2px
'
,
// Component/float fillet
};
//}
...
...
src/assets/images/exception/404.png
已删除
100644 → 0
浏览文件 @
0c28ffa8
14.6 KB
src/assets/images/exception/500.png
已删除
100644 → 0
浏览文件 @
0c28ffa8
15.3 KB
src/components/Form/src/FormItem.tsx
浏览文件 @
21a225c2
...
...
@@ -193,18 +193,6 @@ export default defineComponent({
const
bindValue
=
{
[
isCheck
?
'
checked
'
:
'
value
'
]:
(
props
.
formModel
as
any
)[
field
],
};
// TODO先兼容antd的警告,后面官方修复后删除
if
(
component
===
'
Select
'
)
{
if
(
Reflect
.
has
(
propsData
,
'
options
'
))
{
propsData
.
options
=
propsData
.
options
.
map
((
item
:
any
)
=>
{
return
{
key
:
item
.
value
,
...
item
,
};
});
}
}
if
(
!
renderComponentContent
)
{
return
<
Comp
{
...
propsData
}
{
...
on
}
{
...
bindValue
}
/>;
}
...
...
src/enums/exceptionEnum.ts
浏览文件 @
21a225c2
...
...
@@ -2,6 +2,9 @@
* @description: Exception related enumeration
*/
export
enum
ExceptionEnum
{
// page not access
PAGE_NOT_ACCESS
=
403
,
// page not found
PAGE_NOT_FOUND
=
404
,
...
...
@@ -11,17 +14,8 @@ export enum ExceptionEnum {
// net work error
NET_WORK_ERROR
=
10000
,
// net work timeout
NET_WORK_TIMEOUT
=
10100
,
// not data
NOT_DATA
=
10200
,
// The page loads too long and timeout
PAGE_TIMEOUT
=
10300
,
// No data on the page. In fact, it is not an exception page
PAGE_NOT_DATA
=
10
4
00
,
PAGE_NOT_DATA
=
10
1
00
,
}
export
enum
ErrorTypeEnum
{
...
...
src/layouts/Logo.vue
浏览文件 @
21a225c2
...
...
@@ -83,7 +83,7 @@
.logo-title {
font-size: 18px;
font-weight:
4
00;
font-weight:
7
00;
opacity: 0;
transition: all 0.5s;
.respond-to(medium,{
...
...
src/router/menus/modules/demo/exception.ts
浏览文件 @
21a225c2
...
...
@@ -5,6 +5,10 @@ const menu: MenuModule = {
name
:
'
异常页
'
,
path
:
'
/exception
'
,
children
:
[
{
path
:
'
403
'
,
name
:
'
403
'
,
},
{
path
:
'
404
'
,
name
:
'
404
'
,
...
...
src/router/routes/modules/demo/exception.ts
浏览文件 @
21a225c2
...
...
@@ -18,6 +18,18 @@ export default {
},
routes
:
[
{
path
:
'
/403
'
,
name
:
'
PageNotAccess
'
,
component
:
ExceptionPage
,
props
:
{
status
:
ExceptionEnum
.
PAGE_NOT_ACCESS
,
},
meta
:
{
title
:
'
403
'
,
afterCloseLoading
:
true
,
},
},
{
path
:
'
/404
'
,
name
:
'
PageNotFound
'
,
...
...
@@ -54,18 +66,6 @@ export default {
afterCloseLoading
:
true
,
},
},
{
path
:
'
/page-time-out
'
,
name
:
'
PageTimeOut
'
,
component
:
ExceptionPage
,
props
:
{
status
:
ExceptionEnum
.
PAGE_TIMEOUT
,
},
meta
:
{
title
:
'
页面超时
'
,
afterCloseLoading
:
true
,
},
},
{
path
:
'
/not-data
'
,
name
:
'
NotData
'
,
...
...
src/settings/projectSetting.ts
浏览文件 @
21a225c2
...
...
@@ -4,7 +4,7 @@ import { MenuTypeEnum, MenuThemeEnum, MenuModeEnum } from '/@/enums/menuEnum';
import
{
ContentEnum
,
PermissionModeEnum
,
RouterTransitionEnum
}
from
'
/@/enums/appEnum
'
;
import
{
primaryColor
}
from
'
../../build/config/lessModifyVars
'
;
import
{
isProdMode
}
from
'
/@/utils/env
'
;
// !
改动后需要清空浏览器缓存
// !
You need to clear the browser cache after the change
const
setting
:
ProjectConfig
=
{
// Whether to show the configuration button
showSettingButton
:
true
,
...
...
src/views/sys/exception/Exception.tsx
浏览文件 @
21a225c2
...
...
@@ -6,8 +6,6 @@ import { defineComponent, ref, computed, unref } from 'vue';
import
{
ExceptionEnum
}
from
'
/@/enums/exceptionEnum
'
;
import
netWorkImg
from
'
/@/assets/images/exception/net-work.png
'
;
import
error404
from
'
/@/assets/images/exception/404.png
'
;
import
error500
from
'
/@/assets/images/exception/500.png
'
;
import
notDataImg
from
'
/@/assets/images/no-data.png
'
;
import
{
useRoute
}
from
'
vue-router
'
;
...
...
@@ -22,6 +20,7 @@ interface MapValue {
btnText
?:
string
;
icon
?:
string
;
handler
?:
Fn
;
status
?:
string
;
}
export
default
defineComponent
({
...
...
@@ -63,50 +62,52 @@ export default defineComponent({
}
);
unref
(
statusMapRef
).
set
(
ExceptionEnum
.
PAGE_NOT_ACCESS
,
{
title
:
'
403
'
,
status
:
`
${
ExceptionEnum
.
PAGE_NOT_ACCESS
}
`
,
subTitle
:
`Sorry, you don't have access to this page.!`
,
btnText
:
props
.
full
?
'
Back Login
'
:
'
Back Home
'
,
handler
:
()
=>
(
props
.
full
?
go
(
PageEnum
.
BASE_LOGIN
)
:
go
()),
});
unref
(
statusMapRef
).
set
(
ExceptionEnum
.
PAGE_NOT_FOUND
,
{
title
:
'
404
'
,
subTitle
:
'
抱歉,您访问的页面不存在!
'
,
btnText
:
props
.
full
?
'
返回登录
'
:
'
返回首页
'
,
status
:
`
${
ExceptionEnum
.
PAGE_NOT_FOUND
}
`
,
subTitle
:
`Sorry, the page you visited does not exist.`
,
btnText
:
props
.
full
?
'
Back Login
'
:
'
Back Home
'
,
handler
:
()
=>
(
props
.
full
?
go
(
PageEnum
.
BASE_LOGIN
)
:
go
()),
icon
:
error404
,
});
unref
(
statusMapRef
).
set
(
ExceptionEnum
.
ERROR
,
{
title
:
'
500
'
,
subTitle
:
'
抱歉,服务器出现异常!
'
,
btnText
:
'
返回首页
'
,
status
:
`
${
ExceptionEnum
.
ERROR
}
`
,
subTitle
:
`Sorry, the server is reporting an error.`
,
btnText
:
'
Back Home
'
,
handler
:
()
=>
go
(),
icon
:
error500
,
});
unref
(
statusMapRef
).
set
(
ExceptionEnum
.
PAGE_NOT_DATA
,
{
title
:
'
当前页面无数据
'
,
title
:
'
No data on the current page
'
,
subTitle
:
''
,
btnText
:
'
刷新
'
,
btnText
:
'
Refresh
'
,
handler
:
()
=>
redo
(),
icon
:
notDataImg
,
});
unref
(
statusMapRef
).
set
(
ExceptionEnum
.
NET_WORK_ERROR
,
{
title
:
'
网络错误
'
,
subTitle
:
'
抱歉,您的网络连接已断开,请检查您的网络
!
'
,
btnText
:
'
刷新
'
,
title
:
'
Network Error
'
,
subTitle
:
'
Sorry,Your network connection has been disconnected, please check your network
!
'
,
btnText
:
'
Refresh
'
,
handler
:
()
=>
redo
(),
icon
:
netWorkImg
,
});
unref
(
statusMapRef
).
set
(
ExceptionEnum
.
PAGE_TIMEOUT
,
{
title
:
'
页面加载失败
'
,
subTitle
:
'
抱歉,您的页面加载出错或者过久未响应,请检查您的网络!
'
,
btnText
:
'
刷新
'
,
handler
:
()
=>
redo
(),
icon
:
netWorkImg
,
});
return
()
=>
{
const
{
title
,
subTitle
,
btnText
,
icon
,
handler
}
=
unref
(
getMapValue
)
||
{};
const
{
title
,
subTitle
,
btnText
,
icon
,
handler
,
status
}
=
unref
(
getMapValue
)
||
{};
return
(
<
Result
class
=
"exception "
status
=
{
status
as
any
}
title
=
{
props
.
title
||
title
}
sub
-
title
=
{
props
.
subTitle
||
subTitle
}
>
...
...
@@ -117,7 +118,7 @@ export default defineComponent({
{
()
=>
btnText
}
</
Button
>
),
icon
:
()
=>
icon
&&
<
img
src
=
{
icon
}
/>
,
icon
:
()
=>
(
icon
?
<
img
src
=
{
icon
}
/>
:
null
)
,
}
}
</
Result
>
);
...
...
src/views/sys/exception/LoadTimeOut.vue
已删除
100644 → 0
浏览文件 @
0c28ffa8
<
template
>
<Exception
:status=
"ExceptionEnum.PAGE_TIMEOUT"
/>
</
template
>
<
script
lang=
"ts"
>
import
{
defineComponent
}
from
'
vue
'
;
import
{
Exception
}
from
'
/@/views/sys/exception
'
;
import
{
ExceptionEnum
}
from
'
/@/enums/exceptionEnum
'
;
export
default
defineComponent
({
name
:
'
LoadTimeout
'
,
components
:
{
Exception
},
setup
()
{
return
{
ExceptionEnum
};
},
});
</
script
>
src/views/sys/exception/index.ts
浏览文件 @
21a225c2
export
{
default
as
Exception
}
from
'
./Exception
'
;
export
{
default
as
LoadTimeOut
}
from
'
./LoadTimeOut.vue
'
;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录