mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-15 23:12:01 +08:00
feature: 简易版菜单宽度拖拽功能
This commit is contained in:
@@ -211,6 +211,14 @@ 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>
|
||||
@@ -267,6 +275,7 @@ const headerSlots = computed(() => {
|
||||
(value: boolean) =>
|
||||
updatePreferences({ sidebar: { extraCollapse: value } })
|
||||
"
|
||||
@update:sidebar-width="handleUpdateSidebarWidth"
|
||||
>
|
||||
<!-- logo -->
|
||||
<template #logo>
|
||||
|
||||
Reference in New Issue
Block a user