|
@@ -1,51 +0,0 @@
|
|
|
-import { defineStore } from "pinia";
|
|
|
-import { setLocalStorage, getLocalStorage } from "@/utils";
|
|
|
-
|
|
|
-
|
|
|
-const LayoutDisposition = JSON.parse(localStorage.getItem('LayoutDisposition')) || false
|
|
|
-
|
|
|
-// 语言
|
|
|
-export const layoutSetting = defineStore({
|
|
|
- id: "layoutSetting",
|
|
|
- state: () => ({
|
|
|
- setting: {
|
|
|
- crumbs: LayoutDisposition.crumbs , //面包屑
|
|
|
- BreadcrumbIcon: LayoutDisposition.BreadcrumbIcon , // 面包屑图标
|
|
|
- SidebarLogo: LayoutDisposition.SidebarLogo , // 侧边栏Logo
|
|
|
- HeadNavigationBar: LayoutDisposition.HeadNavigationBar , // 头部导航栏
|
|
|
- laoutStyle: LayoutDisposition.laoutStyle?LayoutDisposition.laoutStyle:0
|
|
|
- },
|
|
|
- }),
|
|
|
- getters: {
|
|
|
- getStore() {
|
|
|
- return this.setting;
|
|
|
- },
|
|
|
- },
|
|
|
- actions: {
|
|
|
- // 面包屑
|
|
|
- handelCrumbs(e) {
|
|
|
- this.setting.crumbs = e;
|
|
|
- },
|
|
|
- // 面包屑图标
|
|
|
- handelBreadcrumbIcon(e){
|
|
|
- this.setting.BreadcrumbIcon = e;
|
|
|
- },
|
|
|
- // 侧边栏Logo
|
|
|
- handelSidebarLogo(e){
|
|
|
- this.setting.SidebarLogo = e;
|
|
|
- },
|
|
|
- // 头部导航栏
|
|
|
- handelHeadNavigationBar(e){
|
|
|
- this.setting.HeadNavigationBar = e;
|
|
|
- localStorage.removeItem('RouterTagData')
|
|
|
- },
|
|
|
- // 切换布局样式
|
|
|
- handelLayoutStyle(e){
|
|
|
- this.setting.laoutStyle = e;
|
|
|
- },
|
|
|
- // 本地存储
|
|
|
- saveLayoutDisposition() {
|
|
|
- setLocalStorage("LayoutDisposition", this.setting);
|
|
|
- },
|
|
|
- },
|
|
|
-});
|