mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-21 03:08:57 +08:00
feat: 优化侧边栏拖拽逻辑
This commit is contained in:
@@ -211,14 +211,6 @@ const slots: SetupContext['slots'] = useSlots();
|
||||
const headerSlots = computed(() => {
|
||||
return Object.keys(slots).filter((key) => key.startsWith('header-'));
|
||||
});
|
||||
|
||||
function handleUpdateSidebarWidth(newWidth: number) {
|
||||
updatePreferences({
|
||||
sidebar: {
|
||||
width: newWidth,
|
||||
},
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -275,7 +267,9 @@ function handleUpdateSidebarWidth(newWidth: number) {
|
||||
(value: boolean) =>
|
||||
updatePreferences({ sidebar: { extraCollapse: value } })
|
||||
"
|
||||
@update:sidebar-width="handleUpdateSidebarWidth"
|
||||
@update:sidebar-width="
|
||||
(value: number) => updatePreferences({ sidebar: { width: value } })
|
||||
"
|
||||
>
|
||||
<!-- logo -->
|
||||
<template #logo>
|
||||
|
||||
Reference in New Issue
Block a user