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
Commit
8c28b8d2
authored
Aug 22, 2024
by
preschooler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:修复top布局模式下主容器高度计算方式、cutMenu布局模式下tagsview位置计算方式、工具栏多出1px、页脚多出1px
parent
323e6197
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 @
8c28b8d2
...
@@ -17,7 +17,7 @@ const title = computed(() => appStore.getTitle)
...
@@ -17,7 +17,7 @@ const title = computed(() => appStore.getTitle)
<
template
>
<
template
>
<div
<div
:class=
"prefixCls"
: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>
<span
class=
"text-14px"
>
Copyright ©2022-
{{
title
}}
</span>
</div>
</div>
...
...
src/layout/components/TabMenu/src/TabMenu.vue
View file @
8c28b8d2
...
@@ -139,7 +139,7 @@ export default defineComponent({
...
@@ -139,7 +139,7 @@ export default defineComponent({
id
=
{
`
${
variables
.
namespace
}
-menu`
}
id
=
{
`
${
variables
.
namespace
}
-menu`
}
class
=
{[
class
=
{[
prefixCls
,
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-max-width)]'
:
!
unref
(
collapse
),
'w-[var(--tab-menu-min-width)]'
:
unref
(
collapse
)
'w-[var(--tab-menu-min-width)]'
:
unref
(
collapse
)
...
@@ -147,7 +147,7 @@ export default defineComponent({
...
@@ -147,7 +147,7 @@ export default defineComponent({
]}
]}
onMouseleave
=
{
mouseleave
}
onMouseleave
=
{
mouseleave
}
>
>
<
ElScrollbar
class
=
"!h-[calc(100%-var(--tab-menu-collapse-height)
-1px
)]"
>
<
ElScrollbar
class
=
"!h-[calc(100%-var(--tab-menu-collapse-height))]"
>
<
div
>
<
div
>
{()
=>
{
{()
=>
{
return
unref
(
tabRouters
).
map
((
v
)
=>
{
return
unref
(
tabRouters
).
map
((
v
)
=>
{
...
@@ -199,7 +199,7 @@ export default defineComponent({
...
@@ -199,7 +199,7 @@ export default defineComponent({
{
{
'!left-[var(--tab-menu-min-width)]'
:
unref
(
collapse
),
'!left-[var(--tab-menu-min-width)]'
:
unref
(
collapse
),
'!left-[var(--tab-menu-max-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
)
'!w-0'
:
!
unref
(
showMenu
)
&&
!
unref
(
fixedMenu
)
}
}
]}
]}
...
...
src/layout/components/useRenderLayout.tsx
View file @
8c28b8d2
...
@@ -126,7 +126,7 @@ export const useRenderLayout = () => {
...
@@ -126,7 +126,7 @@ export const useRenderLayout = () => {
<
ToolHeader
class=
"flex-1"
></
ToolHeader
>
<
ToolHeader
class=
"flex-1"
></
ToolHeader
>
</
div
>
</
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
>
<
Menu
class=
"relative layout-border__right !h-full"
></
Menu
>
<
div
<
div
class=
{
[
class=
{
[
...
@@ -157,9 +157,9 @@ export const useRenderLayout = () => {
...
@@ -157,9 +157,9 @@ export const useRenderLayout = () => {
'layout-border__bottom absolute'
,
'layout-border__bottom absolute'
,
{
{
'!fixed top-0 left-0 z-10'
:
fixedHeader
.
value
,
'!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
,
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
!
collapse
.
value
&&
fixedHeader
.
value
}
}
]
}
]
}
...
@@ -190,24 +190,14 @@ export const useRenderLayout = () => {
...
@@ -190,24 +190,14 @@ export const useRenderLayout = () => {
<
Menu
class=
"h-[var(--top-tool-height)] flex-1 px-10px"
></
Menu
>
<
Menu
class=
"h-[var(--top-tool-height)] flex-1 px-10px"
></
Menu
>
<
ToolHeader
></
ToolHeader
>
<
ToolHeader
></
ToolHeader
>
</
div
>
</
div
>
<
div
<
div
class=
{
[
`${prefixCls}-content`
,
'w-full h-[calc(100%-var(--top-tool-height))]'
]
}
>
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
}
]
}
>
<
ElScrollbar
<
ElScrollbar
v
-
loading=
{
pageLoading
.
value
}
v
-
loading=
{
pageLoading
.
value
}
class=
{
[
class=
{
[
`${prefixCls}-content-scrollbar`
,
`${prefixCls}-content-scrollbar`
,
{
{
'mt-[var(--tags-view-height)] !pb-[calc(var(--tags-view-height)+var(--app-footer-height))]'
:
'!h-[calc(100%-var(--tags-view-height))] mt-[calc(var(--tags-view-height))]'
:
fixedHeader
.
value
,
fixedHeader
.
value
'pb-[var(--app-footer-height)]'
:
!
fixedHeader
.
value
}
}
]
}
]
}
>
>
...
@@ -216,7 +206,7 @@ export const useRenderLayout = () => {
...
@@ -216,7 +206,7 @@ export const useRenderLayout = () => {
class=
{
[
class=
{
[
'layout-border__bottom layout-border__top relative'
,
'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);"
style=
"transition: width var(--transition-time-02), left var(--transition-time-02);"
...
@@ -238,7 +228,7 @@ export const useRenderLayout = () => {
...
@@ -238,7 +228,7 @@ export const useRenderLayout = () => {
<
ToolHeader
class=
"flex-1"
></
ToolHeader
>
<
ToolHeader
class=
"flex-1"
></
ToolHeader
>
</
div
>
</
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
>
<
TabMenu
></
TabMenu
>
<
div
<
div
class=
{
[
class=
{
[
...
@@ -270,18 +260,16 @@ export const useRenderLayout = () => {
...
@@ -270,18 +260,16 @@ export const useRenderLayout = () => {
{
tagsView
.
value
?
(
{
tagsView
.
value
?
(
<
TagsView
<
TagsView
class=
{
[
class=
{
[
'relative layout-border__bottom
layout-border__top
'
,
'relative layout-border__bottom'
,
{
{
'!fixed top-0 left-0 z-10'
:
fixedHeader
.
value
,
'!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)]'
:
'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)]'
:
'w-[calc(100%-var(--tab-menu-max-width))] !left-[var(--tab-menu-max-width)] mt-[var(--logo-height)]'
:
!
collapse
.
value
&&
fixedHeader
.
value
,
!
collapse
.
value
&&
fixedHeader
.
value
&&
!
fixedMenu
.
value
,
'!fixed top-0 !left-[var(--tab-menu-min-width)+var(--left-menu-max-width)] z-10'
:
'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)]'
:
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
,
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
!
collapse
.
value
&&
fixedHeader
.
value
&&
fixedMenu
.
value
}
}
]
}
]
}
...
...
uno.config.ts
View file @
8c28b8d2
...
@@ -12,7 +12,7 @@ export default defineConfig({
...
@@ -12,7 +12,7 @@ export default defineConfig({
${
selector
}
{
${
selector
}
{
display: flex;
display: flex;
height: 100%;
height: 100%;
padding:
1px 10px 0
;
padding:
0 10px
;
cursor: pointer;
cursor: pointer;
align-items: center;
align-items: center;
transition: background var(--transition-time-02);
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