mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-11-04 22:57:12 +08:00
升级:arco-design-pro-vue => 2.6.1(优化语言切换及修复若干问题)
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, computed, watch, provide } from 'vue';
|
||||
import { ref, computed, watch, provide, onMounted } from 'vue';
|
||||
import { useRouter, useRoute } from 'vue-router';
|
||||
import { useAppStore, useLoginStore } from '@/store';
|
||||
import NavBar from '@/components/navbar/index.vue';
|
||||
@@ -56,6 +56,7 @@
|
||||
import useResponsive from '@/hooks/responsive';
|
||||
import PageLayout from './page-layout.vue';
|
||||
|
||||
const isInit = ref(false);
|
||||
const appStore = useAppStore();
|
||||
const loginStore = useLoginStore();
|
||||
const router = useRouter();
|
||||
@@ -82,6 +83,7 @@
|
||||
return { ...paddingLeft, ...paddingTop };
|
||||
});
|
||||
const setCollapsed = (val: boolean) => {
|
||||
if (!isInit.value) return; // for page initialization menu state problem
|
||||
appStore.updateSettings({ menuCollapse: val });
|
||||
};
|
||||
watch(
|
||||
@@ -98,6 +100,9 @@
|
||||
provide('toggleDrawerMenu', () => {
|
||||
drawerVisible.value = !drawerVisible.value;
|
||||
});
|
||||
onMounted(() => {
|
||||
isInit.value = true;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
Reference in New Issue
Block a user