Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 87cc8a15
authored
Aug 26, 2024
by
Vben
Committed by
GitHub
Aug 26, 2024
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: sidebar scrolling does not meet expectations (#4241)
1 parent
54a622ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
packages/@core/composables/src/use-content-style.ts
packages/@core/ui-kit/layout-ui/src/components/layout-sidebar.vue
packages/@core/composables/src/use-content-style.ts
View file @
87cc8a1
...
@@ -28,7 +28,7 @@ function useContentStyle() {
...
@@ -28,7 +28,7 @@ function useContentStyle() {
position
:
'fixed'
,
position
:
'fixed'
,
top
:
`
${
top
}
px`
,
top
:
`
${
top
}
px`
,
width
:
`
${
width
}
px`
,
width
:
`
${
width
}
px`
,
zIndex
:
1
00
0
,
zIndex
:
1
5
0
,
};
};
});
});
...
...
packages/@core/ui-kit/layout-ui/src/components/layout-sidebar.vue
View file @
87cc8a1
...
@@ -4,6 +4,8 @@ import { computed, shallowRef, useSlots, watchEffect } from 'vue';
...
@@ -4,6 +4,8 @@ import { computed, shallowRef, useSlots, watchEffect } from 'vue';
import
{
VbenScrollbar
}
from
'@vben-core/shadcn-ui'
;
import
{
VbenScrollbar
}
from
'@vben-core/shadcn-ui'
;
import
{
useScrollLock
}
from
'@vueuse/core'
;
import
{
SidebarCollapseButton
,
SidebarFixedButton
}
from
'./widgets'
;
import
{
SidebarCollapseButton
,
SidebarFixedButton
}
from
'./widgets'
;
interface
Props
{
interface
Props
{
...
@@ -102,6 +104,7 @@ const expandOnHovering = defineModel<boolean>('expandOnHovering');
...
@@ -102,6 +104,7 @@ const expandOnHovering = defineModel<boolean>('expandOnHovering');
const
expandOnHover
=
defineModel
<
boolean
>
(
'expandOnHover'
);
const
expandOnHover
=
defineModel
<
boolean
>
(
'expandOnHover'
);
const
extraVisible
=
defineModel
<
boolean
>
(
'extraVisible'
);
const
extraVisible
=
defineModel
<
boolean
>
(
'extraVisible'
);
const
isLocked
=
useScrollLock
(
document
.
body
);
const
slots
=
useSlots
();
const
slots
=
useSlots
();
const
asideRef
=
shallowRef
<
HTMLDivElement
|
null
>
();
const
asideRef
=
shallowRef
<
HTMLDivElement
|
null
>
();
...
@@ -214,6 +217,7 @@ function handleMouseenter() {
...
@@ -214,6 +217,7 @@ function handleMouseenter() {
if
(
!
expandOnHovering
.
value
)
{
if
(
!
expandOnHovering
.
value
)
{
collapse
.
value
=
false
;
collapse
.
value
=
false
;
}
}
isLocked
.
value
=
true
;
expandOnHovering
.
value
=
true
;
expandOnHovering
.
value
=
true
;
}
}
...
@@ -224,6 +228,7 @@ function handleMouseleave() {
...
@@ -224,6 +228,7 @@ function handleMouseleave() {
return
;
return
;
}
}
isLocked
.
value
=
false
;
expandOnHovering
.
value
=
false
;
expandOnHovering
.
value
=
false
;
collapse
.
value
=
true
;
collapse
.
value
=
true
;
extraVisible
.
value
=
false
;
extraVisible
.
value
=
false
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment