'admin-21.08.14优化修复菜单高亮、右键菜单全屏、国际化等'

This commit is contained in:
lyt-Top 2021-08-14 18:03:50 +08:00
parent c49736ae7d
commit e0960f9009
22 changed files with 197 additions and 100 deletions

View File

@ -2,6 +2,18 @@
🎉🎉🔥 `vue-next-admin` 基于 vue3.x 、Typescript、vite、Element plus 等适配手机、平板、pc 的后台开源免费模板库vue2.x 请切换 vue-prev-admin 分支) 🎉🎉🔥 `vue-next-admin` 基于 vue3.x 、Typescript、vite、Element plus 等适配手机、平板、pc 的后台开源免费模板库vue2.x 请切换 vue-prev-admin 分支)
## 1.0.16
`2021.08.14`
- 🌟 更新 依赖更新最新版本
- 🎯 优化 菜单高亮(详情且详情设置了 meta.isHide 时,顶级菜单高亮),感谢群友@YourObject
- 🎯 优化 详情路径写法:如父级(/pages/filtering那么详情为/pages/filtering/details?id=1。这样写可实现详情时父级菜单高亮否则写成/pages/filteringDetails?id=1顶级菜单将不会高亮。可参考`页面/过滤筛选组件`,点击当前图片进行测试
- 🎯 优化 tagsView 右键菜单全屏时,打开的界面高度问题
- 🎯 优化 图表批量 resize 问题
- 🐞 修复 菜单收起时设置全局主题primary 且有二级菜单时),文字高亮颜色不对
- 🐞 修复 国际化 <a href="https://gitee.com/lyt-top/vue-next-admin/issues/I43NPE" target="_blank">#I43NPE</a>。可参考:`页面/过滤筛选组件`,点击顶部语言切换,进行底部分页国际化查看
## 1.0.15 ## 1.0.15
`2021.08.06` `2021.08.06`

View File

@ -1,6 +1,6 @@
{ {
"name": "vue-next-admin", "name": "vue-next-admin",
"version": "1.0.15", "version": "1.0.16",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",
@ -11,7 +11,7 @@
"countup.js": "^2.0.8", "countup.js": "^2.0.8",
"cropperjs": "^1.5.12", "cropperjs": "^1.5.12",
"echarts": "^5.1.2", "echarts": "^5.1.2",
"echarts-gl": "^2.0.7", "echarts-gl": "^2.0.8",
"echarts-wordcloud": "^2.0.0", "echarts-wordcloud": "^2.0.0",
"element-plus": "^1.0.2-beta.70", "element-plus": "^1.0.2-beta.70",
"mitt": "^3.0.0", "mitt": "^3.0.0",
@ -33,16 +33,16 @@
"devDependencies": { "devDependencies": {
"@types/axios": "^0.14.0", "@types/axios": "^0.14.0",
"@types/clipboard": "^2.0.1", "@types/clipboard": "^2.0.1",
"@types/node": "^16.4.13", "@types/node": "^16.6.1",
"@types/nprogress": "^0.2.0", "@types/nprogress": "^0.2.0",
"@types/sortablejs": "^1.10.7", "@types/sortablejs": "^1.10.7",
"@typescript-eslint/eslint-plugin": "^4.29.0", "@typescript-eslint/eslint-plugin": "^4.29.1",
"@typescript-eslint/parser": "^4.29.0", "@typescript-eslint/parser": "^4.29.1",
"@vitejs/plugin-vue": "^1.3.0", "@vitejs/plugin-vue": "^1.4.0",
"@vue/compiler-sfc": "^3.1.5", "@vue/compiler-sfc": "^3.2.2",
"dotenv": "^10.0.0", "dotenv": "^10.0.0",
"eslint": "^7.32.0", "eslint": "^7.32.0",
"eslint-plugin-vue": "^7.15.1", "eslint-plugin-vue": "^7.16.0",
"prettier": "^2.3.2", "prettier": "^2.3.2",
"sass": "^1.37.5", "sass": "^1.37.5",
"sass-loader": "^12.1.0", "sass-loader": "^12.1.0",

View File

@ -1,12 +1,14 @@
<template> <template>
<el-config-provider :locale="i18nLocale">
<router-view v-show="getThemeConfig.lockScreenTime !== 0" /> <router-view v-show="getThemeConfig.lockScreenTime !== 0" />
<LockScreen v-if="getThemeConfig.isLockScreen" /> <LockScreen v-if="getThemeConfig.isLockScreen" />
<Setings ref="setingsRef" v-show="getThemeConfig.lockScreenTime !== 0" /> <Setings ref="setingsRef" v-show="getThemeConfig.lockScreenTime !== 0" />
<CloseFull /> <CloseFull />
</el-config-provider>
</template> </template>
<script lang="ts"> <script lang="ts">
import { computed, ref, getCurrentInstance, onBeforeMount, onMounted, onUnmounted, nextTick, defineComponent, watch } from 'vue'; import { computed, ref, getCurrentInstance, onBeforeMount, onMounted, onUnmounted, nextTick, defineComponent, watch, reactive, toRefs } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { useStore } from '/@/store/index'; import { useStore } from '/@/store/index';
import { useTitle } from '/@/utils/setWebTitle'; import { useTitle } from '/@/utils/setWebTitle';
@ -24,6 +26,9 @@ export default defineComponent({
const route = useRoute(); const route = useRoute();
const store = useStore(); const store = useStore();
const title = useTitle(); const title = useTitle();
const state = reactive({
i18nLocale: null,
});
// //
const getThemeConfig = computed(() => { const getThemeConfig = computed(() => {
return store.state.themeConfig.themeConfig; return store.state.themeConfig.themeConfig;
@ -46,6 +51,10 @@ export default defineComponent({
proxy.mittBus.on('openSetingsDrawer', () => { proxy.mittBus.on('openSetingsDrawer', () => {
openSetingsDrawer(); openSetingsDrawer();
}); });
// i18nApp.vue el-config-provider
proxy.mittBus.on('getI18nConfig', (locale: string) => {
state.i18nLocale = locale;
});
// //
if (Local.get('themeConfig')) { if (Local.get('themeConfig')) {
store.dispatch('themeConfig/setThemeConfig', Local.get('themeConfig')); store.dispatch('themeConfig/setThemeConfig', Local.get('themeConfig'));
@ -53,9 +62,10 @@ export default defineComponent({
} }
}); });
}); });
// // /i18n
onUnmounted(() => { onUnmounted(() => {
proxy.mittBus.off('openSetingsDrawer', () => {}); proxy.mittBus.off('openSetingsDrawer', () => {});
proxy.mittBus.off('getI18nConfig', () => {});
}); });
// //
watch( watch(
@ -67,6 +77,7 @@ export default defineComponent({
return { return {
setingsRef, setingsRef,
getThemeConfig, getThemeConfig,
...toRefs(state),
}; };
}, },
}); });

View File

@ -26,7 +26,7 @@ import pagesFormI18nZhtw from '/@/i18n/pages/formI18n/zh-tw';
*/ */
const messages = { const messages = {
[zhcnLocale.name]: { [zhcnLocale.name]: {
el: zhcnLocale.el, ...zhcnLocale,
message: { message: {
...nextZhcn, ...nextZhcn,
...pagesHomeZhcn, ...pagesHomeZhcn,
@ -35,7 +35,7 @@ const messages = {
}, },
}, },
[enLocale.name]: { [enLocale.name]: {
el: enLocale.el, ...enLocale,
message: { message: {
...nextEn, ...nextEn,
...pagesHomeEn, ...pagesHomeEn,
@ -44,7 +44,7 @@ const messages = {
}, },
}, },
[zhtwLocale.name]: { [zhtwLocale.name]: {
el: zhtwLocale.el, ...zhtwLocale,
message: { message: {
...nextZhtw, ...nextZhtw,
...pagesHomeZhtw, ...pagesHomeZhtw,

View File

@ -194,17 +194,24 @@ export default {
initI18n(); initI18n();
title(); title();
}; };
// element plus
const setI18nConfig = (locale: string) => {
proxy.mittBus.emit('getI18nConfig', proxy.$i18n.messages[locale]);
};
// //
const initI18n = () => { const initI18n = () => {
switch (Local.get('themeConfig').globalI18n) { switch (Local.get('themeConfig').globalI18n) {
case 'zh-cn': case 'zh-cn':
state.disabledI18n = 'zh-cn'; state.disabledI18n = 'zh-cn';
setI18nConfig('zh-cn');
break; break;
case 'en': case 'en':
state.disabledI18n = 'en'; state.disabledI18n = 'en';
setI18nConfig('en');
break; break;
case 'zh-tw': case 'zh-tw':
state.disabledI18n = 'zh-tw'; state.disabledI18n = 'zh-tw';
setI18nConfig('zh-tw');
break; break;
} }
}; };

View File

@ -46,7 +46,6 @@ import Sortable from 'sortablejs';
import { ElMessage } from 'element-plus'; import { ElMessage } from 'element-plus';
import { useStore } from '/@/store/index'; import { useStore } from '/@/store/index';
import { Session } from '/@/utils/storage'; import { Session } from '/@/utils/storage';
import { NextLoading } from '/@/utils/loading';
import { isObjectValueEqual } from '/@/utils/arrayOperation'; import { isObjectValueEqual } from '/@/utils/arrayOperation';
import Contextmenu from '/@/layout/navBars/tagsView/contextmenu.vue'; import Contextmenu from '/@/layout/navBars/tagsView/contextmenu.vue';
export default { export default {
@ -242,19 +241,7 @@ export default {
const item = state.tagsViewList.find((v: any) => (getThemeConfig.value.isShareTagsView ? v.path === path : v.url === path)); const item = state.tagsViewList.find((v: any) => (getThemeConfig.value.isShareTagsView ? v.path === path : v.url === path));
if (item.meta.isDynamic) await router.push({ name: item.name, params: item.params }); if (item.meta.isDynamic) await router.push({ name: item.name, params: item.params });
else await router.push({ name: item.name, query: item.query }); else await router.push({ name: item.name, query: item.query });
NextLoading.start();
setTimeout(() => {
nextTick(() => {
store.dispatch('tagsViewRoutes/setCurrenFullscreen', true); store.dispatch('tagsViewRoutes/setCurrenFullscreen', true);
if (store.state.tagsViewRoutes.isTagsViewCurrenFull) {
const element = document.querySelector('.layout-main .layout-view-bg-white') as HTMLElement;
if (!element) return false;
// iframes
if (route.path === '/iframes') element.style.height = `100vh`;
else element.style.height = `calc(100vh - 30px)`;
}
});
}, 1000);
}; };
// tagsView // tagsView
// tagsView // tagsView

View File

@ -66,15 +66,6 @@ export default defineComponent({
proxy.$refs.elMenuHorizontalScrollRef.$refs.wrap.scrollLeft = els.offsetLeft; proxy.$refs.elMenuHorizontalScrollRef.$refs.wrap.scrollLeft = els.offsetLeft;
}); });
}; };
//
const setCurrentRouterHighlight = (path: string) => {
const currentPathSplit = path.split('/');
if (store.state.themeConfig.themeConfig.layout === 'classic') {
state.defaultActive = `/${currentPathSplit[1]}`;
} else {
state.defaultActive = path;
}
};
// //
const filterRoutesFun = (arr: Array<object>) => { const filterRoutesFun = (arr: Array<object>) => {
return arr return arr
@ -99,15 +90,26 @@ export default defineComponent({
}); });
return currentData; return currentData;
}; };
//
const setCurrentRouterHighlight = (currentRoute) => {
const { path, meta } = currentRoute;
if (store.state.themeConfig.themeConfig.layout === 'classic') {
state.defaultActive = `/${path.split('/')[1]}`;
} else {
const pathSplit = meta.isDynamic ? meta.isDynamicPath.split('/') : path.split('/');
if (pathSplit.length >= 4 && meta.isHide) state.defaultActive = pathSplit.splice(0, 3).join('/');
else state.defaultActive = path;
}
};
// //
onMounted(() => { onMounted(() => {
initElMenuOffsetLeft(); initElMenuOffsetLeft();
setCurrentRouterHighlight(route.meta.isDynamic ? route.meta.isDynamicPath : route.path); setCurrentRouterHighlight(route);
}); });
// //
onBeforeRouteUpdate((to) => { onBeforeRouteUpdate((to) => {
// https://gitee.com/lyt-top/vue-next-admin/issues/I3YX6G // https://gitee.com/lyt-top/vue-next-admin/issues/I3YX6G
setCurrentRouterHighlight(to.meta.isDynamic ? to.meta.isDynamicPath : to.path); setCurrentRouterHighlight(to);
proxy.mittBus.emit('onMenuClick'); proxy.mittBus.emit('onMenuClick');
// tagsView // tagsView
let { layout, isClassicSplitMenu } = store.state.themeConfig.themeConfig; let { layout, isClassicSplitMenu } = store.state.themeConfig.themeConfig;

View File

@ -29,7 +29,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { toRefs, reactive, computed, defineComponent, getCurrentInstance } from 'vue'; import { toRefs, reactive, computed, defineComponent, getCurrentInstance, onMounted } from 'vue';
import { useRoute, onBeforeRouteUpdate } from 'vue-router'; import { useRoute, onBeforeRouteUpdate } from 'vue-router';
import { useStore } from '/@/store/index'; import { useStore } from '/@/store/index';
import SubItem from '/@/layout/navMenu/subItem.vue'; import SubItem from '/@/layout/navMenu/subItem.vue';
@ -62,10 +62,21 @@ export default defineComponent({
const setIsCollapse = computed(() => { const setIsCollapse = computed(() => {
return document.body.clientWidth < 1000 ? false : getThemeConfig.value.isCollapse; return document.body.clientWidth < 1000 ? false : getThemeConfig.value.isCollapse;
}); });
//
const setParentHighlight = (currentRoute) => {
const { path, meta } = currentRoute;
const pathSplit = meta.isDynamic ? meta.isDynamicPath.split('/') : path.split('/');
if (pathSplit.length >= 4 && meta.isHide) return pathSplit.splice(0, 3).join('/');
else return path;
};
//
onMounted(() => {
state.defaultActive = setParentHighlight(route);
});
// //
onBeforeRouteUpdate((to) => { onBeforeRouteUpdate((to) => {
// https://gitee.com/lyt-top/vue-next-admin/issues/I3YX6G // https://gitee.com/lyt-top/vue-next-admin/issues/I3YX6G
state.defaultActive = to.meta.isDynamic ? to.meta.isDynamicPath : to.path; state.defaultActive = setParentHighlight(to);
proxy.mittBus.emit('onMenuClick'); proxy.mittBus.emit('onMenuClick');
const clientWidth = document.body.clientWidth; const clientWidth = document.body.clientWidth;
if (clientWidth < 1000) getThemeConfig.value.isCollapse = false; if (clientWidth < 1000) getThemeConfig.value.isCollapse = false;

View File

@ -32,8 +32,13 @@ export default defineComponent({
// iframe // iframe
const setIframeHeight = computed(() => { const setIframeHeight = computed(() => {
let { isTagsview } = store.state.themeConfig.themeConfig; let { isTagsview } = store.state.themeConfig.themeConfig;
let { isTagsViewCurrenFull } = store.state.tagsViewRoutes;
if (isTagsViewCurrenFull) {
return `0px`;
} else {
if (isTagsview) return `84px`; if (isTagsview) return `84px`;
else return `50px`; else return `50px`;
}
}); });
// //
onMounted(() => { onMounted(() => {

View File

@ -574,9 +574,15 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
auth: ['admin', 'test'], auth: ['admin', 'test'],
icon: 'el-icon-sell', icon: 'el-icon-sell',
}, },
}, /**
*
* 1///
* 2///
* 3///pages/filteringDetails
*/
children: [
{ {
path: '/pages/filteringDetails', path: '/pages/filtering/details',
name: 'pagesFilteringDetails', name: 'pagesFilteringDetails',
component: () => import('/@/views/pages/filtering/details.vue'), component: () => import('/@/views/pages/filtering/details.vue'),
meta: { meta: {
@ -590,8 +596,10 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
icon: 'el-icon-s-order', icon: 'el-icon-s-order',
}, },
}, },
],
},
{ {
path: '/pages/filteringDetails1', path: '/pages/filtering/details1',
name: 'pagesFilteringDetails1', name: 'pagesFilteringDetails1',
component: () => import('/@/views/pages/filtering/details1.vue'), component: () => import('/@/views/pages/filtering/details1.vue'),
meta: { meta: {

View File

@ -798,8 +798,9 @@
color: set-color(primary); color: set-color(primary);
} }
} }
// 高亮时 // 高亮时/菜单收起时
.el-menu-item.is-active { .el-menu-item.is-active,
.el-menu--collapse .el-submenu.is-active i {
color: set-color(primary); color: set-color(primary);
} }
.el-active-extend { .el-active-extend {

View File

@ -202,7 +202,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { toRefs, reactive, computed, onMounted, getCurrentInstance, watch, nextTick } from 'vue'; import { toRefs, reactive, computed, onMounted, getCurrentInstance, watch, nextTick, onActivated } from 'vue';
import { useStore } from '/@/store/index'; import { useStore } from '/@/store/index';
import ChartHead from '/@/views/chart/head.vue'; import ChartHead from '/@/views/chart/head.vue';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
@ -225,8 +225,13 @@ export default {
// //
const initTagViewHeight = computed(() => { const initTagViewHeight = computed(() => {
let { isTagsview } = store.state.themeConfig.themeConfig; let { isTagsview } = store.state.themeConfig.themeConfig;
let { isTagsViewCurrenFull } = store.state.tagsViewRoutes;
if (isTagsViewCurrenFull) {
return `30px`;
} else {
if (isTagsview) return `114px`; if (isTagsview) return `114px`;
else return `80px`; else return `80px`;
}
}); });
// 1 // 1
const initChartsCenterOne = () => { const initChartsCenterOne = () => {
@ -440,13 +445,17 @@ export default {
state.myCharts.push(myChart); state.myCharts.push(myChart);
}; };
// echarts resize // echarts resize
const initEchartsResize = () => { const initEchartsResizeFun = () => {
window.addEventListener('resize', () => { nextTick(() => {
for (let i = 0; i < state.myCharts.length; i++) { for (let i = 0; i < state.myCharts.length; i++) {
state.myCharts[i].resize(); state.myCharts[i].resize();
} }
}); });
}; };
// echarts resize
const initEchartsResize = () => {
window.addEventListener('resize', initEchartsResizeFun);
};
// //
onMounted(() => { onMounted(() => {
initChartsCenterOne(); initChartsCenterOne();
@ -456,15 +465,15 @@ export default {
initChartsInvestment(); initChartsInvestment();
initEchartsResize(); initEchartsResize();
}); });
// keep-alive
onActivated(() => {
initEchartsResizeFun();
});
// vuex tagsview resize / // vuex tagsview resize /
watch( watch(
() => store.state.tagsViewRoutes.isTagsViewCurrenFull, () => store.state.tagsViewRoutes.isTagsViewCurrenFull,
() => { () => {
nextTick(() => { initEchartsResizeFun();
for (let i = 0; i < state.myCharts.length; i++) {
state.myCharts[i].resize();
}
});
} }
); );
return { return {

View File

@ -23,8 +23,13 @@ export default {
// //
const initTagViewHeight = computed(() => { const initTagViewHeight = computed(() => {
let { isTagsview } = store.state.themeConfig.themeConfig; let { isTagsview } = store.state.themeConfig.themeConfig;
let { isTagsViewCurrenFull } = store.state.tagsViewRoutes;
if (isTagsViewCurrenFull) {
return `30px`;
} else {
if (isTagsview) return `114px`; if (isTagsview) return `114px`;
else return `80px`; else return `80px`;
}
}); });
// echartsMap // echartsMap
const convertData = (data) => { const convertData = (data) => {

View File

@ -23,8 +23,13 @@ export default {
// //
const initTagViewHeight = computed(() => { const initTagViewHeight = computed(() => {
let { isTagsview } = store.state.themeConfig.themeConfig; let { isTagsview } = store.state.themeConfig.themeConfig;
let { isTagsViewCurrenFull } = store.state.tagsViewRoutes;
if (isTagsViewCurrenFull) {
return `30px`;
} else {
if (isTagsview) return `114px`; if (isTagsview) return `114px`;
else return `80px`; else return `80px`;
}
}); });
// //
const initEchartsTree = () => { const initEchartsTree = () => {

View File

@ -96,7 +96,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { toRefs, reactive, onMounted, nextTick, computed, getCurrentInstance, watch } from 'vue'; import { toRefs, reactive, onMounted, nextTick, computed, getCurrentInstance, watch, onActivated } from 'vue';
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import { CountUp } from 'countup.js'; import { CountUp } from 'countup.js';
import { formatAxis } from '/@/utils/formatTime'; import { formatAxis } from '/@/utils/formatTime';
@ -290,13 +290,17 @@ export default {
state.myCharts.push(myChart); state.myCharts.push(myChart);
}; };
// echarts resize // echarts resize
const initEchartsResize = () => { const initEchartsResizeFun = () => {
window.addEventListener('resize', () => { nextTick(() => {
for (let i = 0; i < state.myCharts.length; i++) { for (let i = 0; i < state.myCharts.length; i++) {
state.myCharts[i].resize(); state.myCharts[i].resize();
} }
}); });
}; };
// echarts resize
const initEchartsResize = () => {
window.addEventListener('resize', initEchartsResizeFun);
};
// //
onMounted(() => { onMounted(() => {
initNumCountUp(); initNumCountUp();
@ -304,15 +308,15 @@ export default {
initHomeOvertime(); initHomeOvertime();
initEchartsResize(); initEchartsResize();
}); });
// keep-alive
onActivated(() => {
initEchartsResizeFun();
});
// vuex tagsview resize / // vuex tagsview resize /
watch( watch(
() => store.state.tagsViewRoutes.isTagsViewCurrenFull, () => store.state.tagsViewRoutes.isTagsViewCurrenFull,
() => { () => {
nextTick(() => { initEchartsResizeFun();
for (let i = 0; i < state.myCharts.length; i++) {
state.myCharts[i].resize();
}
});
} }
); );
return { return {

View File

@ -21,8 +21,13 @@ export default {
// //
const initTagViewHeight = computed(() => { const initTagViewHeight = computed(() => {
let { isTagsview } = store.state.themeConfig.themeConfig; let { isTagsview } = store.state.themeConfig.themeConfig;
let { isTagsViewCurrenFull } = store.state.tagsViewRoutes;
if (isTagsViewCurrenFull) {
return `30px`;
} else {
if (isTagsview) return `114px`; if (isTagsview) return `114px`;
else return `80px`; else return `80px`;
}
}); });
return { return {
initTagViewHeight, initTagViewHeight,

View File

@ -21,8 +21,13 @@ export default {
// //
const initTagViewHeight = computed(() => { const initTagViewHeight = computed(() => {
let { isTagsview } = store.state.themeConfig.themeConfig; let { isTagsview } = store.state.themeConfig.themeConfig;
let { isTagsViewCurrenFull } = store.state.tagsViewRoutes;
if (isTagsViewCurrenFull) {
return `30px`;
} else {
if (isTagsview) return `114px`; if (isTagsview) return `114px`;
else return `80px`; else return `80px`;
}
}); });
return { return {
initTagViewHeight, initTagViewHeight,

View File

@ -145,12 +145,12 @@ export default {
const onTableItemClick = (v: object) => { const onTableItemClick = (v: object) => {
if (v.id === 1) { if (v.id === 1) {
router.push({ router.push({
path: '/pages/filteringDetails', path: '/pages/filtering/details',
query: { id: v.id }, query: { id: v.id },
}); });
} else { } else {
router.push({ router.push({
path: '/pages/filteringDetails1', path: '/pages/filtering/details1',
query: { id: v.id }, query: { id: v.id },
}); });
} }

View File

@ -23,8 +23,13 @@ export default defineComponent({
// view // view
const setViewHeight = computed(() => { const setViewHeight = computed(() => {
let { isTagsview } = store.state.themeConfig.themeConfig; let { isTagsview } = store.state.themeConfig.themeConfig;
let { isTagsViewCurrenFull } = store.state.tagsViewRoutes;
if (isTagsViewCurrenFull) {
return `30px`;
} else {
if (isTagsview) return `114px`; if (isTagsview) return `114px`;
else return `80px`; else return `80px`;
}
}); });
// //
onMounted(() => { onMounted(() => {

View File

@ -26,8 +26,13 @@ export default defineComponent({
// view // view
const setViewHeight = computed(() => { const setViewHeight = computed(() => {
let { isTagsview } = store.state.themeConfig.themeConfig; let { isTagsview } = store.state.themeConfig.themeConfig;
let { isTagsViewCurrenFull } = store.state.tagsViewRoutes;
if (isTagsViewCurrenFull) {
return `30px`;
} else {
if (isTagsview) return `114px`; if (isTagsview) return `114px`;
else return `80px`; else return `80px`;
}
}); });
// //
const onGoDetailsClick = () => { const onGoDetailsClick = () => {

View File

@ -23,8 +23,13 @@ export default defineComponent({
// view // view
const setViewHeight = computed(() => { const setViewHeight = computed(() => {
let { isTagsview } = store.state.themeConfig.themeConfig; let { isTagsview } = store.state.themeConfig.themeConfig;
let { isTagsViewCurrenFull } = store.state.tagsViewRoutes;
if (isTagsViewCurrenFull) {
return `30px`;
} else {
if (isTagsview) return `114px`; if (isTagsview) return `114px`;
else return `80px`; else return `80px`;
}
}); });
// //
onMounted(() => { onMounted(() => {

View File

@ -26,8 +26,13 @@ export default defineComponent({
// view // view
const setViewHeight = computed(() => { const setViewHeight = computed(() => {
let { isTagsview } = store.state.themeConfig.themeConfig; let { isTagsview } = store.state.themeConfig.themeConfig;
let { isTagsViewCurrenFull } = store.state.tagsViewRoutes;
if (isTagsViewCurrenFull) {
return `30px`;
} else {
if (isTagsview) return `114px`; if (isTagsview) return `114px`;
else return `80px`; else return `80px`;
}
}); });
// //
const onGoDetailsClick = () => { const onGoDetailsClick = () => {