|
|
@@ -25,8 +25,10 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { ref } from 'vue'
|
|
|
+import { useRouter } from 'vue-router'
|
|
|
import Cookies from 'js-cookie'
|
|
|
|
|
|
+const router = useRouter()
|
|
|
const emit = defineEmits(['addSystemMenuView'])
|
|
|
const isLogin = ref(Cookies.get('isLogin') || '')
|
|
|
const showDropdown = ref(false)
|
|
|
@@ -65,7 +67,7 @@ const menuInfos = ref([
|
|
|
const onHover = (item) => { if (item.children) { dropdownChildren.value = item.children; showDropdown.value = true } }
|
|
|
const onLeave = () => { keepShow.value = false; setTimeout(() => { if (!keepShow.value) showDropdown.value = false }, 150) }
|
|
|
const keepOpen = () => { keepShow.value = true }
|
|
|
-const onClick = (item) => { showDropdown.value = false; if (item.href) emit('addSystemMenuView', { viewItem: item }) }
|
|
|
+const onClick = (item) => { showDropdown.value = false; if (item.href) { router.push(item.href) } }
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|