Skip to content

Commit 8149547

Browse files
committed
fix(Embedded Management): There is a problem with the display when it is collapsed
1 parent 1c80e84 commit 8149547

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

frontend/src/components/layout/LayoutDsl.vue

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts" setup>
2-
import { ref, computed } from 'vue'
2+
import { ref, computed, onUnmounted } from 'vue'
33
import Menu from './Menu.vue'
44
import LOGOCustom from '@/assets/svg/LOGO-custom.svg'
55
import custom_small from '@/assets/svg/logo-custom_small.svg'
@@ -18,17 +18,25 @@ import { useEmitt } from '@/utils/useEmitt'
1818
1919
const router = useRouter()
2020
const collapse = ref(false)
21+
const collapseCopy = ref(false)
2122
const appearanceStore = useAppearanceStoreWithOut()
22-
23+
let time: any
24+
onUnmounted(() => {
25+
clearTimeout(time)
26+
})
2327
const handleCollapseChange = (val: any = true) => {
24-
collapse.value = val
28+
collapseCopy.value = val
29+
clearTimeout(time)
30+
time = setTimeout(() => {
31+
collapse.value = val
32+
}, 100)
2533
}
2634
useEmitt({
2735
name: 'collapse-change',
2836
callback: handleCollapseChange,
2937
})
3038
const handleFoldExpand = () => {
31-
collapse.value = !collapse.value
39+
handleCollapseChange(!collapse.value)
3240
}
3341
3442
const toWorkspace = () => {
@@ -62,7 +70,7 @@ const showSysmenu = computed(() => {
6270
<LOGO v-else style="margin-bottom: 6px"></LOGO>
6371
</template>
6472
<Workspace v-if="!showSysmenu" :collapse="collapse"></Workspace>
65-
<Menu :collapse="collapse"></Menu>
73+
<Menu :collapse="collapseCopy"></Menu>
6674
<div class="bottom">
6775
<div
6876
v-if="showSysmenu"

0 commit comments

Comments
 (0)