|
|
@@ -4,7 +4,7 @@
|
|
|
<app-header>
|
|
|
<!-- <template #left>
|
|
|
<i class="icon-fold-expand" title="折叠/展开" @click="isCollapse = !isCollapse">
|
|
|
- <span :class="isCollapse ? 'g-icon--expand' : 'g-icon--fold'"></span>
|
|
|
+ <span :class="isCollapse ? 'g-icon-expand' : 'g-icon-fold'"></span>
|
|
|
</i>
|
|
|
</template> -->
|
|
|
</app-header>
|
|
|
@@ -27,12 +27,12 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<app-footer class="app-page__footer" :style="footerStyles" @tab-change="onTabChange">
|
|
|
- <div style="display: flex;align-items: center; font-size: 16px; gap: 20px;justify-content: flex-end;padding: 0 20px;color: #fff;">
|
|
|
- <span @click="minimize" style="cursor: pointer;">
|
|
|
+ <div class="iconbar">
|
|
|
+ <span @click="minimize">
|
|
|
<AppIcon icon="ArrowUp" v-if="footerWinType === -1" />
|
|
|
<AppIcon icon="ArrowDown" v-else />
|
|
|
</span>
|
|
|
- <span @click="maximize" style="cursor: pointer;">
|
|
|
+ <span @click="maximize">
|
|
|
<AppIcon icon="g-icon-minimize2" v-if="footerWinType === 1" />
|
|
|
<AppIcon icon="g-icon-maximize2" v-else />
|
|
|
</span>
|
|
|
@@ -76,8 +76,23 @@ import AppFooter from '../footer/index.vue'
|
|
|
import AppNavbar from '../navbar/index.vue'
|
|
|
import AppSidebar from '../sidebar/index.vue'
|
|
|
|
|
|
-
|
|
|
+const globalStore = useGlobalStore()
|
|
|
+const loginStore = useLoginStore()
|
|
|
+const fullLoading = ref(false)
|
|
|
+const isCollapse = ref(globalStore.isMobile)
|
|
|
const footerWinType = ref(0) // -1最小化,0默认,1最大化
|
|
|
+const serverTime = ref<Moment>()
|
|
|
+
|
|
|
+const meta = document.getElementsByTagName('meta')
|
|
|
+const version = meta.namedItem('revised')?.content ?? '0'
|
|
|
+
|
|
|
+// 手动给组件添加 name 属性,处理缓存 exclude 无效的问题
|
|
|
+const handleComponent = (component: Record<'type', { name: RouteRecordName | undefined }>, route: RouteRecordNormalized) => {
|
|
|
+ if (component) {
|
|
|
+ component.type.name = route.name
|
|
|
+ }
|
|
|
+ return component
|
|
|
+}
|
|
|
|
|
|
const bodyStyles = computed(() => {
|
|
|
if (footerWinType.value === 1) {
|
|
|
@@ -113,6 +128,7 @@ const footerStyles = computed(() => {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+// 最小化
|
|
|
const minimize = () => {
|
|
|
if (footerWinType.value === -1) {
|
|
|
footerWinType.value = 0
|
|
|
@@ -121,6 +137,7 @@ const minimize = () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// 最大化
|
|
|
const maximize = () => {
|
|
|
if (footerWinType.value === 1) {
|
|
|
footerWinType.value = 0
|
|
|
@@ -135,25 +152,6 @@ const onTabChange = () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-const globalStore = useGlobalStore()
|
|
|
-const loginStore = useLoginStore()
|
|
|
-const fullLoading = ref(false)
|
|
|
-const isCollapse = ref(globalStore.isMobile)
|
|
|
-const serverTime = ref<Moment>()
|
|
|
-
|
|
|
-const meta = document.getElementsByTagName('meta')
|
|
|
-const version = meta.namedItem('revised')?.content ?? '0'
|
|
|
-
|
|
|
-// 手动给组件添加 name 属性,处理缓存 exclude 无效的问题
|
|
|
-const handleComponent = (component: Record<'type', { name: RouteRecordName | undefined }>, route: RouteRecordNormalized) => {
|
|
|
- if (component) {
|
|
|
- component.type.name = route.name
|
|
|
- }
|
|
|
- return component
|
|
|
-}
|
|
|
-
|
|
|
// 校验服务器时间
|
|
|
const checkServerTime = () => {
|
|
|
getServerTime().then((res) => {
|