|
@@ -73,16 +73,21 @@ const appLogoName = ref(store.getLogoName)
|
|
|
//菜单数据
|
|
|
const menuBarKey = ref('')
|
|
|
const menuBarData = ref([])
|
|
|
-const isLayout = ref(useRoutes?.query?.layout)
|
|
|
+const isLayout = ref('')
|
|
|
|
|
|
//渲染完成
|
|
|
onMounted(() => {
|
|
|
+ const layout = useRoutes?.query?.layout, layout2 = store.isLayout
|
|
|
+ isLayout.value = layout ?? layout2
|
|
|
initButtons()
|
|
|
})
|
|
|
|
|
|
//监听layout
|
|
|
-watch(() => useRoutes?.query?.layout, (layout) => {
|
|
|
- isLayout.value = layout
|
|
|
+watch(() => [
|
|
|
+ useRoutes?.query?.layout,
|
|
|
+ store.isLayout,
|
|
|
+], ([layout, layout2]) => {
|
|
|
+ isLayout.value = layout ?? layout2
|
|
|
}, { deep: true })
|
|
|
|
|
|
//路由信息
|