diff --git a/vue-admin-beautiful/mock/controller/changeLog.js b/vue-admin-beautiful/mock/controller/changeLog.js deleted file mode 100644 index 79721815acd3cdec488419f1a7d3336c072d035e..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/mock/controller/changeLog.js +++ /dev/null @@ -1,65 +0,0 @@ -const data = [ - { - content: "在github上获得了第一个star,感恩一位名叫pbw123的github用户", - timestamp: "2020-09-11", - }, - { - content: "完全开源,发布1.0.0版本", - timestamp: "2020-11-20", - }, - { - content: "完善代码生成器,增加排除表和字段", - timestamp: "2020-11-22", - }, - { - content: "修复 Ehcache 可能会导致Jvm缓存对象共享问题", - timestamp: "2020-11-24", - }, - { - content: "修复群友提出的BUG", - timestamp: "2020-11-27", - }, - { - content: "删除冗余代码", - timestamp: "2020-11-28", - }, - { - content: "修复树级数据无法逐级删除数据问题", - timestamp: "2020-12-01", - }, - { - content:"修复Props 可能空指针异常BUG", - timestamp: "2020-12-01", - }, - { - content: "新增地域模块", - timestamp: "2020-12-06", - }, - { - content: "新增组织机构模块", - timestamp: "2020-12-07", - }, - { - content: "优化登录步骤,失败次数大于系统规定阈值,开启验证码校验,如果失败大于最大次数则封禁账号", - timestamp: "2020-12-07", - }, - { - content: "发布1.1.0版", - timestamp: "2020-12-08", - } -]; - -module.exports = [ - { - url: "/changeLog/getList", - type: "post", - response() { - return { - code: 200, - msg: "success", - totalCount: 999, - data: data, - }; - }, - }, -]; diff --git a/vue-admin-beautiful/mock/index.js b/vue-admin-beautiful/mock/index.js deleted file mode 100644 index 68566c0045206641191d4b6f786c701f206635d8..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/mock/index.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @copyright chuzhixin 1204505056@qq.com - * @description 导入所有 controller 模块,npm run serve时在node环境中自动输出controller文件夹下Mock接口,请勿修改。 - */ - -const { handleMockArray } = require("./utils"); - -const mocks = []; -const mockArray = handleMockArray(); -mockArray.forEach((item) => { - const obj = require(item); - mocks.push(...obj); -}); -module.exports = { - mocks, -}; diff --git a/vue-admin-beautiful/patches/zx-layouts+0.6.13.patch b/vue-admin-beautiful/patches/zx-layouts+0.6.13.patch deleted file mode 100644 index c21446d29c10fd0c0b176aa4169317616ca44e83..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/patches/zx-layouts+0.6.13.patch +++ /dev/null @@ -1,361 +0,0 @@ -diff --git a/node_modules/zx-layouts/Avatar/components/ChooseTenant.vue b/node_modules/zx-layouts/Avatar/components/ChooseTenant.vue -new file mode 100644 -index 0000000..836ea53 ---- /dev/null -+++ b/node_modules/zx-layouts/Avatar/components/ChooseTenant.vue -@@ -0,0 +1,183 @@ -+ -+ -+ -+ -diff --git a/node_modules/zx-layouts/Avatar/index.vue b/node_modules/zx-layouts/Avatar/index.vue -index f63a135..28bbdf3 100644 ---- a/node_modules/zx-layouts/Avatar/index.vue -+++ b/node_modules/zx-layouts/Avatar/index.vue -@@ -1,30 +1,50 @@ - - - -diff --git a/node_modules/zx-layouts/ErrorLog/index.vue b/node_modules/zx-layouts/ErrorLog/index.vue -index 485d504..791c607 100644 ---- a/node_modules/zx-layouts/ErrorLog/index.vue -+++ b/node_modules/zx-layouts/ErrorLog/index.vue -@@ -13,7 +13,7 @@ - :visible.sync="dialogTableVisible" - append-to-body - width="70%" -- title="vue-admin-beautiful异常捕获(温馨提示:错误必须解决)" -+ title="OPSLI 异常捕获(温馨提示:错误必须解决)" - > - - -diff --git a/node_modules/zx-layouts/ThemeBar/index.vue b/node_modules/zx-layouts/ThemeBar/index.vue -index af37a89..371908e 100644 ---- a/node_modules/zx-layouts/ThemeBar/index.vue -+++ b/node_modules/zx-layouts/ThemeBar/index.vue -@@ -154,27 +154,8 @@ - }, - handleGetCode() { - const url = -- "https://github.com/chuzhixin/vue-admin-beautiful/tree/master/src/views"; -- let path = this.$route.path + "/index.vue"; -- if (path === "/vab/menu1/menu1-1/menu1-1-1/index.vue") { -- path = "/vab/nested/menu1/menu1-1/menu1-1-1/index.vue"; -- } -- if (path === "/vab/icon/awesomeIcon/index.vue") { -- path = "/vab/icon/index.vue"; -- } -- if (path === "/vab/icon/remixIcon/index.vue") { -- path = "/vab/icon/remixIcon.vue"; -- } -- if (path === "/vab/icon/colorfulIcon/index.vue") { -- path = "/vab/icon/colorfulIcon.vue"; -- } -- if (path === "/vab/table/comprehensiveTable/index.vue") { -- path = "/vab/table/index.vue"; -- } -- if (path === "/vab/table/inlineEditTable/index.vue") { -- path = "/vab/table/inlineEditTable.vue"; -- } -- window.open(url + path); -+ "https://github.com/hiparker/opsli-boot"; -+ window.open(url); - }, - }, - }; diff --git a/vue-admin-beautiful/plopfile.js b/vue-admin-beautiful/plopfile.js deleted file mode 100644 index 8fe16ee5372aa8fb19b63c20e4dd041833f581de..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/plopfile.js +++ /dev/null @@ -1,13 +0,0 @@ -const viewGenerator = require("zx-templates/view/prompt"); -const curdGenerator = require("zx-templates/curd/prompt"); -const componentGenerator = require("zx-templates/component/prompt"); -const mockGenerator = require("zx-templates/mock/prompt"); -const vuexGenerator = require("zx-templates/vuex/prompt"); - -module.exports = (plop) => { - plop.setGenerator("view", viewGenerator); - plop.setGenerator("curd", curdGenerator); - plop.setGenerator("component", componentGenerator); - plop.setGenerator("mock&api", mockGenerator); - plop.setGenerator("vuex", vuexGenerator); -}; diff --git a/vue-admin-beautiful/src/layouts/components/index.js b/vue-admin-beautiful/src/layouts/components/index.js deleted file mode 100644 index 645619da8998655d6b35a78bdc1f43357fa51aca..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/layouts/components/index.js +++ /dev/null @@ -1,21 +0,0 @@ -/** - * @copyright chuzhixin 1204505056@qq.com - * @description 公共布局导出,已封装成npm,便于此后在线升级,当然也存在一定的弊端,给开发者自定义增加了一定的困难,如果您一定要进行高度自定义,请仔细阅读VIP群文档,layouts本地化篇 - */ -export { default as ColorfullIcon } from "zx-layouts/ColorfullIcon"; -export { default as RemixIcon } from "zx-layouts/RemixIcon"; -export { default as VabDrag } from "zx-layouts/Drag"; -export { default as VabPermissions } from "zx-layouts/Permissions"; -export { default as VabQueryForm } from "zx-layouts/VabQueryForm/export"; -export { default as Logo } from "zx-layouts/Logo"; -export { default as Avatar } from "zx-layouts/Avatar"; -export { default as Ad } from "./Ad"; -export { default as AppMain } from "zx-layouts/AppMain"; -export { default as TagsBar } from "zx-layouts/TagsBar"; -export { default as SideBar } from "zx-layouts/SideBar"; -export { default as Breadcrumb } from "zx-layouts/Breadcrumb"; -export { default as FullScreenBar } from "zx-layouts/FullScreenBar"; -export { default as ErrorLog } from "zx-layouts/ErrorLog"; -export { default as ThemeBar } from "zx-layouts/ThemeBar"; -export { default as TopBar } from "zx-layouts/TopBar"; -export { default as NavBar } from "zx-layouts/NavBar"; diff --git a/vue-admin-beautiful/src/plugins/echarts.js b/vue-admin-beautiful/src/plugins/echarts.js deleted file mode 100644 index f35507e8cbf724e6ccfbd703bd6fe1135b18f8c1..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/plugins/echarts.js +++ /dev/null @@ -1,11 +0,0 @@ -import "echarts"; -import "echarts/map/js/china"; -import "echarts/map/js/world"; - -import "echarts-wordcloud"; - -import VabChart from "vue-echarts"; -import theme from "./vab-echarts-theme.json"; - -VabChart.registerTheme("vab-echarts-theme", theme); -export default VabChart; diff --git a/vue-admin-beautiful/src/plugins/vabComparison.js b/vue-admin-beautiful/src/plugins/vabComparison.js deleted file mode 100644 index a969dc6e64080151cac5c027fafb0a2ed66544b2..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/plugins/vabComparison.js +++ /dev/null @@ -1,3 +0,0 @@ -import VabComparison from "zx-comparison"; - -export default VabComparison; diff --git a/vue-admin-beautiful/src/plugins/vabIcon.js b/vue-admin-beautiful/src/plugins/vabIcon.js deleted file mode 100644 index 1052605faf56dcee09164f1924ff45beca0319c6..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/plugins/vabIcon.js +++ /dev/null @@ -1,4 +0,0 @@ -import Vue from "vue"; -import VabIcon from "zx-icon"; - -Vue.component("vab-icon", VabIcon); diff --git a/vue-admin-beautiful/src/plugins/vabKeel.js b/vue-admin-beautiful/src/plugins/vabKeel.js deleted file mode 100644 index a9a901552336723a2f32e10f6edecf7bd663cf80..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/plugins/vabKeel.js +++ /dev/null @@ -1,8 +0,0 @@ -import { Heading, Img, Keel, Text } from "zx-keel"; -import "zx-keel/dist/zx-keel.css"; - -const VabKeel = Keel; -const VabKeelHeading = Heading; -const VabKeelImg = Img; -const VabKeelText = Text; -export { VabKeel, VabKeelHeading, VabKeelImg, VabKeelText }; diff --git a/vue-admin-beautiful/src/plugins/vabMagnifier.js b/vue-admin-beautiful/src/plugins/vabMagnifier.js deleted file mode 100644 index d2904a5cba1020e734f1439cc3d86271fd1a9f7a..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/plugins/vabMagnifier.js +++ /dev/null @@ -1,3 +0,0 @@ -import VabMagnifier from "zx-magnifie"; - -export default VabMagnifier; diff --git a/vue-admin-beautiful/src/plugins/vabMarkdownEditor.js b/vue-admin-beautiful/src/plugins/vabMarkdownEditor.js deleted file mode 100644 index bfa51a8e107f64bf65be9f24f2d4833fd412b48f..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/plugins/vabMarkdownEditor.js +++ /dev/null @@ -1,5 +0,0 @@ -import ZxMarkdownEditor from "zx-markdown-editor"; -import "zx-markdown-editor/dist/zx-markdown-editor.css"; - -const VabMarkdownEditor = ZxMarkdownEditor; -export default VabMarkdownEditor; diff --git a/vue-admin-beautiful/src/plugins/vabPlayer.js b/vue-admin-beautiful/src/plugins/vabPlayer.js deleted file mode 100644 index a670976368c17919a4daa37e45ca2eadb8000fb8..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/plugins/vabPlayer.js +++ /dev/null @@ -1,7 +0,0 @@ -import { Custom, Flv, Hls, Mp4 } from "zx-player"; - -const VabPlayerMp4 = Mp4; -const VabPlayerHls = Hls; -const VabPlayerFlv = Flv; -const VabPlayerCustom = Custom; -export { VabPlayerMp4, VabPlayerHls, VabPlayerFlv, VabPlayerCustom }; diff --git a/vue-admin-beautiful/src/plugins/vabQuill.js b/vue-admin-beautiful/src/plugins/vabQuill.js deleted file mode 100644 index 61c29027548d5eaffbab06d673cbaa7ad2f4564b..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/plugins/vabQuill.js +++ /dev/null @@ -1,4 +0,0 @@ -import "zx-quill/dist/zx-quill.css"; -import VabQuill from "zx-quill"; - -export default VabQuill; diff --git a/vue-admin-beautiful/src/plugins/vabVerify.js b/vue-admin-beautiful/src/plugins/vabVerify.js deleted file mode 100644 index 88fb9fd88a98ad600bd92305ee2910e9d1130a08..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/plugins/vabVerify.js +++ /dev/null @@ -1,4 +0,0 @@ -import VabVerify from "zx-verify"; -import "zx-verify/dist/zx-verify.css"; - -export default VabVerify; diff --git a/vue-admin-beautiful/src/router/index.js b/vue-admin-beautiful/src/router/index.js deleted file mode 100644 index 2f814058168cadd66e087f698471bc10b4310e16..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/router/index.js +++ /dev/null @@ -1,507 +0,0 @@ -/** - * @copyright chuzhixin 1204505056@qq.com - * @description router全局配置,如有必要可分文件抽离,其中asyncRoutes只有在intelligence模式下才会用到,vip文档中已提供路由的基础图标与小清新图标的配置方案,请仔细阅读 - */ - -import Vue from "vue"; -import VueRouter from "vue-router"; -import Layout from "@/layouts"; -import EmptyLayout from "@/layouts/EmptyLayout"; -import { publicPath, routerMode } from "@/config/settings"; - -Vue.use(VueRouter); -export const constantRoutes = [ - { - path: "/login", - component: () => import("@/views/login/index"), - hidden: true, - }, - { - path: "/register", - component: () => import("@/views/register/index"), - hidden: true, - }, - { - path: "/personal", - component: Layout, - hidden: true, - redirect: "personal", - children: [ - { - path: "center", - name: "center", - component: () => import("@/views/personalCenter/index"), - meta: { - title: "个人中心", - }, - }, - ], - }, - { - path: "/personalCenter", - component: Layout, - hidden: true, - redirect: "personalCenter", - children: [ - { - path: "personalCenter", - name: "PersonalCenter", - component: () => import("@/views/personalCenter/index"), - meta: { - title: "个人中心", - }, - }, - ], - }, - { - path: "/401", - name: "401", - component: () => import("@/views/401"), - hidden: true, - }, - { - path: "/404", - name: "404", - component: () => import("@/views/404"), - hidden: true, - }, -]; - -export const asyncRoutes = [ - { - path: "/", - component: Layout, - redirect: "index", - children: [ - { - path: "index", - name: "Index", - component: () => import("@/views/index/index"), - meta: { - title: "首页", - icon: "home", - affix: true, - }, - }, - ], - }, - { - path: "/personalCenter", - component: Layout, - hidden: true, - redirect: "personalCenter", - children: [ - { - path: "personalCenter", - name: "PersonalCenter", - component: () => import("@/views/personalCenter/index"), - meta: { - title: "个人中心", - }, - }, - ], - }, - { - path: "/personnelManagement", - component: Layout, - redirect: "noRedirect", - name: "PersonnelManagement", - meta: { title: "配置", icon: "users-cog", permissions: ["admin"] }, - // children: [ - // { - // path: "userManagement", - // name: "UserManagement", - // component: () => - // import("@/views/personnelManagement/userManagement/index"), - // meta: { title: "用户管理" }, - // }, - // { - // path: "roleManagement", - // name: "RoleManagement", - // component: () => - // import("@/views/personnelManagement/roleManagement/index"), - // meta: { title: "角色管理" }, - // }, - // { - // path: "menuManagement", - // name: "MenuManagement", - // component: () => - // import("@/views/personnelManagement/menuManagement/index"), - // meta: { title: "菜单管理", badge: "New" }, - // }, - // ], - }, - { - path: "/vab", - component: Layout, - redirect: "noRedirect", - name: "Vab", - alwaysShow: true, - meta: { title: "组件", icon: "box-open" }, - children: [ - { - path: - "https://github.com/chuzhixin/vue-admin-beautiful?utm_source=gold_browser_extension", - name: "ExternalLink", - meta: { - title: "外链", - target: "_blank", - badge: "New", - }, - }, - { - path: "permissions", - name: "Permission", - component: () => import("@/views/vab/permissions/index"), - meta: { - title: "权限控制", - }, - }, - { - path: "icon", - component: EmptyLayout, - redirect: "noRedirect", - name: "Icon", - meta: { - title: "图标", - }, - children: [ - { - path: "awesomeIcon", - name: "AwesomeIcon", - component: () => import("@/views/vab/icon/index"), - meta: { title: "常规图标" }, - }, - { - path: "remixIcon", - name: "RemixIcon", - component: () => import("@/views/vab/icon/remixIcon"), - meta: { title: "小清新图标" }, - }, - { - path: "colorfulIcon", - name: "ColorfulIcon", - component: () => import("@/views/vab/icon/colorfulIcon"), - meta: { title: "多彩图标" }, - }, - ], - }, - { - path: "table", - component: EmptyLayout, - redirect: "noRedirect", - name: "Table", - meta: { - title: "表格", - permissions: ["admin"], - }, - children: [ - { - path: "comprehensiveTable", - name: "ComprehensiveTable", - component: () => import("@/views/vab/table/index"), - meta: { title: "综合表格" }, - }, - { - path: "inlineEditTable", - name: "InlineEditTable", - component: () => import("@/views/vab/table/inlineEditTable"), - meta: { title: "行内编辑" }, - }, - ], - }, - { - path: "map", - component: () => import("@/views/vab/map/index"), - name: "Map", - meta: { - title: "地图", - }, - }, - - { - path: "webSocket", - name: "WebSocket", - component: () => import("@/views/vab/webSocket/index"), - meta: { title: "webSocket", permissions: ["admin"] }, - }, - { - path: "form", - name: "Form", - component: () => import("@/views/vab/form/index"), - meta: { title: "表单", permissions: ["admin"] }, - }, - { - path: "element", - name: "Element", - component: () => import("@/views/vab/element/index"), - meta: { title: "常用组件", permissions: ["admin"] }, - }, - { - path: "tree", - name: "Tree", - component: () => import("@/views/vab/tree/index"), - meta: { title: "树", permissions: ["admin"] }, - }, - { - path: "card", - name: "Card", - component: () => import("@/views/vab/card/index"), - meta: { title: "卡片", permissions: ["admin"] }, - }, - - { - path: "betterScroll", - name: "BetterScroll", - component: () => import("@/views/vab/betterScroll/index"), - meta: { - title: "滚动侦测", - permissions: ["admin"], - }, - }, - { - path: "verify", - name: "Verify", - component: () => import("@/views/vab/verify/index"), - meta: { title: "验证码", permissions: ["admin"] }, - }, - { - path: "menu1", - component: () => import("@/views/vab/nested/menu1/index"), - name: "Menu1", - alwaysShow: true, - meta: { - title: "嵌套路由 1", - permissions: ["admin"], - }, - children: [ - { - path: "menu1-1", - name: "Menu1-1", - alwaysShow: true, - meta: { title: "嵌套路由 1-1" }, - component: () => import("@/views/vab/nested/menu1/menu1-1/index"), - - children: [ - { - path: "menu1-1-1", - name: "Menu1-1-1", - meta: { title: "嵌套路由 1-1-1" }, - component: () => - import("@/views/vab/nested/menu1/menu1-1/menu1-1-1/index"), - }, - ], - }, - ], - }, - { - path: "magnifier", - name: "Magnifier", - component: () => import("@/views/vab/magnifier/index"), - meta: { title: "放大镜", permissions: ["admin"] }, - }, - { - path: "echarts", - name: "Echarts", - component: () => import("@/views/vab/echarts/index"), - meta: { title: "图表", permissions: ["admin"] }, - }, - - { - path: "loading", - name: "Loading", - component: () => import("@/views/vab/loading/index"), - meta: { title: "loading", permissions: ["admin"] }, - }, - { - path: "player", - name: "Player", - component: () => import("@/views/vab/player/index"), - meta: { title: "视频播放器", permissions: ["admin"] }, - }, - { - path: "markdownEditor", - name: "MarkdownEditor", - component: () => import("@/views/vab/markdownEditor/index"), - meta: { title: "markdown编辑器", permissions: ["admin"] }, - }, - { - path: "editor", - name: "Editor", - component: () => import("@/views/vab/editor/index"), - meta: { - title: "富文本编辑器", - permissions: ["admin"], - badge: "New", - }, - }, - { - path: "qrCode", - name: "QrCode", - component: () => import("@/views/vab/qrCode/index"), - meta: { title: "二维码", permissions: ["admin"] }, - }, - { - path: "backToTop", - name: "BackToTop", - component: () => import("@/views/vab/backToTop/index"), - meta: { title: "返回顶部", permissions: ["admin"] }, - }, - { - path: "lodash", - name: "Lodash", - component: () => import("@/views/vab/lodash/index"), - meta: { title: "lodash", permissions: ["admin"] }, - }, - { - path: "imgComparison", - name: "ImgComparison", - component: () => import("@/views/vab/imgComparison/index"), - meta: { title: "图像拖拽比对", permissions: ["admin"] }, - }, - { - path: "codeGenerator", - name: "CodeGenerator", - component: () => import("@/views/vab/codeGenerator/index"), - meta: { title: "代码生成机", permissions: ["admin"] }, - }, - { - path: "markdown", - name: "Markdown", - component: () => import("@/views/vab/markdown/index"), - meta: { title: "markdown阅读器", permissions: ["admin"] }, - }, - { - path: "smallComponents", - name: "SmallComponents", - component: () => import("@/views/vab/smallComponents/index"), - meta: { title: "小组件", permissions: ["admin"] }, - }, - - { - path: "upload", - name: "Upload", - component: () => import("@/views/vab/upload/index"), - meta: { title: "上传", permissions: ["admin"] }, - }, - { - path: "sticky", - name: "Sticky", - component: () => import("@/views/vab/sticky/index"), - meta: { title: "sticky吸附", permissions: ["admin"] }, - }, - { - path: "log", - name: "Log", - component: () => import("@/views/vab/errorLog/index"), - meta: { title: "错误日志模拟", permissions: ["admin"] }, - }, - { - path: "more", - name: "More", - component: () => import("@/views/vab/more/index"), - meta: { title: "更多组件", permissions: ["admin"] }, - }, - { - path: "blacklist", - name: "Blacklist", - component: () => import("@/views/vab/blacklist/index"), - meta: { title: "黑名单", permissions: ["admin"] }, - }, - ], - }, - { - path: "/mall", - component: Layout, - redirect: "noRedirect", - name: "Mall", - meta: { - title: "商城", - icon: "shopping-cart", - }, - - children: [ - { - path: "pay", - name: "Pay", - component: () => import("@/views/mall/pay/index"), - meta: { - title: "支付", - noKeepAlive: true, - }, - children: null, - }, - { - path: "goodsList", - name: "GoodsList", - component: () => import("@/views/mall/goodsList/index"), - meta: { - title: "商品列表", - }, - }, - { - path: "goodsDetail", - name: "GoodsDetail", - component: () => import("@/views/mall/goodsDetail/index"), - meta: { - title: "商品详情", - }, - }, - ], - }, - { - path: "/error", - component: EmptyLayout, - redirect: "noRedirect", - name: "Error", - meta: { title: "错误页", icon: "bug" }, - children: [ - { - path: "401", - name: "Error401", - component: () => import("@/views/401"), - meta: { title: "401" }, - }, - { - path: "404", - name: "Error404", - component: () => import("@/views/404"), - meta: { title: "404" }, - }, - ], - }, - { - path: "*", - redirect: "/404", - hidden: true, - }, -]; - -const router = new VueRouter({ - base: publicPath, - mode: routerMode, - scrollBehavior: () => ({ - y: 0, - }), - routes: constantRoutes, -}); -//注释的地方是允许路由重复点击,如果你觉得框架路由跳转规范太过严格可选择放开 -/* const originalPush = VueRouter.prototype.push; -VueRouter.prototype.push = function push(location, onResolve, onReject) { - if (onResolve || onReject) - return originalPush.call(this, location, onResolve, onReject); - return originalPush.call(this, location).catch((err) => err); -}; */ - -export function resetRouter() { - router.matcher = new VueRouter({ - base: publicPath, - mode: routerMode, - scrollBehavior: () => ({ - y: 0, - }), - routes: constantRoutes, - }).matcher; -} - -export default router; diff --git a/vue-admin-beautiful/src/utils/format.js b/vue-admin-beautiful/src/utils/format.js deleted file mode 100644 index dae76691a6f917cf69417fdb632ef4418a68f6e5..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/utils/format.js +++ /dev/null @@ -1,23 +0,0 @@ -export function formateDate (date, fmt) { - if (/(y+)/.test(fmt)) { - fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length)) - } - let o = { - 'M+': date.getMonth() + 1, - 'd+': date.getDate(), - 'h+': date.getHours(), - 'm+': date.getMinutes(), - 's+': date.getSeconds() - } - for (let k in o) { - if (new RegExp(`(${k})`).test(fmt)) { - let str = o[k] + '' - fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : padLeftZero(str)) - } - } - return fmt -} -// 左边补0函数 -function padLeftZero (str) { - return ('00' + str).substr(str.length) -} diff --git a/vue-admin-beautiful/src/views/vab/betterScroll/index.vue b/vue-admin-beautiful/src/views/vab/betterScroll/index.vue deleted file mode 100644 index e2ca9c1e76eabc182638990f547219d5a102d794..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/betterScroll/index.vue +++ /dev/null @@ -1,83 +0,0 @@ - - - - diff --git a/vue-admin-beautiful/src/views/vab/blacklist/index.vue b/vue-admin-beautiful/src/views/vab/blacklist/index.vue deleted file mode 100644 index c5ab45cbd4f25b4ca4f6beddb76c8bc194674db8..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/blacklist/index.vue +++ /dev/null @@ -1,38 +0,0 @@ - - - diff --git a/vue-admin-beautiful/src/views/vab/card/index.vue b/vue-admin-beautiful/src/views/vab/card/index.vue deleted file mode 100644 index 1c8f85796559b0229c92a52c06e35a9e2b02239c..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/card/index.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - diff --git a/vue-admin-beautiful/src/views/vab/codeGenerator/components/TableEditor.vue b/vue-admin-beautiful/src/views/vab/codeGenerator/components/TableEditor.vue deleted file mode 100644 index f36f4eb8a28390ce889b1fc98f8b138479536769..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/codeGenerator/components/TableEditor.vue +++ /dev/null @@ -1,37 +0,0 @@ - - - diff --git a/vue-admin-beautiful/src/views/vab/codeGenerator/components/TableExhibition.vue b/vue-admin-beautiful/src/views/vab/codeGenerator/components/TableExhibition.vue deleted file mode 100644 index 31fa051271ec4102b305ccff10f8e554a11d2ab1..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/codeGenerator/components/TableExhibition.vue +++ /dev/null @@ -1,81 +0,0 @@ - - - diff --git a/vue-admin-beautiful/src/views/vab/codeGenerator/components/TableExhibitionBody.vue b/vue-admin-beautiful/src/views/vab/codeGenerator/components/TableExhibitionBody.vue deleted file mode 100644 index a800aac8e7e77ac7426d1fe8da2cb380308d412e..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/codeGenerator/components/TableExhibitionBody.vue +++ /dev/null @@ -1,59 +0,0 @@ - - - diff --git a/vue-admin-beautiful/src/views/vab/codeGenerator/components/TableExhibitionHeader.vue b/vue-admin-beautiful/src/views/vab/codeGenerator/components/TableExhibitionHeader.vue deleted file mode 100644 index c7558079d8b18678e48df3f1caeeb15842ba5a52..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/codeGenerator/components/TableExhibitionHeader.vue +++ /dev/null @@ -1,119 +0,0 @@ - - - - diff --git a/vue-admin-beautiful/src/views/vab/codeGenerator/components/TableExhibitionQuery.vue b/vue-admin-beautiful/src/views/vab/codeGenerator/components/TableExhibitionQuery.vue deleted file mode 100644 index 73cb7eba25d889090b90929abc364e812e9b4b80..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/codeGenerator/components/TableExhibitionQuery.vue +++ /dev/null @@ -1,82 +0,0 @@ - - - - - diff --git a/vue-admin-beautiful/src/views/vab/codeGenerator/components/snippetTableColumn.js b/vue-admin-beautiful/src/views/vab/codeGenerator/components/snippetTableColumn.js deleted file mode 100644 index 6b397002f253c4dfee861b75ce002112a3f65d7f..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/codeGenerator/components/snippetTableColumn.js +++ /dev/null @@ -1,40 +0,0 @@ -const timeFieldNeedHandle = { - created_at: true, - create_time: true, - updated_at: true, - update_time: true, - start_time: true, - end_time: true, -}; -const genTableColumnSnippetSimple = (key, label) => { - return ``; -}; - -const genTabeleColumnSinppetTemplate = (key, label) => { - let val = ""; - if (timeFieldNeedHandle[key]) { - val = `parseTime(row.${key})`; - } else { - val = `row.${key}`; - } - return ` - - `; -}; - -export const genTableColumnSnippet = (headers) => { - return headers - .filter((header) => { - return header.show; - }) - .map((header) => { - if (timeFieldNeedHandle[header.key] || header.opt === "template") { - return genTabeleColumnSinppetTemplate(header.key, header.label); - } else { - return genTableColumnSnippetSimple(header.key, header.label); - } - }) - .join("\n "); -}; diff --git a/vue-admin-beautiful/src/views/vab/codeGenerator/index.vue b/vue-admin-beautiful/src/views/vab/codeGenerator/index.vue deleted file mode 100644 index 3af1ebe3443c00e92200c8827c12a9d446171d39..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/codeGenerator/index.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - diff --git a/vue-admin-beautiful/src/views/vab/echarts/index.vue b/vue-admin-beautiful/src/views/vab/echarts/index.vue deleted file mode 100644 index 9c03214e041025724204c8cb559c179b58d07916..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/echarts/index.vue +++ /dev/null @@ -1,652 +0,0 @@ - - - - - diff --git a/vue-admin-beautiful/src/views/vab/editor/index.vue b/vue-admin-beautiful/src/views/vab/editor/index.vue deleted file mode 100644 index 3145c5c0de72f6751152883723780bcf8a6f9b32..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/editor/index.vue +++ /dev/null @@ -1,128 +0,0 @@ - - - - diff --git a/vue-admin-beautiful/src/views/vab/icon/index.vue b/vue-admin-beautiful/src/views/vab/icon/index.vue deleted file mode 100644 index 3d8d7ac6a526d62ac3da91ac43cf9473b8c4c923..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/icon/index.vue +++ /dev/null @@ -1,141 +0,0 @@ - - - - - diff --git a/vue-admin-beautiful/src/views/vab/imgComparison/index.vue b/vue-admin-beautiful/src/views/vab/imgComparison/index.vue deleted file mode 100644 index dbd14b522f346ba3c76f109f43bd26ceb9b1eb99..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/imgComparison/index.vue +++ /dev/null @@ -1,53 +0,0 @@ - - - diff --git a/vue-admin-beautiful/src/views/vab/magnifier/index.vue b/vue-admin-beautiful/src/views/vab/magnifier/index.vue deleted file mode 100644 index 733b48a02d7fe56dca5b5195e3b3aa0437aafb3c..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/magnifier/index.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/vue-admin-beautiful/src/views/vab/markdown/index.vue b/vue-admin-beautiful/src/views/vab/markdown/index.vue deleted file mode 100644 index b0735663c7b23e5551cb2ba686f6f86f838b0e8d..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/markdown/index.vue +++ /dev/null @@ -1,68 +0,0 @@ - - - diff --git a/vue-admin-beautiful/src/views/vab/markdownEditor/index.vue b/vue-admin-beautiful/src/views/vab/markdownEditor/index.vue deleted file mode 100644 index a8c5190eebcaf693a9cb6eab55e55f4fee9e1c1e..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/markdownEditor/index.vue +++ /dev/null @@ -1,51 +0,0 @@ - - - diff --git a/vue-admin-beautiful/src/views/vab/more/index.vue b/vue-admin-beautiful/src/views/vab/more/index.vue deleted file mode 100644 index f946ca4724e5fb47ecba2184c4da5708a7964056..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/more/index.vue +++ /dev/null @@ -1,142 +0,0 @@ - - - - diff --git a/vue-admin-beautiful/src/views/vab/player/index.vue b/vue-admin-beautiful/src/views/vab/player/index.vue deleted file mode 100644 index 916a9f49d20212d18a2a911c47cc2197868cddce..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/player/index.vue +++ /dev/null @@ -1,73 +0,0 @@ - - - diff --git a/vue-admin-beautiful/src/views/vab/qrCode/index.vue b/vue-admin-beautiful/src/views/vab/qrCode/index.vue deleted file mode 100644 index 9579278b95f8f99f7053e558077f60ec4cfd65a4..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/qrCode/index.vue +++ /dev/null @@ -1,46 +0,0 @@ - - - - - diff --git a/vue-admin-beautiful/src/views/vab/sticky/index.vue b/vue-admin-beautiful/src/views/vab/sticky/index.vue deleted file mode 100644 index 4de9cf2ed0e9cb5b383bf3f1ca824660626f9536..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/sticky/index.vue +++ /dev/null @@ -1,314 +0,0 @@ - - - - diff --git a/vue-admin-beautiful/src/views/vab/table/inlineEditTable.vue b/vue-admin-beautiful/src/views/vab/table/inlineEditTable.vue deleted file mode 100644 index 6f1179717a061a8a0c570b2cfdb17945da1d38f2..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/table/inlineEditTable.vue +++ /dev/null @@ -1,109 +0,0 @@ - - - diff --git a/vue-admin-beautiful/src/views/vab/verify/index.vue b/vue-admin-beautiful/src/views/vab/verify/index.vue deleted file mode 100644 index 52fce2d18858cf59f28de93075c1c330a7921745..0000000000000000000000000000000000000000 --- a/vue-admin-beautiful/src/views/vab/verify/index.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - diff --git a/vue-admin-beautiful/.browserslistrc b/vue-admin-better/.browserslistrc similarity index 56% rename from vue-admin-beautiful/.browserslistrc rename to vue-admin-better/.browserslistrc index f23b8379611fa01780b64ac6eef61d7a00b91d81..ab3713ad85360a8fe45e664f22d28d0e2c461999 100644 --- a/vue-admin-beautiful/.browserslistrc +++ b/vue-admin-better/.browserslistrc @@ -1,3 +1,4 @@ +# 支持浏览器配置 > 1% last 2 versions not dead diff --git a/vue-admin-beautiful/.dockerignore b/vue-admin-better/.dockerignore similarity index 100% rename from vue-admin-beautiful/.dockerignore rename to vue-admin-better/.dockerignore diff --git a/vue-admin-beautiful/.editorconfig b/vue-admin-better/.editorconfig similarity index 100% rename from vue-admin-beautiful/.editorconfig rename to vue-admin-better/.editorconfig diff --git a/vue-admin-beautiful/.eslintignore b/vue-admin-better/.eslintignore similarity index 100% rename from vue-admin-beautiful/.eslintignore rename to vue-admin-better/.eslintignore diff --git a/vue-admin-beautiful/.eslintrc.js b/vue-admin-better/.eslintrc.js similarity index 75% rename from vue-admin-beautiful/.eslintrc.js rename to vue-admin-better/.eslintrc.js index 0760a63b14f07754833402b50cf3fb089d49ce94..9d6dac28eb1499985eb2c34252ffe80679f22a3f 100644 --- a/vue-admin-beautiful/.eslintrc.js +++ b/vue-admin-better/.eslintrc.js @@ -8,6 +8,10 @@ module.exports = { "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", "vue/no-v-html": "off", + "vue/multi-word-component-names": "off", + "vue/no-useless-template-attributes": "off", + "vue/no-reserved-component-names": "off", + "no-multiple-empty-lines": 0, }, parserOptions: { parser: "babel-eslint", diff --git a/vue-admin-beautiful/.gitattributes b/vue-admin-better/.gitattributes similarity index 100% rename from vue-admin-beautiful/.gitattributes rename to vue-admin-better/.gitattributes diff --git a/vue-admin-beautiful/.gitignore b/vue-admin-better/.gitignore similarity index 100% rename from vue-admin-beautiful/.gitignore rename to vue-admin-better/.gitignore diff --git a/vue-admin-beautiful/.stylelintrc.js b/vue-admin-better/.stylelintrc.js similarity index 100% rename from vue-admin-beautiful/.stylelintrc.js rename to vue-admin-better/.stylelintrc.js diff --git a/vue-admin-beautiful/Dockerfile b/vue-admin-better/Dockerfile similarity index 100% rename from vue-admin-beautiful/Dockerfile rename to vue-admin-better/Dockerfile diff --git a/vue-admin-beautiful/LICENSE b/vue-admin-better/LICENSE similarity index 100% rename from vue-admin-beautiful/LICENSE rename to vue-admin-better/LICENSE diff --git a/vue-admin-beautiful/README-DCLOUD.md b/vue-admin-better/README-DCLOUD.md similarity index 100% rename from vue-admin-beautiful/README-DCLOUD.md rename to vue-admin-better/README-DCLOUD.md diff --git a/vue-admin-beautiful/README.md b/vue-admin-better/README.md similarity index 100% rename from vue-admin-beautiful/README.md rename to vue-admin-better/README.md diff --git a/vue-admin-beautiful/SECURITY.md b/vue-admin-better/SECURITY.md similarity index 100% rename from vue-admin-beautiful/SECURITY.md rename to vue-admin-better/SECURITY.md diff --git a/vue-admin-beautiful/babel.config.js b/vue-admin-better/babel.config.js similarity index 100% rename from vue-admin-beautiful/babel.config.js rename to vue-admin-better/babel.config.js diff --git a/vue-admin-beautiful/deploy-docker-compose.sh b/vue-admin-better/deploy-docker-compose.sh similarity index 100% rename from vue-admin-beautiful/deploy-docker-compose.sh rename to vue-admin-better/deploy-docker-compose.sh diff --git a/vue-admin-beautiful/deploy-docker.sh b/vue-admin-better/deploy-docker.sh similarity index 100% rename from vue-admin-beautiful/deploy-docker.sh rename to vue-admin-better/deploy-docker.sh diff --git a/vue-admin-beautiful/docker-compose.yml b/vue-admin-better/docker-compose.yml similarity index 100% rename from vue-admin-beautiful/docker-compose.yml rename to vue-admin-better/docker-compose.yml diff --git a/vue-admin-beautiful/http/mock.http b/vue-admin-better/http/mock.http similarity index 100% rename from vue-admin-beautiful/http/mock.http rename to vue-admin-better/http/mock.http diff --git a/vue-admin-better/layouts/Permissions/index.js b/vue-admin-better/layouts/Permissions/index.js new file mode 100755 index 0000000000000000000000000000000000000000..7d2d86e2c09435c3b0f9218f85bee6ce126b381d --- /dev/null +++ b/vue-admin-better/layouts/Permissions/index.js @@ -0,0 +1,13 @@ +import permissions from './permissions' + +const install = function (Vue) { + Vue.directive('permissions', permissions) +} + +if (window.Vue) { + window['permissions'] = permissions + Vue.use(install) +} + +permissions.install = install +export default permissions diff --git a/vue-admin-better/layouts/Permissions/permissions.js b/vue-admin-better/layouts/Permissions/permissions.js new file mode 100755 index 0000000000000000000000000000000000000000..74ac1f64af8ab3921ca2318f1748ec411edbf54c --- /dev/null +++ b/vue-admin-better/layouts/Permissions/permissions.js @@ -0,0 +1,13 @@ +import store from '@/store' + +export default { + inserted(element, binding) { + const { value } = binding + const permissions = store.getters['user/permissions'] + if (value && value instanceof Array && value.length > 0) { + const hasPermission = permissions.some((role) => value.includes(role)) + if (!hasPermission) + element.parentNode && element.parentNode.removeChild(element) + } + }, +} diff --git a/vue-admin-better/layouts/VabColorfullIcon/index.vue b/vue-admin-better/layouts/VabColorfullIcon/index.vue new file mode 100755 index 0000000000000000000000000000000000000000..840de3cab5a72cd52b69060f2fff7e40b30877fe --- /dev/null +++ b/vue-admin-better/layouts/VabColorfullIcon/index.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/vue-admin-better/layouts/VabErrorLog/index.vue b/vue-admin-better/layouts/VabErrorLog/index.vue new file mode 100755 index 0000000000000000000000000000000000000000..9065d0a7ab2c21b81e642cf22447538fdf05a8b2 --- /dev/null +++ b/vue-admin-better/layouts/VabErrorLog/index.vue @@ -0,0 +1,128 @@ + + + + + diff --git a/vue-admin-better/layouts/VabFullScreenBar/index.vue b/vue-admin-better/layouts/VabFullScreenBar/index.vue new file mode 100755 index 0000000000000000000000000000000000000000..fedf502f711d60389d61a3ff6cdfb5ef5a8ada80 --- /dev/null +++ b/vue-admin-better/layouts/VabFullScreenBar/index.vue @@ -0,0 +1,53 @@ + + + diff --git a/vue-admin-better/layouts/VabGithubCorner/index.vue b/vue-admin-better/layouts/VabGithubCorner/index.vue new file mode 100755 index 0000000000000000000000000000000000000000..031ce9721882fb9660a983a5ee7d37de06dc8160 --- /dev/null +++ b/vue-admin-better/layouts/VabGithubCorner/index.vue @@ -0,0 +1,75 @@ + + + + diff --git a/vue-admin-better/layouts/VabQueryForm/VabQueryFormBottomPanel.vue b/vue-admin-better/layouts/VabQueryForm/VabQueryFormBottomPanel.vue new file mode 100755 index 0000000000000000000000000000000000000000..53bd186dcf9bfb4e8f6fb88345b7035de154cda1 --- /dev/null +++ b/vue-admin-better/layouts/VabQueryForm/VabQueryFormBottomPanel.vue @@ -0,0 +1,20 @@ + + + diff --git a/vue-admin-better/layouts/VabQueryForm/VabQueryFormLeftPanel.vue b/vue-admin-better/layouts/VabQueryForm/VabQueryFormLeftPanel.vue new file mode 100755 index 0000000000000000000000000000000000000000..ee23a782195960ba5c63f17eb62c1d5950651855 --- /dev/null +++ b/vue-admin-better/layouts/VabQueryForm/VabQueryFormLeftPanel.vue @@ -0,0 +1,25 @@ + + + diff --git a/vue-admin-better/layouts/VabQueryForm/VabQueryFormRightPanel.vue b/vue-admin-better/layouts/VabQueryForm/VabQueryFormRightPanel.vue new file mode 100755 index 0000000000000000000000000000000000000000..e74aa14eaac70af378ac678acc4f927e0d7e803b --- /dev/null +++ b/vue-admin-better/layouts/VabQueryForm/VabQueryFormRightPanel.vue @@ -0,0 +1,25 @@ + + + diff --git a/vue-admin-better/layouts/VabQueryForm/VabQueryFormTopPanel.vue b/vue-admin-better/layouts/VabQueryForm/VabQueryFormTopPanel.vue new file mode 100755 index 0000000000000000000000000000000000000000..7a48e3f57a50244e292cd2b529fa7a4ff746addd --- /dev/null +++ b/vue-admin-better/layouts/VabQueryForm/VabQueryFormTopPanel.vue @@ -0,0 +1,20 @@ + + + diff --git a/vue-admin-better/layouts/VabQueryForm/index.vue b/vue-admin-better/layouts/VabQueryForm/index.vue new file mode 100755 index 0000000000000000000000000000000000000000..f49a6bb3fc9a4227ba522eb70cc2abde5361d674 --- /dev/null +++ b/vue-admin-better/layouts/VabQueryForm/index.vue @@ -0,0 +1,63 @@ + + + + + diff --git a/vue-admin-better/layouts/VabRemixIcon/index.vue b/vue-admin-better/layouts/VabRemixIcon/index.vue new file mode 100755 index 0000000000000000000000000000000000000000..1f45271a166d5dc1dc351fc16257dad7bbd199f2 --- /dev/null +++ b/vue-admin-better/layouts/VabRemixIcon/index.vue @@ -0,0 +1,69 @@ + + + + + diff --git a/vue-admin-better/layouts/VabSideBar/components/VabMenuItem.vue b/vue-admin-better/layouts/VabSideBar/components/VabMenuItem.vue new file mode 100755 index 0000000000000000000000000000000000000000..3ed8d1b0de66f41b98854442276b134d1b50dd4e --- /dev/null +++ b/vue-admin-better/layouts/VabSideBar/components/VabMenuItem.vue @@ -0,0 +1,84 @@ + + + diff --git a/vue-admin-better/layouts/VabSideBar/components/VabSideBarItem.vue b/vue-admin-better/layouts/VabSideBar/components/VabSideBarItem.vue new file mode 100755 index 0000000000000000000000000000000000000000..baaac70eb7d47cb1c1ceabc72b13c3d853ff14b5 --- /dev/null +++ b/vue-admin-better/layouts/VabSideBar/components/VabSideBarItem.vue @@ -0,0 +1,108 @@ + + + + + diff --git a/vue-admin-better/layouts/VabSideBar/components/VabSubmenu.vue b/vue-admin-better/layouts/VabSideBar/components/VabSubmenu.vue new file mode 100755 index 0000000000000000000000000000000000000000..58d90c5cd539b1837a3cc3446d7162c7be5b62d2 --- /dev/null +++ b/vue-admin-better/layouts/VabSideBar/components/VabSubmenu.vue @@ -0,0 +1,60 @@ + + + diff --git a/vue-admin-better/layouts/VabSideBar/index.vue b/vue-admin-better/layouts/VabSideBar/index.vue new file mode 100755 index 0000000000000000000000000000000000000000..c01103f7458b9e50850e0f0930d2cf6f502fee6f --- /dev/null +++ b/vue-admin-better/layouts/VabSideBar/index.vue @@ -0,0 +1,141 @@ + + + diff --git a/vue-admin-better/layouts/VabTabsBar/index.vue b/vue-admin-better/layouts/VabTabsBar/index.vue new file mode 100755 index 0000000000000000000000000000000000000000..4a3f85c4db14d0742fc16d8d52994bba9eea5158 --- /dev/null +++ b/vue-admin-better/layouts/VabTabsBar/index.vue @@ -0,0 +1,293 @@ + + + + + diff --git a/vue-admin-better/layouts/VabTopBar/index.vue b/vue-admin-better/layouts/VabTopBar/index.vue new file mode 100755 index 0000000000000000000000000000000000000000..07602f61b0ef2842291c86e48a76d3402838dd26 --- /dev/null +++ b/vue-admin-better/layouts/VabTopBar/index.vue @@ -0,0 +1,224 @@ + + + + diff --git a/vue-admin-better/layouts/index.js b/vue-admin-better/layouts/index.js new file mode 100755 index 0000000000000000000000000000000000000000..8e9ae4ac80b6261a0ddae3c3009d646aacf5ee7c --- /dev/null +++ b/vue-admin-better/layouts/index.js @@ -0,0 +1,31 @@ +/* eslint-disable */ +const chalk = require('chalk') +module.exports = { + webpackBarName: 'vue-admin-better', + webpackBanner: + ' build: vue-admin-better \n vue-admin-beautiful.com \n https://gitee.com/chu1204505056/vue-admin-better \n time: ', + donationConsole() { + const chalk = require('chalk') + console.log( + chalk.green( + `> 欢迎使用OPSLI 快速开发平台,github开源地址:https://github.com/hiparker/opsli-boot` + ) + ) + console.log( + chalk.green( + `> 欢迎使用OPSLI 快速开发平台,码云开源地址:https://gitee.com/hiparker/opsli-boot` + ) + ) + + console.log(chalk.green(`> 本程序 前端使用 vue-admin-better 开源版本`)) + + console.log( + chalk.green( + `> 使用中出现任何问题可加QQ群反馈,获取基础版、文档,请我们喝杯咖啡(如若情况不允许,请勿勉强)` + ) + ) + + console.log(chalk.green(`> 如果您不希望显示以上信息,可在config中配置关闭`)) + console.log('\n') + }, +} diff --git a/vue-admin-better/layouts/package.json b/vue-admin-better/layouts/package.json new file mode 100755 index 0000000000000000000000000000000000000000..119851a8a73f48f89036a3f0d3d1831c7be92d49 --- /dev/null +++ b/vue-admin-better/layouts/package.json @@ -0,0 +1,5 @@ +{ + "name": "layouts", + "version": "1.0.0", + "main": "index.js" +} diff --git a/vue-admin-better/layouts/prettier.config.js b/vue-admin-better/layouts/prettier.config.js new file mode 100755 index 0000000000000000000000000000000000000000..f70042cbb50ee9c8236b42cd8d7b4d6d0a0a4d29 --- /dev/null +++ b/vue-admin-better/layouts/prettier.config.js @@ -0,0 +1,17 @@ +/* eslint-disable */ +module.exports = { + printWidth: 80, + tabWidth: 2, + useTabs: false, + semi: false, + singleQuote: true, + quoteProps: 'as-needed', + jsxSingleQuote: false, + trailingComma: 'es5', + bracketSpacing: true, + jsxBracketSameLine: false, + arrowParens: 'always', + htmlWhitespaceSensitivity: 'ignore', + vueIndentScriptAndStyle: true, + endOfLine: 'lf', +} diff --git a/vue-admin-beautiful/license.md b/vue-admin-better/license.md similarity index 100% rename from vue-admin-beautiful/license.md rename to vue-admin-better/license.md diff --git a/vue-admin-beautiful/mock/controller/ad.js b/vue-admin-better/mock/controller/ad.js similarity index 100% rename from vue-admin-beautiful/mock/controller/ad.js rename to vue-admin-better/mock/controller/ad.js diff --git a/vue-admin-beautiful/mock/controller/blacklist.js b/vue-admin-better/mock/controller/blacklist.js similarity index 100% rename from vue-admin-beautiful/mock/controller/blacklist.js rename to vue-admin-better/mock/controller/blacklist.js diff --git a/vue-admin-beautiful/mock/controller/colorfulIcon.js b/vue-admin-better/mock/controller/colorfulIcon.js similarity index 100% rename from vue-admin-beautiful/mock/controller/colorfulIcon.js rename to vue-admin-better/mock/controller/colorfulIcon.js diff --git a/vue-admin-beautiful/mock/controller/goodsDetail.js b/vue-admin-better/mock/controller/goodsDetail.js similarity index 100% rename from vue-admin-beautiful/mock/controller/goodsDetail.js rename to vue-admin-better/mock/controller/goodsDetail.js diff --git a/vue-admin-beautiful/mock/controller/goodsList.js b/vue-admin-better/mock/controller/goodsList.js similarity index 100% rename from vue-admin-beautiful/mock/controller/goodsList.js rename to vue-admin-better/mock/controller/goodsList.js diff --git a/vue-admin-beautiful/mock/controller/icon.js b/vue-admin-better/mock/controller/icon.js similarity index 100% rename from vue-admin-beautiful/mock/controller/icon.js rename to vue-admin-better/mock/controller/icon.js diff --git a/vue-admin-beautiful/mock/controller/menuManagement.js b/vue-admin-better/mock/controller/menuManagement.js similarity index 100% rename from vue-admin-beautiful/mock/controller/menuManagement.js rename to vue-admin-better/mock/controller/menuManagement.js diff --git a/vue-admin-beautiful/mock/controller/notice.js b/vue-admin-better/mock/controller/notice.js similarity index 100% rename from vue-admin-beautiful/mock/controller/notice.js rename to vue-admin-better/mock/controller/notice.js diff --git a/vue-admin-beautiful/mock/controller/personalCenter.js b/vue-admin-better/mock/controller/personalCenter.js similarity index 100% rename from vue-admin-beautiful/mock/controller/personalCenter.js rename to vue-admin-better/mock/controller/personalCenter.js diff --git a/vue-admin-beautiful/mock/controller/remixIcon.js b/vue-admin-better/mock/controller/remixIcon.js similarity index 100% rename from vue-admin-beautiful/mock/controller/remixIcon.js rename to vue-admin-better/mock/controller/remixIcon.js diff --git a/vue-admin-beautiful/mock/controller/roleManagement.js b/vue-admin-better/mock/controller/roleManagement.js similarity index 100% rename from vue-admin-beautiful/mock/controller/roleManagement.js rename to vue-admin-better/mock/controller/roleManagement.js diff --git a/vue-admin-beautiful/mock/controller/router.js b/vue-admin-better/mock/controller/router.js similarity index 100% rename from vue-admin-beautiful/mock/controller/router.js rename to vue-admin-better/mock/controller/router.js diff --git a/vue-admin-beautiful/mock/controller/table.js b/vue-admin-better/mock/controller/table.js similarity index 100% rename from vue-admin-beautiful/mock/controller/table.js rename to vue-admin-better/mock/controller/table.js diff --git a/vue-admin-beautiful/mock/controller/tree.js b/vue-admin-better/mock/controller/tree.js similarity index 100% rename from vue-admin-beautiful/mock/controller/tree.js rename to vue-admin-better/mock/controller/tree.js diff --git a/vue-admin-beautiful/mock/controller/upload.js b/vue-admin-better/mock/controller/upload.js similarity index 100% rename from vue-admin-beautiful/mock/controller/upload.js rename to vue-admin-better/mock/controller/upload.js diff --git a/vue-admin-beautiful/mock/controller/user.js b/vue-admin-better/mock/controller/user.js similarity index 100% rename from vue-admin-beautiful/mock/controller/user.js rename to vue-admin-better/mock/controller/user.js diff --git a/vue-admin-beautiful/mock/controller/userManagement.js b/vue-admin-better/mock/controller/userManagement.js similarity index 100% rename from vue-admin-beautiful/mock/controller/userManagement.js rename to vue-admin-better/mock/controller/userManagement.js diff --git a/vue-admin-better/mock/index.js b/vue-admin-better/mock/index.js new file mode 100644 index 0000000000000000000000000000000000000000..c468f906c0323c0cff05d1dafa83da1b5556fbe9 --- /dev/null +++ b/vue-admin-better/mock/index.js @@ -0,0 +1,98 @@ +const chokidar = require("chokidar"); +const bodyParser = require("body-parser"); +const chalk = require("chalk"); +const path = require("path"); +const { mock } = require("mockjs"); +const { baseURL } = require("../src/config"); +const mockDir = path.join(process.cwd(), "mock"); +const { handleMockArray } = require("./utils"); + +/** + * + * @param app + * @returns {{mockStartIndex: number, mockRoutesLength: number}} + */ +const registerRoutes = (app) => { + let mockLastIndex; + const mocks = []; + const mockArray = handleMockArray(); + mockArray.forEach((item) => { + const obj = require(item); + mocks.push(...obj); + }); + const mocksForServer = mocks.map((route) => { + return responseFake(route.url, route.type, route.response); + }); + for (const mock of mocksForServer) { + app[mock.type](mock.url, mock.response); + mockLastIndex = app._router.stack.length; + } + const mockRoutesLength = Object.keys(mocksForServer).length; + return { + mockRoutesLength: mockRoutesLength, + mockStartIndex: mockLastIndex - mockRoutesLength, + }; +}; + +/** + * + * @param url + * @param type + * @param respond + * @returns {{response(*=, *=): void, type: (*|string), url: RegExp}} + */ +const responseFake = (url, type, respond) => { + return { + url: new RegExp(`${baseURL}${url}`), + type: type || "get", + response(req, res) { + res.status(200); + if (JSON.stringify(req.body) !== "{}") { + console.log(chalk.green(`> 请求地址:${req.path}`)); + console.log(chalk.green(`> 请求参数:${JSON.stringify(req.body)}\n`)); + } else { + console.log(chalk.green(`> 请求地址:${req.path}\n`)); + } + res.json(mock(respond instanceof Function ? respond(req, res) : respond)); + }, + }; +}; +/** + * + * @param app + */ +module.exports = (app) => { + app.use(bodyParser.json()); + app.use( + bodyParser.urlencoded({ + extended: true, + }) + ); + + const mockRoutes = registerRoutes(app); + let mockRoutesLength = mockRoutes.mockRoutesLength; + let mockStartIndex = mockRoutes.mockStartIndex; + chokidar + .watch(mockDir, { + ignored: /mock-server/, + ignoreInitial: true, + }) + .on("all", (event) => { + if (event === "change" || event === "add") { + try { + app._router.stack.splice(mockStartIndex, mockRoutesLength); + + Object.keys(require.cache).forEach((item) => { + if (item.includes(mockDir)) { + delete require.cache[require.resolve(item)]; + } + }); + const mockRoutes = registerRoutes(app); + mockRoutesLength = mockRoutes.mockRoutesLength; + mockStartIndex = mockRoutes.mockStartIndex; + } catch (error) { + console.log(chalk.red(error)); + } + } + }); +}; diff --git a/vue-admin-beautiful/mock/mockServer.js b/vue-admin-better/mock/mockServer.js similarity index 97% rename from vue-admin-beautiful/mock/mockServer.js rename to vue-admin-better/mock/mockServer.js index 23944fd1d727131360d65c7f872b935432027f30..c0b6d457580048c88074894f591cd47cc170e177 100644 --- a/vue-admin-beautiful/mock/mockServer.js +++ b/vue-admin-better/mock/mockServer.js @@ -3,7 +3,7 @@ const bodyParser = require("body-parser"); const chalk = require("chalk"); const path = require("path"); const Mock = require("mockjs"); -const { baseURL } = require("../src/config/settings"); +const { baseURL } = require("../src/config"); const mockDir = path.join(process.cwd(), "mock"); /** diff --git a/vue-admin-beautiful/mock/utils/index.js b/vue-admin-better/mock/utils/index.js similarity index 100% rename from vue-admin-beautiful/mock/utils/index.js rename to vue-admin-better/mock/utils/index.js diff --git a/vue-admin-beautiful/nginx.conf b/vue-admin-better/nginx.conf similarity index 100% rename from vue-admin-beautiful/nginx.conf rename to vue-admin-better/nginx.conf diff --git a/vue-admin-beautiful/nginx.default.conf b/vue-admin-better/nginx.default.conf similarity index 100% rename from vue-admin-beautiful/nginx.default.conf rename to vue-admin-better/nginx.default.conf diff --git a/vue-admin-beautiful/package.json b/vue-admin-better/package.json similarity index 33% rename from vue-admin-beautiful/package.json rename to vue-admin-better/package.json index 14d61c29cf8f878d657b25e1a94909e4566a8950..09f2d1e7d3d8b9eefc544a5a117fb23f44eb21b8 100644 --- a/vue-admin-beautiful/package.json +++ b/vue-admin-better/package.json @@ -1,29 +1,16 @@ { - "name": "vue-admin-beautiful", - "version": "1.0.0", - "author": "chuzhixin 1204505056@qq.com", + "name": "vue-admin-better", + "version": "2.1.5", + "author": "vue-admin-better", "participants": [], - "homepage": "https://chu1204505056.gitee.io/vue-admin-beautiful", - "publishConfig": { - "registry": "https://npm.pkg.github.com/" - }, + "homepage": "https://chu1204505056.gitee.io/vue-admin-better", "scripts": { + "globle": "npm install -g cnpm --registry=https://registry.npm.taobao.org&&cnpm i rimraf npm-check-updates nrm -g&&rimraf node_modules&&cnpm i", "serve": "vue-cli-service serve", "build": "vue-cli-service build", - "build:report": "vue-cli-service build --report", - "globle": "npm install -g cnpm --registry=https://registry.npm.taobao.org&&cnpm i rimraf npm-check-updates nrm -g&&rimraf node_modules&&cnpm i", "lint": "vue-cli-service lint --fix", - "lint:style": "stylelint-config-prettier-check", - "inspect": "vue-cli-service inspect", - "template": "plop", - "clear": "rimraf node_modules&&cnpm i&&increase-memory-limit", - "use:npm": "nrm use npm", - "use:taobao": "nrm use taobao", - "update": "ncu -u --concurrency 10 --timeout 80000&&cnpm i", - "update:globle": "ncu -g --concurrency 10 --timeout 80000", - "svgo": "svgo -f src/remixIcon/svg --config=svgo.yml", - "push": "start ./push.sh", - "deploy": "start ./deploy.sh", + "clear": "rimraf node_modules&&npm install --registry=--registry=https://registry.npmmirror.com", + "image-webpack-loader": "cnpm i image-webpack-loader -D", "increase-memory-limit": "increase-memory-limit", "postinstall": "patch-package" }, @@ -31,96 +18,80 @@ "type": "git", "url": "git+https://github.com/chuzhixin/vue-admin-beautiful.git" }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } + "gitHooks": { + "pre-commit": "lint-staged" }, "lint-staged": { - "src/**/*.{js,vue}": [ - "eslint --fix", + "*.{js,jsx,vue}": [ + "vue-cli-service lint", "git add" ] }, "dependencies": { - "axios": "^0.20.0", + "axios": "^1.3.4", "better-scroll": "^2.0.4", - "clipboard": "^2.0.6", "codemirror": "5.45.0", - "core-js": "^3.6.5", "crypto-js": "^4.1.1", - "dayjs": "^1.9.0", - "echarts": "^4.9.0", - "echarts-wordcloud": "^1.1.3", "element-resize-detector": "^1.2.2", - "element-ui": "2.13.2", "file-saver": "^2.0.2", "github-markdown-css": "^5.1.0", "js-cookie": "^2.2.1", - "jsencrypt": "3.0.0-rc.1", "jsonlint": "^1.6.3", - "lodash": "^4.17.20", - "maptalks": "^0.49.1", - "mapv": "^2.0.57", "marked": "^4.1.1", - "nprogress": "^0.2.0", - "qs": "^6.9.4", - "screenfull": "^5.0.2", - "sortablejs": "^1.12.0", - "vue": "^2.6.12", "vue-amap": "^0.5.10", - "vue-echarts": "^5.0.0-beta.0", "vue-qart": "^2.2.0", - "vue-router": "^3.4.5", "vuedraggable": "^2.24.1", - "vuex": "^3.5.1", - "zx-comparison": "1.0.3", - "zx-count": "0.3.7", - "zx-icon": "1.1.9", - "zx-keel": "0.9.4", - "zx-layouts": "0.6.13", - "zx-magnifie": "0.4.0", - "zx-markdown-editor": "0.0.2", - "zx-player": "1.0.1", - "zx-quill": "0.0.2", - "zx-templates": "0.0.22", - "zx-verify": "0.0.2" + "caniuse-lite": "^1.0.30001464", + "clipboard": "^2.0.11", + "core-js": "^3.29.0", + "dayjs": "^1.11.7", + "echarts": "5.4.1", + "element-ui": "^2.15.13", + "jsencrypt": "^3.3.2", + "lodash": "^4.17.21", + "maptalks": "^0.49.5", + "mapv": "^2.0.62", + "mockjs": "^1.1.0", + "nprogress": "^0.2.0", + "qs": "^6.11.1", + "screenfull": "^5.2.0", + "sortablejs": "^1.15.0", + "vab-icon": "file:vab-icon", + "vue": "~2.6.14", + "vue-echarts": "5.0.0-beta.0", + "vue-router": "^3.5.3", + "vue-template-compiler": "~2.6.14", + "vuex": "^3.6.2", + "layouts": "file:layouts" }, "devDependencies": { - "@babel/register": "^7.11.5", - "@vue/cli-plugin-babel": "^4.5.6", - "@vue/cli-plugin-eslint": "^4.5.6", - "@vue/cli-plugin-router": "^4.5.6", - "@vue/cli-plugin-vuex": "^4.5.6", - "@vue/cli-service": "^4.5.6", - "@vue/eslint-config-prettier": "^6.0.0", - "autoprefixer": "^10.0.1", - "babel-eslint": "^10.1.0", - "babel-plugin-dynamic-import-node": "^2.3.3", - "compression-webpack-plugin": "^6.0.2", - "eslint": "^7.10.0", - "eslint-plugin-prettier": "^3.1.4", - "eslint-plugin-vue": "^6.2.2", - "filemanager-webpack-plugin": "^2.0.5", - "husky": "^4.3.0", - "image-webpack-loader": "^7.0.1", - "increase-memory-limit": "^1.0.7", - "lint-staged": "^10.4.0", - "mockjs": "^1.1.0", "patch-package": "^6.2.2", "plop": "^2.7.4", - "prettier": "^2.1.2", - "sass": "1.26.11", - "sass-loader": "10.0.2", "script-loader": "^0.7.2", - "stylelint": "^13.7.2", - "stylelint-config-prettier": "^8.0.2", - "stylelint-config-recess-order": "^2.1.0", - "svg-sprite-loader": "^5.0.0", - "svgo": "^1.3.2", - "vue-cropper": "^0.5.5", - "vue-template-compiler": "^2.6.12", - "webpackbar": "^4.0.0" + "@vue/cli-plugin-babel": "^4.5.15", + "@vue/cli-plugin-eslint": "^4.5.15", + "@vue/cli-service": "^4.5.15", + "@vue/composition-api": "^1.7.1", + "@vue/eslint-config-prettier": "^7.1.0", + "babel-eslint": "^10.1.0", + "body-parser": "^1.20.2", + "chalk": "^4.1.2", + "chokidar": "^3.5.3", + "eslint": "^7.32.0", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-vue": "^9.1.1", + "filemanager-webpack-plugin": "^8.0.0", + "image-webpack-loader": "^8.1.0", + "lint-staged": "^13.2.0", + "prettier": "^2.8.4", + "sass": "~1.32.13", + "sass-loader": "^10.1.1", + "stylelint": "^15.2.0", + "stylelint-config-prettier": "^9.0.5", + "stylelint-config-recess-order": "^4.0.0", + "svg-sprite-loader": "^6.0.11", + "webpackbar": "^5.0.2", + "vue-cropper": "^0.5.5" }, "keywords": [ "vue", diff --git a/vue-admin-beautiful/patches/element-ui+2.13.2.patch b/vue-admin-better/patches/element-ui+2.15.13.patch similarity index 92% rename from vue-admin-beautiful/patches/element-ui+2.13.2.patch rename to vue-admin-better/patches/element-ui+2.15.13.patch index 6278a8b70b4aaba9270fe5b9b4727ed00b21c159..bfa5b25c28f0463ffcda33ca6f3eba90b0e4d2d1 100644 --- a/vue-admin-beautiful/patches/element-ui+2.13.2.patch +++ b/vue-admin-better/patches/element-ui+2.15.13.patch @@ -1,8 +1,8 @@ diff --git a/node_modules/element-ui/lib/element-ui.common.js b/node_modules/element-ui/lib/element-ui.common.js -index 0c04345..4d4e156 100644 +index dae8b31..04522b0 100644 --- a/node_modules/element-ui/lib/element-ui.common.js +++ b/node_modules/element-ui/lib/element-ui.common.js -@@ -29644,7 +29644,7 @@ function srcvue_type_script_lang_js_noop() {} +@@ -29862,7 +29862,7 @@ function srcvue_type_script_lang_js_noop() {} var file = this.getFile(rawFile); this.onProgress(ev, file, this.uploadFiles); file.status = 'uploading'; diff --git a/vue-admin-beautiful/prettier.config.js b/vue-admin-better/prettier.config.js similarity index 100% rename from vue-admin-beautiful/prettier.config.js rename to vue-admin-better/prettier.config.js diff --git a/vue-admin-beautiful/public/favicon.ico b/vue-admin-better/public/favicon.ico similarity index 100% rename from vue-admin-beautiful/public/favicon.ico rename to vue-admin-better/public/favicon.ico diff --git a/vue-admin-beautiful/public/index.html b/vue-admin-better/public/index.html similarity index 82% rename from vue-admin-beautiful/public/index.html rename to vue-admin-better/public/index.html index 761c6ba5f1e119a57ff7836fff44df6ab5438982..7d2b625cadc4a1b78ad9b3ad2a539121e7a1a5c1 100644 --- a/vue-admin-beautiful/public/index.html +++ b/vue-admin-better/public/index.html @@ -16,17 +16,6 @@ /> -