Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
be2ca75e
authored
Aug 23, 2024
by
芋道源码
Committed by
Gitee
Aug 23, 2024
Browse files
Options
Browse Files
Download
Plain Diff
!513 【修复】修复top布局模式下主容器高度计算方式、工具栏多出1px、页脚多出1px
Merge pull request !513 from 半栈幼儿员/hotfix/layout
parents
21621fd2
8c28b8d2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
30 deletions
+18
-30
src/layout/components/Footer/src/Footer.vue
+1
-1
src/layout/components/TabMenu/src/TabMenu.vue
+3
-3
src/layout/components/useRenderLayout.tsx
+13
-25
uno.config.ts
+1
-1
No files found.
src/layout/components/Footer/src/Footer.vue
View file @
be2ca75e
...
...
@@ -17,7 +17,7 @@ const title = computed(() => appStore.getTitle)
<
template
>
<div
:class=
"prefixCls"
class=
"h-[var(--app-footer-height)] bg-[var(--app-content-bg-color)] text-center leading-[var(--app-footer-height)] text-[var(--el-text-color-placeholder)] dark:bg-[var(--el-bg-color)]"
class=
"h-[var(--app-footer-height)] bg-[var(--app-content-bg-color)] text-center leading-[var(--app-footer-height)] text-[var(--el-text-color-placeholder)] dark:bg-[var(--el-bg-color)]
overflow-hidden
"
>
<span
class=
"text-14px"
>
Copyright ©2022-
{{
title
}}
</span>
</div>
...
...
src/layout/components/TabMenu/src/TabMenu.vue
View file @
be2ca75e
...
...
@@ -139,7 +139,7 @@ export default defineComponent({
id
=
{
`
${
variables
.
namespace
}
-menu`
}
class
=
{[
prefixCls
,
'relative bg-[var(--left-menu-bg-color)]
top-1px
layout-border__right'
,
'relative bg-[var(--left-menu-bg-color)] layout-border__right'
,
{
'w-[var(--tab-menu-max-width)]'
:
!
unref
(
collapse
),
'w-[var(--tab-menu-min-width)]'
:
unref
(
collapse
)
...
...
@@ -147,7 +147,7 @@ export default defineComponent({
]}
onMouseleave
=
{
mouseleave
}
>
<
ElScrollbar
class
=
"!h-[calc(100%-var(--tab-menu-collapse-height)
-1px
)]"
>
<
ElScrollbar
class
=
"!h-[calc(100%-var(--tab-menu-collapse-height))]"
>
<
div
>
{()
=>
{
return
unref
(
tabRouters
).
map
((
v
)
=>
{
...
...
@@ -199,7 +199,7 @@ export default defineComponent({
{
'!left-[var(--tab-menu-min-width)]'
:
unref
(
collapse
),
'!left-[var(--tab-menu-max-width)]'
:
!
unref
(
collapse
),
'!w-[
calc(var(--left-menu-max-width)+1px
)]'
:
unref
(
showMenu
)
||
unref
(
fixedMenu
),
'!w-[
var(--left-menu-max-width
)]'
:
unref
(
showMenu
)
||
unref
(
fixedMenu
),
'!w-0'
:
!
unref
(
showMenu
)
&&
!
unref
(
fixedMenu
)
}
]}
...
...
src/layout/components/useRenderLayout.tsx
View file @
be2ca75e
...
...
@@ -126,7 +126,7 @@ export const useRenderLayout = () => {
<
ToolHeader
class=
"flex-1"
></
ToolHeader
>
</
div
>
<
div
class=
"absolute left-0 top-[var(--logo-height)
+1px] h-[calc(100%-1px
-var(--logo-height))] w-full flex"
>
<
div
class=
"absolute left-0 top-[var(--logo-height)
] h-[calc(100%
-var(--logo-height))] w-full flex"
>
<
Menu
class=
"relative layout-border__right !h-full"
></
Menu
>
<
div
class=
{
[
...
...
@@ -157,9 +157,9 @@ export const useRenderLayout = () => {
'layout-border__bottom absolute'
,
{
'!fixed top-0 left-0 z-10'
:
fixedHeader
.
value
,
'w-[calc(100%-var(--left-menu-min-width))] !left-[var(--left-menu-min-width)] mt-[
calc(var(--logo-height)+1px
)]'
:
'w-[calc(100%-var(--left-menu-min-width))] !left-[var(--left-menu-min-width)] mt-[
var(--logo-height
)]'
:
collapse
.
value
&&
fixedHeader
.
value
,
'w-[calc(100%-var(--left-menu-max-width))] !left-[var(--left-menu-max-width)] mt-[
calc(var(--logo-height)+1px
)]'
:
'w-[calc(100%-var(--left-menu-max-width))] !left-[var(--left-menu-max-width)] mt-[
var(--logo-height
)]'
:
!
collapse
.
value
&&
fixedHeader
.
value
}
]
}
...
...
@@ -190,24 +190,14 @@ export const useRenderLayout = () => {
<
Menu
class=
"h-[var(--top-tool-height)] flex-1 px-10px"
></
Menu
>
<
ToolHeader
></
ToolHeader
>
</
div
>
<
div
class=
{
[
`${prefixCls}-content`
,
'w-full'
,
{
'h-[calc(100%-var(--app-footer-height))]'
:
!
fixedHeader
.
value
,
'h-[calc(100%-var(--tags-view-height)-var(--app-footer-height))]'
:
fixedHeader
.
value
}
]
}
>
<
div
class=
{
[
`${prefixCls}-content`
,
'w-full h-[calc(100%-var(--top-tool-height))]'
]
}
>
<
ElScrollbar
v
-
loading=
{
pageLoading
.
value
}
class=
{
[
`${prefixCls}-content-scrollbar`
,
{
'mt-[var(--tags-view-height)] !pb-[calc(var(--tags-view-height)+var(--app-footer-height))]'
:
fixedHeader
.
value
,
'pb-[var(--app-footer-height)]'
:
!
fixedHeader
.
value
'!h-[calc(100%-var(--tags-view-height))] mt-[calc(var(--tags-view-height))]'
:
fixedHeader
.
value
}
]
}
>
...
...
@@ -216,7 +206,7 @@ export const useRenderLayout = () => {
class=
{
[
'layout-border__bottom layout-border__top relative'
,
{
'!fixed w-full top-[
calc(var(--top-tool-height)+1px
)] left-0'
:
fixedHeader
.
value
'!fixed w-full top-[
var(--top-tool-height
)] left-0'
:
fixedHeader
.
value
}
]
}
style=
"transition: width var(--transition-time-02), left var(--transition-time-02);"
...
...
@@ -238,7 +228,7 @@ export const useRenderLayout = () => {
<
ToolHeader
class=
"flex-1"
></
ToolHeader
>
</
div
>
<
div
class=
"absolute left-0 top-[var(--logo-height)] h-[calc(100%-var(--logo-height))] w-
[calc(100%-2px)]
flex"
>
<
div
class=
"absolute left-0 top-[var(--logo-height)] h-[calc(100%-var(--logo-height))] w-
full
flex"
>
<
TabMenu
></
TabMenu
>
<
div
class=
{
[
...
...
@@ -270,18 +260,16 @@ export const useRenderLayout = () => {
{
tagsView
.
value
?
(
<
TagsView
class=
{
[
'relative layout-border__bottom
layout-border__top
'
,
'relative layout-border__bottom'
,
{
'!fixed top-0 left-0 z-10'
:
fixedHeader
.
value
,
'w-[calc(100%-var(--tab-menu-min-width))] !left-[var(--tab-menu-min-width)] mt-[var(--logo-height)]'
:
collapse
.
value
&&
fixedHeader
.
value
,
collapse
.
value
&&
fixedHeader
.
value
&&
!
fixedMenu
.
value
,
'w-[calc(100%-var(--tab-menu-max-width))] !left-[var(--tab-menu-max-width)] mt-[var(--logo-height)]'
:
!
collapse
.
value
&&
fixedHeader
.
value
,
'!fixed top-0 !left-[var(--tab-menu-min-width)+var(--left-menu-max-width)] z-10'
:
fixedHeader
.
value
&&
fixedMenu
.
value
,
'w-[calc(100%-var(--tab-menu-min-width)-var(--left-menu-max-width))] !left-[var(--tab-menu-min-width)+var(--left-menu-max-width)] mt-[var(--logo-height)]'
:
!
collapse
.
value
&&
fixedHeader
.
value
&&
!
fixedMenu
.
value
,
'w-[calc(100%-var(--tab-menu-min-width)-var(--left-menu-max-width))] !left-[calc(var(--tab-menu-min-width)+var(--left-menu-max-width))] mt-[var(--logo-height)]'
:
collapse
.
value
&&
fixedHeader
.
value
&&
fixedMenu
.
value
,
'w-[calc(100%-var(--tab-menu-max-width)-var(--left-menu-max-width))] !left-[
var(--tab-menu-max-width)+var(--left-menu-max-width
)] mt-[var(--logo-height)]'
:
'w-[calc(100%-var(--tab-menu-max-width)-var(--left-menu-max-width))] !left-[
calc(var(--tab-menu-max-width)+var(--left-menu-max-width)
)] mt-[var(--logo-height)]'
:
!
collapse
.
value
&&
fixedHeader
.
value
&&
fixedMenu
.
value
}
]
}
...
...
uno.config.ts
View file @
be2ca75e
...
...
@@ -12,7 +12,7 @@ export default defineConfig({
${
selector
}
{
display: flex;
height: 100%;
padding:
1px 10px 0
;
padding:
0 10px
;
cursor: pointer;
align-items: center;
transition: background var(--transition-time-02);
...
...
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