Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Simoje丶
vue-vben-admin
提交
349d1978
V
vue-vben-admin
项目概览
Simoje丶
/
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 搜索 >>
提交
349d1978
编写于
10月 22, 2020
作者:
V
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: fix missing page refresh parameters
上级
66acb21e
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
81 addition
and
39 deletion
+81
-39
src/components/Breadcrumb/Breadcrumb.vue
src/components/Breadcrumb/Breadcrumb.vue
+1
-1
src/components/Form/src/BasicForm.vue
src/components/Form/src/BasicForm.vue
+1
-1
src/components/Menu/src/index.less
src/components/Menu/src/index.less
+2
-2
src/design/var/index.less
src/design/var/index.less
+1
-1
src/hooks/web/useTabs.ts
src/hooks/web/useTabs.ts
+12
-2
src/layouts/default/LayoutHeader.tsx
src/layouts/default/LayoutHeader.tsx
+4
-10
src/layouts/default/actions/notice/NoticeActionItem.vue
src/layouts/default/actions/notice/NoticeActionItem.vue
+17
-14
src/layouts/default/index.less
src/layouts/default/index.less
+12
-6
src/layouts/default/multitabs/index.less
src/layouts/default/multitabs/index.less
+17
-0
src/layouts/default/multitabs/index.tsx
src/layouts/default/multitabs/index.tsx
+13
-1
src/settings/projectSetting.ts
src/settings/projectSetting.ts
+1
-1
未找到文件。
src/components/Breadcrumb/Breadcrumb.vue
浏览文件 @
349d1978
...
...
@@ -37,7 +37,7 @@
.breadcrumb {
height: @header-height;
padding-right: 20px;
font-size: 1
4
px;
font-size: 1
2
px;
line-height: @header-height;
// line-height: 1;
...
...
src/components/Form/src/BasicForm.vue
浏览文件 @
349d1978
...
...
@@ -74,7 +74,7 @@
const
getMergePropsRef
=
computed
(
():
FormProps
=>
{
return
deepMerge
(
props
,
unref
(
propsRef
));
return
deepMerge
(
cloneDeep
(
props
)
,
unref
(
propsRef
));
}
);
// 获取表单基本配置
...
...
src/components/Menu/src/index.less
浏览文件 @
349d1978
...
...
@@ -118,7 +118,7 @@
.ant-menu-submenu-open,
.ant-menu-item-selected,
.ant-menu-submenu-selected {
color: @
white
!important;
color: @
primary-color
!important;
border-bottom: 3px solid @primary-color;
}
...
...
@@ -127,7 +127,7 @@
.ant-menu:not(.ant-menu-inline) .ant-menu-submenu-open,
.ant-menu-submenu-active,
.ant-menu-submenu-title:hover {
color: @
white
!important;
color: @
primary-color
!important;
border-bottom: 3px solid @primary-color;
}
...
...
src/design/var/index.less
浏览文件 @
349d1978
...
...
@@ -6,7 +6,7 @@
@multiple-height: 36px;
// headers
@header-height:
42
px;
@header-height:
36
px;
// logo width
@logo-width: 40px;
...
...
src/hooks/web/useTabs.ts
浏览文件 @
349d1978
...
...
@@ -90,15 +90,25 @@ export function useTabs() {
closeOther
:
()
=>
canIUseFn
()
&&
closeOther
(
tabStore
.
getCurrentTab
),
closeCurrent
:
()
=>
canIUseFn
()
&&
closeCurrent
(
tabStore
.
getCurrentTab
),
resetCache
:
()
=>
canIUseFn
()
&&
resetCache
(),
addTab
:
(
path
:
PageEnum
,
goTo
=
false
,
replace
=
false
)
=>
{
addTab
:
(
path
:
PageEnum
|
string
,
goTo
=
false
,
opt
?:
{
replace
?:
boolean
;
query
?:
any
;
params
?:
any
}
)
=>
{
const
to
=
getTo
(
path
);
if
(
!
to
)
return
;
useTimeout
(()
=>
{
tabStore
.
addTabByPathAction
();
},
0
);
const
{
replace
,
query
=
{},
params
=
{}
}
=
opt
||
{};
activeKeyRef
.
value
=
path
;
goTo
&&
replace
?
router
.
replace
:
router
.
push
(
path
);
const
data
=
{
path
,
query
,
params
,
};
goTo
&&
replace
?
router
.
replace
(
data
)
:
router
.
push
(
data
);
},
activeKeyRef
,
};
...
...
src/layouts/default/LayoutHeader.tsx
浏览文件 @
349d1978
...
...
@@ -20,7 +20,6 @@ import { GITHUB_URL } from '/@/settings/siteSetting';
import
LockAction
from
'
./actions/LockActionItem
'
;
import
{
useModal
}
from
'
/@/components/Modal/index
'
;
import
{
errorStore
}
from
'
/@/store/modules/error
'
;
import
{
useGo
}
from
'
/@/hooks/web/usePage
'
;
import
{
useWindowSizeFn
}
from
'
/@/hooks/event/useWindowSize
'
;
import
NoticeAction
from
'
./actions/notice/NoticeActionItem.vue
'
;
...
...
@@ -28,11 +27,10 @@ export default defineComponent({
name
:
'
DefaultLayoutHeader
'
,
setup
()
{
const
widthRef
=
ref
(
200
);
const
{
refreshPage
}
=
useTabs
();
const
{
refreshPage
,
addTab
}
=
useTabs
();
const
[
register
,
{
openModal
}]
=
useModal
();
const
{
toggleFullscreen
,
isFullscreenRef
}
=
useFullscreen
();
const
go
=
useGo
();
const
getProjectConfigRef
=
computed
(()
=>
{
return
appStore
.
getProjectConfig
;
});
...
...
@@ -72,7 +70,7 @@ export default defineComponent({
function
handleToErrorList
()
{
errorStore
.
commitErrorListCountState
(
0
);
go
(
'
/exception/error-log
'
);
addTab
(
'
/exception/error-log
'
,
true
);
}
/**
...
...
@@ -175,12 +173,8 @@ export default defineComponent({
<
div
>
<
Tooltip
>
{
{
title
:
()
=>
'
消息中心
'
,
default
:
()
=>
(
<
div
class
=
{
`layout-header__action-item`
}
>
<
NoticeAction
/>
</
div
>
),
title
:
()
=>
'
消息通知
'
,
default
:
()
=>
<
NoticeAction
/>,
}
}
</
Tooltip
>
</
div
>
...
...
src/layouts/default/actions/notice/NoticeActionItem.vue
浏览文件 @
349d1978
<
template
>
<div>
<div
class=
"layout-header__action-item notify-action"
>
<Popover
title=
""
trigger=
"click"
>
<Badge
:count=
"count"
:numberStyle=
"numberStyle"
>
<BellOutlined
class=
"layout-header__action-icon"
/>
...
...
@@ -43,22 +43,25 @@
},
});
</
script
>
<
style
lang=
"less"
scoped
>
/deep/ .ant-tabs-tab {
padding-top: 8px;
margin-right: 12px;
}
<
style
lang=
"less"
>
.notify-action {
padding-top: 2px;
/deep/
.ant-tabs-content {
width: 300px;
}
.ant-tabs-content {
width: 300px;
}
/deep/
.ant-badge {
font-size: 18px;
.ant-badge {
font-size: 18px;
.ant-badge-multiple-words {
padding: 0 4px;
transform: translate(26%, -48%);
.ant-badge-multiple-words {
padding: 0 4px;
transform: translate(26%, -40%);
}
svg {
width: 0.9em;
}
}
}
</
style
>
src/layouts/default/index.less
浏览文件 @
349d1978
...
...
@@ -194,6 +194,11 @@
}
}
.ant-layout-header {
height: @header-height;
line-height: @header-height;
}
.layout-header {
display: flex;
height: @header-height;
...
...
@@ -336,12 +341,12 @@
display: flex;
align-items: center;
height: @header-height;
font-size: 1.
3
em;
font-size: 1.
1
em;
cursor: pointer;
}
&-icon {
padding: 0
12
px;
padding: 0
8
px;
}
}
...
...
@@ -362,13 +367,14 @@
.user-dropdown {
display: flex;
height: 100%;
font-size: 12px;
cursor: pointer;
align-items: center;
img {
width:
32
px;
height:
32
px;
margin-right:
24
px;
width:
26
px;
height:
26
px;
margin-right:
16
px;
}
&__header {
...
...
@@ -404,7 +410,7 @@
}
&__name {
font-size: 1
4
px;
font-size: 1
2
px;
}
&__desc {
...
...
src/layouts/default/multitabs/index.less
浏览文件 @
349d1978
...
...
@@ -7,6 +7,19 @@
height: @multiple-height;
}
// .ant-tabs:not(.ant-tabs-card) {
// .ant-tabs-nav-container {
// height: @multiple-height;
// background: @white;
// }
// .ant-tabs-tab {
// font-size: 14px;
// line-height: 1.5515;
// background: @white;
// }
// }
.ant-tabs.ant-tabs-card {
.ant-tabs-card-bar {
height: @multiple-height;
...
...
@@ -114,6 +127,10 @@
}
}
.ant-tabs-extra-content {
line-height: @multiple-height;
}
.multiple-tabs-content {
&__extra {
display: inline-block;
...
...
src/layouts/default/multitabs/index.tsx
浏览文件 @
349d1978
...
...
@@ -35,7 +35,11 @@ export default defineComponent({
const
{
currentRoute
}
=
useRouter
();
const
{
addTab
,
activeKeyRef
}
=
useTabs
();
onMounted
(()
=>
{
addTab
(
unref
(
currentRoute
).
path
as
PageEnum
);
const
route
=
unref
(
currentRoute
);
addTab
(
unref
(
currentRoute
).
path
as
PageEnum
,
false
,
{
query
:
route
.
query
,
params
:
route
.
params
,
});
});
// 当前激活tab
...
...
@@ -60,6 +64,14 @@ export default defineComponent({
// 监听路由的话虽然可以,但是路由切换的时间会造成卡顿现象?
// 使用useTab的addTab的话,当用户手动调转,需要自行调用addTab
// tabStore.commitAddTab((unref(currentRoute) as unknown) as AppRouteRecordRaw);
// const { affix } = currentRoute.value.meta || {};
// if (affix) return;
// const hasInTab = tabStore.getTabsState.some(
// (item) => item.fullPath === currentRoute.value.fullPath
// );
// if (!hasInTab) {
// tabStore.commitAddTab((unref(currentRoute) as unknown) as AppRouteRecordRaw);
// }
},
{
immediate
:
true
,
...
...
src/settings/projectSetting.ts
浏览文件 @
349d1978
...
...
@@ -96,7 +96,7 @@ const setting: ProjectConfig = {
showBreadCrumb
:
true
,
// 使用error-handler-plugin
useErrorHandle
:
isProdMode
()
,
useErrorHandle
:
true
,
// 开启页面切换动画
openRouterTransition
:
true
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录