fix: 尝试处理退出放映工具栏状态可能不正确的问题(#151)

This commit is contained in:
pipipi-pikachu 2022-09-16 17:29:52 +08:00
parent 19aa06273a
commit 5b8695e9c0

View File

@ -93,7 +93,7 @@
</template>
<script lang="ts" setup>
import { onMounted, provide, ref, watch, watchEffect } from 'vue'
import { nextTick, onMounted, provide, ref, watch, watchEffect } from 'vue'
import { throttle } from 'lodash'
import { storeToRefs } from 'pinia'
import { useMainStore, useSlidesStore, useKeyboardStore } from '@/store'
@ -185,7 +185,9 @@ const { updateSlideIndex } = useSlideHandler()
//
// 退
onMounted(() => {
if (activeElementIdList.value.length) mainStore.setActiveElementIdList([])
if (activeElementIdList.value.length) {
nextTick(() => mainStore.setActiveElementIdList([]))
}
})
//