Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/widgets/WorkMenu/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const menuOptions = shallowRef(

const activeKey = ref<string | null>(null)
const refMenu = ref<MenuInst>()
console.log(refMenu)

let lockPush = false
const handleSelect = (key: string) => {
Expand Down Expand Up @@ -105,8 +104,11 @@ const setActiveKey = async (key: string) => {

watch(
() => route.fullPath,
() => {
if (lockPush) return
(newRoute) => {
if (
lockPush ||
!newRoute.includes('/work-platform') // 防止离开工作台后会继续 watch
) return

const targetRoute = recursion(menuOptions.value, route.name, {
id: 'key',
Expand Down Expand Up @@ -144,8 +146,6 @@ watch(
}
)



</script>

<style lang="scss" scoped>
Expand Down