|
@@ -29,7 +29,6 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import store from '@/store'
|
|
|
import MenuItemV2 from "./MenuItemV2.vue";
|
|
|
import {computed, nextTick, onMounted, reactive, Ref, ref, watch} from "vue";
|
|
|
import {useRoute} from "vue-router";
|
|
@@ -41,6 +40,7 @@ import {treeSearch} from "@/utils/array-utils";
|
|
|
import {useCompRef} from "@/utils/useCompRef";
|
|
|
import {ElMenu} from "element-plus";
|
|
|
import {getUserMenu} from "@/api/settings/menu-settings";
|
|
|
+import {useSystemStore} from "@/pinia/system-store";
|
|
|
|
|
|
const menuText: Ref<string> = ref('')
|
|
|
const menuRef = useCompRef(ElMenu)
|
|
@@ -100,13 +100,14 @@ const menuLaunch = async path => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-const expandOneMenu = computed<boolean>(() => store.state['app'].expandOneMenu)
|
|
|
+const systemStore = useSystemStore()
|
|
|
+const expandOneMenu = computed<boolean>(() => systemStore.expandOneMenu)
|
|
|
const route = useRoute()
|
|
|
-const isCollapse = computed<boolean>(() => store.state['app'].isCollapse)
|
|
|
+const isCollapse = computed<boolean>(() => systemStore.getCollapse)
|
|
|
|
|
|
const expandMenu = () => {
|
|
|
if (isCollapse.value) {
|
|
|
- store.commit('app/isCollapseChange', false)
|
|
|
+ systemStore.setCollapse(false)
|
|
|
setTimeout(() => {
|
|
|
searchRef.value!.focus()
|
|
|
}, 100)
|