mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 01:17:23 +08:00
parent
7dcf98a178
commit
70af35dbf5
@ -1,5 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { split } from "lodash-es";
|
import { split } from "lodash-es";
|
||||||
|
import { nextTick } from "vue";
|
||||||
import panel from "../panel/index.vue";
|
import panel from "../panel/index.vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { emitter } from "/@/utils/mitt";
|
import { emitter } from "/@/utils/mitt";
|
||||||
@ -47,6 +48,16 @@ settings.weekVal === null
|
|||||||
? localOperate("weekVal", false, "set")
|
? localOperate("weekVal", false, "set")
|
||||||
: document.querySelector("html")?.setAttribute("class", "html-weakness");
|
: document.querySelector("html")?.setAttribute("class", "html-weakness");
|
||||||
|
|
||||||
|
if (settings.tagsVal === null) {
|
||||||
|
localOperate("tagsVal", false, "set");
|
||||||
|
settings.tagsVal = false;
|
||||||
|
}
|
||||||
|
nextTick(() => {
|
||||||
|
window.document
|
||||||
|
.querySelector(".app-main")
|
||||||
|
?.setAttribute("data-show-tag", settings.tagsVal);
|
||||||
|
});
|
||||||
|
|
||||||
function toggleClass(flag: boolean, clsName: string, target?: HTMLElement) {
|
function toggleClass(flag: boolean, clsName: string, target?: HTMLElement) {
|
||||||
const targetEl = target || document.body;
|
const targetEl = target || document.body;
|
||||||
let { className } = targetEl;
|
let { className } = targetEl;
|
||||||
|
@ -447,6 +447,9 @@ onBeforeMount(() => {
|
|||||||
emitter.on("tagViewsChange", key => {
|
emitter.on("tagViewsChange", key => {
|
||||||
if (unref(showTags) === key) return;
|
if (unref(showTags) === key) return;
|
||||||
showTags.value = key;
|
showTags.value = key;
|
||||||
|
window.document
|
||||||
|
.querySelector(".app-main")
|
||||||
|
?.setAttribute("data-show-tag", key);
|
||||||
});
|
});
|
||||||
|
|
||||||
// 改变标签风格
|
// 改变标签风格
|
||||||
|
@ -513,10 +513,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
body[data-layout="vertical"] {
|
body[data-layout="vertical"] {
|
||||||
.fixed-header + .app-main {
|
.fixed-header + .app-main[data-show-tag="false"] {
|
||||||
padding-top: 85px;
|
padding-top: 85px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fixed-header + .app-main[data-show-tag="true"] {
|
||||||
|
padding-top: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
.hideSidebar {
|
.hideSidebar {
|
||||||
.fixed-header {
|
.fixed-header {
|
||||||
width: calc(100% - 54px) !important;
|
width: calc(100% - 54px) !important;
|
||||||
@ -573,8 +577,12 @@ body[data-layout="horizontal"] {
|
|||||||
transition: none !important;
|
transition: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fixed-header + .app-main {
|
.fixed-header + .app-main[data-show-tag="false"] {
|
||||||
padding-top: 98px;
|
padding-top: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fixed-header + .app-main[data-show-tag="true"] {
|
||||||
|
padding-top: 62px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user