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 = ( - +