|
@@ -1,4 +1,3 @@
|
|
|
-
|
|
|
|
|
<template>
|
|
<template>
|
|
|
<a-layout-content class="h-full main-container">
|
|
<a-layout-content class="h-full main-container">
|
|
|
<columns-layout v-if="appStore.layout === 'columns'" />
|
|
<columns-layout v-if="appStore.layout === 'columns'" />
|
|
@@ -6,7 +5,7 @@
|
|
|
<banner-layout v-if="appStore.layout === 'banner'" />
|
|
<banner-layout v-if="appStore.layout === 'banner'" />
|
|
|
<mixed-layout v-if="appStore.layout === 'mixed'" />
|
|
<mixed-layout v-if="appStore.layout === 'mixed'" />
|
|
|
|
|
|
|
|
- <setting ref="settingRef"/>
|
|
|
|
|
|
|
+ <setting ref="settingRef" />
|
|
|
|
|
|
|
|
<transition name="ma-slide-down" mode="out-in">
|
|
<transition name="ma-slide-down" mode="out-in">
|
|
|
<system-search ref="systemSearchRef" v-show="appStore.searchOpen" />
|
|
<system-search ref="systemSearchRef" v-show="appStore.searchOpen" />
|
|
@@ -18,49 +17,50 @@
|
|
|
</a-layout-content>
|
|
</a-layout-content>
|
|
|
</template>
|
|
</template>
|
|
|
<script setup>
|
|
<script setup>
|
|
|
- import { onMounted, ref, watch } from 'vue'
|
|
|
|
|
- import { useAppStore, useUserStore } from '@/store'
|
|
|
|
|
|
|
+import { onMounted, ref, watch } from 'vue'
|
|
|
|
|
+import { useAppStore, useUserStore } from '@/store'
|
|
|
|
|
|
|
|
- import ColumnsLayout from './components/columns/index.vue'
|
|
|
|
|
- import ClassicLayout from './components/classic/index.vue'
|
|
|
|
|
- import BannerLayout from './components/banner/index.vue'
|
|
|
|
|
- import MixedLayout from './components/mixed/index.vue'
|
|
|
|
|
- import Setting from './setting.vue'
|
|
|
|
|
- import SystemSearch from './search.vue'
|
|
|
|
|
- import MaButtonMenu from './components/ma-buttonMenu.vue'
|
|
|
|
|
|
|
+import ColumnsLayout from './components/columns/index.vue'
|
|
|
|
|
+import ClassicLayout from './components/classic/index.vue'
|
|
|
|
|
+import BannerLayout from './components/banner/index.vue'
|
|
|
|
|
+import MixedLayout from './components/mixed/index.vue'
|
|
|
|
|
+import Setting from './setting.vue'
|
|
|
|
|
+import SystemSearch from './search.vue'
|
|
|
|
|
+import MaButtonMenu from './components/ma-buttonMenu.vue'
|
|
|
|
|
|
|
|
- const appStore = useAppStore()
|
|
|
|
|
- const userStore = useUserStore()
|
|
|
|
|
|
|
+const appStore = useAppStore()
|
|
|
|
|
+const userStore = useUserStore()
|
|
|
|
|
|
|
|
- const settingRef = ref()
|
|
|
|
|
- const systemSearchRef = ref()
|
|
|
|
|
- watch(() => appStore.settingOpen, vl => {
|
|
|
|
|
|
|
+const settingRef = ref()
|
|
|
|
|
+const systemSearchRef = ref()
|
|
|
|
|
+watch(
|
|
|
|
|
+ () => appStore.settingOpen,
|
|
|
|
|
+ (vl) => {
|
|
|
if (vl === true) {
|
|
if (vl === true) {
|
|
|
settingRef.value.open()
|
|
settingRef.value.open()
|
|
|
appStore.settingOpen = false
|
|
appStore.settingOpen = false
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- const tagExitMaxSize = () => {
|
|
|
|
|
- document.getElementById('app').classList.remove('max-size')
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+)
|
|
|
|
|
|
|
|
- onMounted(() => {
|
|
|
|
|
- document.addEventListener('keydown', e => {
|
|
|
|
|
- const keyCode = e.keyCode ?? e.which ?? e.charCode
|
|
|
|
|
- const altKey = e.altKey ?? e.metaKey
|
|
|
|
|
- if(altKey && keyCode === 83) {
|
|
|
|
|
- appStore.searchOpen = true
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
|
|
+const tagExitMaxSize = () => {
|
|
|
|
|
+ document.getElementById('app').classList.remove('max-size')
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
- if (keyCode === 27) {
|
|
|
|
|
- appStore.searchOpen = false
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ document.addEventListener('keydown', (e) => {
|
|
|
|
|
+ const keyCode = e.keyCode ?? e.which ?? e.charCode
|
|
|
|
|
+ const altKey = e.altKey ?? e.metaKey
|
|
|
|
|
+ if (altKey && keyCode === 83) {
|
|
|
|
|
+ appStore.searchOpen = true
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
+ if (keyCode === 27) {
|
|
|
|
|
+ appStore.searchOpen = false
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+})
|
|
|
</script>
|
|
</script>
|
|
|
-<style scoped lang="less">
|
|
|
|
|
-</style>
|
|
|
|
|
|
|
+<style scoped lang="less"></style>
|