From 453ef87983478798943a520fbc442f9ee1e4c480 Mon Sep 17 00:00:00 2001 From: icssoa <2570063477@qq.com> Date: Wed, 10 Mar 2021 17:47:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E5=9D=97=E7=BB=93=E6=9E=84=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/config/env.js | 2 +- src/cool/modules/base/common/index.js | 29 +- .../base/components/menu/slider/index.js | 5 +- .../base/components/menu/slider/index.scss | 32 +- src/cool/modules/base/index.js | 4 +- src/cool/modules/base/store/app.js | 3 - src/cool/modules/demo/views/demo.vue | 4 +- src/cool/modules/demo/views/upload.vue | 3 +- src/cool/modules/theme/components/index.js | 5 - src/cool/modules/theme/components/theme.vue | 285 ------------------ src/cool/modules/theme/index.js | 3 - src/cool/modules/upload/components/index.vue | 6 +- src/pages/layout/index.vue | 16 +- vue.config.js | 24 -- 15 files changed, 59 insertions(+), 364 deletions(-) delete mode 100644 src/cool/modules/theme/components/index.js delete mode 100644 src/cool/modules/theme/components/theme.vue delete mode 100644 src/cool/modules/theme/index.js diff --git a/package.json b/package.json index 73a6dec..0c987d9 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "dependencies": { "axios": "^0.21.1", "cl-admin": "^1.3.1", - "cl-admin-crud": "^1.4.0", + "cl-admin-crud": "^1.4.4", "cl-admin-export": "^1.0.5", "cl-admin-theme": "^0.0.3", "clipboard": "^2.0.7", diff --git a/src/config/env.js b/src/config/env.js index 0e82181..79564fc 100644 --- a/src/config/env.js +++ b/src/config/env.js @@ -42,7 +42,7 @@ export const app = store.get("__app__") || { theme: { color: "", // 主题色 - url: "http://192.168.199.148:5000/black/index.css" // 主题样式地址 + url: "" // 主题样式地址 } }; diff --git a/src/cool/modules/base/common/index.js b/src/cool/modules/base/common/index.js index 484427d..ea08a41 100644 --- a/src/cool/modules/base/common/index.js +++ b/src/cool/modules/base/common/index.js @@ -1,3 +1,4 @@ +import store from "@/store"; import { iconfontUrl, app } from "@/config/env"; import { createLink } from "../utils"; import { colorPrimary } from "@/assets/css/common.scss"; @@ -18,9 +19,9 @@ if (iconfontUrl) { createLink(iconfontUrl); } -const requireAll = requireContext => requireContext.keys().map(requireContext); const req = require.context("@/icons/svg/", false, /\.svg$/); -requireAll(req); + +req.keys().map(req); export function iconList() { return req @@ -30,3 +31,27 @@ export function iconList() { .filter(e => e.includes("icon")) .sort(); } + +export const resize = () => { + if (document.body.clientWidth < 1000) { + store.commit("COLLAPSE_MENU", true); + store.commit("UPDATE_APP", { + conf: { + showAMenu: false + } + }); + } + store.commit("SET_BROWSER"); +}; + +window.onload = () => { + const observer = new MutationObserver(resize); + + observer.observe(document.getElementById("app"), { + childList: true, + subtree: true + }); + + window.addEventListener("resize", resize); + resize(); +}; diff --git a/src/cool/modules/base/components/menu/slider/index.js b/src/cool/modules/base/components/menu/slider/index.js index a99a51a..ccafdce 100644 --- a/src/cool/modules/base/components/menu/slider/index.js +++ b/src/cool/modules/base/components/menu/slider/index.js @@ -48,7 +48,10 @@ export default { if (e.type == 0) { html = ( - +