mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 01:17:23 +08:00
chore: update
This commit is contained in:
parent
e0c8781bcc
commit
b827301d0a
@ -14,6 +14,7 @@ import panel from "../panel/index.vue";
|
|||||||
import { emitter } from "/@/utils/mitt";
|
import { emitter } from "/@/utils/mitt";
|
||||||
import { templateRef } from "@vueuse/core";
|
import { templateRef } from "@vueuse/core";
|
||||||
import { routerArrays } from "/@/layout/types";
|
import { routerArrays } from "/@/layout/types";
|
||||||
|
import { useNav } from "/@/layout/hooks/useNav";
|
||||||
import { useAppStoreHook } from "/@/store/modules/app";
|
import { useAppStoreHook } from "/@/store/modules/app";
|
||||||
import { useMultiTagsStoreHook } from "/@/store/modules/multiTags";
|
import { useMultiTagsStoreHook } from "/@/store/modules/multiTags";
|
||||||
import { useDataThemeChange } from "/@/layout/hooks/useDataThemeChange";
|
import { useDataThemeChange } from "/@/layout/hooks/useDataThemeChange";
|
||||||
@ -30,6 +31,7 @@ import dayIcon from "/@/assets/svg/day.svg?component";
|
|||||||
import darkIcon from "/@/assets/svg/dark.svg?component";
|
import darkIcon from "/@/assets/svg/dark.svg?component";
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const { device } = useNav();
|
||||||
const { isDark } = useDark();
|
const { isDark } = useDark();
|
||||||
const { isSelect } = useCssModule();
|
const { isSelect } = useCssModule();
|
||||||
const { $storage } = useGlobal<GlobalPropertiesApi>();
|
const { $storage } = useGlobal<GlobalPropertiesApi>();
|
||||||
@ -202,6 +204,7 @@ const getThemeColor = computed(() => {
|
|||||||
|
|
||||||
/** 设置导航模式 */
|
/** 设置导航模式 */
|
||||||
function setLayoutModel(layout: string) {
|
function setLayoutModel(layout: string) {
|
||||||
|
if (layout === $storage.layout.layout) return;
|
||||||
layoutTheme.value.layout = layout;
|
layoutTheme.value.layout = layout;
|
||||||
window.document.body.setAttribute("layout", layout);
|
window.document.body.setAttribute("layout", layout);
|
||||||
$storage.layout = {
|
$storage.layout = {
|
||||||
@ -249,7 +252,12 @@ nextTick(() => {
|
|||||||
</li>
|
</li>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<el-tooltip class="item" content="顶部模式" placement="bottom">
|
<el-tooltip
|
||||||
|
v-if="device !== 'mobile'"
|
||||||
|
class="item"
|
||||||
|
content="顶部模式"
|
||||||
|
placement="bottom"
|
||||||
|
>
|
||||||
<li
|
<li
|
||||||
:class="layoutTheme.layout === 'horizontal' ? $style.isSelect : ''"
|
:class="layoutTheme.layout === 'horizontal' ? $style.isSelect : ''"
|
||||||
ref="horizontalRef"
|
ref="horizontalRef"
|
||||||
@ -260,7 +268,12 @@ nextTick(() => {
|
|||||||
</li>
|
</li>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
|
|
||||||
<el-tooltip class="item" content="混合模式" placement="bottom">
|
<el-tooltip
|
||||||
|
v-if="device !== 'mobile'"
|
||||||
|
class="item"
|
||||||
|
content="混合模式"
|
||||||
|
placement="bottom"
|
||||||
|
>
|
||||||
<li
|
<li
|
||||||
:class="layoutTheme.layout === 'mix' ? $style.isSelect : ''"
|
:class="layoutTheme.layout === 'mix' ? $style.isSelect : ''"
|
||||||
ref="mixRef"
|
ref="mixRef"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user