diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6f6a7ea --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 lyt-Top + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 1e3c330..7a1bbdb 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,17 @@
-

vue-admin-wonderful

+

- - vue + + vue - - element ui + + element ui - - axios + + license - - license + + webpack

 

@@ -19,49 +19,31 @@ #### 介绍 -###### vue2.x 版本 - -vue-admin-wonderful, -一套为开发者快速开发准备的基于 vue2.x、 -element ui 2.14.1 越看越精彩的后台管理系统一站式平台模板。 -此次发布了 5 个模板:分为 1 个 pro 版本(包含全部基础版本),4 个基础版本。点击左上角设置,预览更多功能。 -可选择相对应的模板进行预览及下载,希望可以帮你完成快速开发。 - -###### vue3.x 版本 - -基于 vue3.x + CompositionAPI + typescript + vite + element plus + vue-router-next + next.vuex,适配手机、平板、pc 的后台开源免费模板,希望减少工作量,帮助大家实现快速开发。 +基于 vue2.x + webpack + element ui,适配手机、平板、pc 的后台开源免费模板,希望减少工作量,帮助大家实现快速开发。 #### 线上预览 -###### vue2.x 版本 - -- pro 版本预览 http://lyt-top.gitee.io/vue-admin-wonderful-preview -- fashion 版本预览 http://lyt-top.gitee.io/vue-admin-wonderful-fashion-preview -- classic 版本预览 http://lyt-top.gitee.io/vue-admin-wonderful-classic-preview -- elegant 版本预览 http://lyt-top.gitee.io/vue-admin-wonderful-elegant-preview -- strange 版本预览 http://lyt-top.gitee.io/vue-admin-wonderful-strange-preview - -###### vue3.x 版本 - -- vue-next-admin 版本预览 https://lyt-top.gitee.io/vue-next-admin-preview/#/login +- vue3.x 版本预览(vue-next-admin) https://lyt-top.gitee.io/vue-next-admin-preview/#/login +- vue2.x 版本预览(vue-prev-admin)https://lyt-top.gitee.io/vue-prev-admin-preview/#/login #### 代码仓库 - vue3.x 版本 https://gitee.com/lyt-top/vue-next-admin -- vue2.x 版本 https://gitee.com/lyt-top/vue-admin-wonderful +- vue2.x 版本 https://gitee.com/lyt-top/vue-next-admin/tree/vue-prev-admin -#### 安装 cnpm +#### 安装 cnpm、yarn - 复制代码(桌面 cmd 运行) `npm install -g cnpm --registry=https://registry.npm.taobao.org` +- 复制代码(桌面 cmd 运行) `npm install -g yarn` -#### 使用说明(vue3.x 版本) +#### 使用说明 ```bash # 克隆项目 git clone https://gitee.com/lyt-top/vue-next-admin.git # 进入项目 -cd vue-admin-wonderful-next +cd vue-next-admin # 安装依赖 cnpm install @@ -73,50 +55,58 @@ cnpm run dev cnpm run build ``` -#### 使用说明(vue2.x 版本) +#### git 命令 -```bash -# 克隆项目 -git clone https://gitee.com/lyt-top/vue-admin-wonderful.git +- 在本地新建一个分支:`git branch newBranch` +- 切换到你的新分支:`git checkout newBranch` +- 将新分支发布在 github、gitee 上:`git push origin newBranch` +- 在本地删除一个分支:`git branch -d newBranch` +- 在 github 远程端删除一个分支:`git push origin :newBranch (分支名前的冒号代表删除)` +- 注意删除远程分支后,如果有对应的本地分支,本地分支并不会同步删除! -# 进入项目 -cd vue-admin-wonderful +#### 学习交流加 QQ 群 -# 安装依赖 -cnpm install - -# 运行项目 -cnpm run serve - -# 打包发布 -cnpm run build -``` - -#### 加 qq 群学习交流 - -- 加群下载基础模板、查看开发文档。 +- 查看开发文档、vue-next-admin 开发文档正在编写中... - 群号码:665452019 -vue-admin-wonderful 讨论群 +vue-next-admin 讨论群 #### 鸣谢列表 - vue +- vue-next - element-ui -- axios +- element-plus +- vue-router-nex +- vuex +- echarts - vue-element-admin +- axios +- clipboard +- countUp +- mitt +- nprogress +- screenfull +- sortablejs +- sass +- typescript +- vite +- wangeditor +- cropperjs +- @antv/g6 +- qrcodejs +- print-js +- vue-web-screen-shot #### 特别感谢 特别感谢群里老哥的建议、指导与帮忙,谢谢! -- @省长 -- @唐参 +- @省长 +- @唐参 - @川歌 #### 其他事项 -- vue3.x vue-next-admin 版本,基于 vue3.x + CompositionAPI + typescript + vite + element plus。 -- vue2.x vue-admin-wonderful 版本,基于 vue2.x + element ui。 - 喜欢用就帮忙 gitee star 下,不喜欢用也没关系,出来打工、创业,大家都不容易,感谢大家的支持,谢谢! diff --git a/public/favicon.ico b/public/favicon.ico index 9da231b..68e506e 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/index.html b/public/index.html index 32e7da1..4332cde 100644 --- a/public/index.html +++ b/public/index.html @@ -6,16 +6,25 @@ vue-prev-admin
+ diff --git a/src/App.vue b/src/App.vue index 1bf5c34..c428bc7 100644 --- a/src/App.vue +++ b/src/App.vue @@ -33,11 +33,11 @@ export default { }, // 获取缓存中的布局配置 getLayoutThemeConfig() { - if (getLocal('themeConfig')) { - this.$store.dispatch('themeConfig/setThemeConfig', getLocal('themeConfig')); + if (getLocal('themeConfigPrev')) { + this.$store.dispatch('themeConfig/setThemeConfig', getLocal('themeConfigPrev')); document.documentElement.style.cssText = getLocal('themeConfigStyle'); } else { - setLocal('themeConfig', this.$store.state.themeConfig.themeConfig); + setLocal('themeConfigPrev', this.$store.state.themeConfig.themeConfig); } }, }, diff --git a/src/api/menu/index.js b/src/api/menu/index.js index d61324e..f097037 100644 --- a/src/api/menu/index.js +++ b/src/api/menu/index.js @@ -6,6 +6,8 @@ import request from '@/utils/request'; * 开发环境,请求跨越的接口。为了配置跨越示例 * 线上环境,请求目录下的 `json` 数据 * 一般后端接口都会处理跨越问题,可根据具体情况进行修改 + * json 格式地址:https://gitee.com/lyt-top/vue-next-admin-images/tree/master/vue2 + * 本地菜单地址:public/xxx.json */ // 获取后端动态路由菜单(超级管理) export function getMenuAdmin() { @@ -16,7 +18,7 @@ export function getMenuAdmin() { }); // 模拟跨域 // return request({ - // url: '/gitee/lyt-top/vue-admin-wonderful-images/raw/master/menu/menuAdmin.json', + // url: '/gitee/lyt-top/vue-next-admin-images/raw/master/vue2/admin.json', // method: 'get', // }); } @@ -30,7 +32,7 @@ export function getMenuTest() { }); // 模拟跨域 // return request({ - // url: '/gitee/lyt-top/vue-admin-wonderful-images/raw/master/menu/menuTest.json', + // url: '/gitee/lyt-top/vue-next-admin-images/raw/master/vue2/test.json', // method: 'get', // }); } diff --git a/src/views/error/401.vue b/src/views/error/401.vue index 821672a..22c6e37 100644 --- a/src/views/error/401.vue +++ b/src/views/error/401.vue @@ -12,7 +12,7 @@
- +
diff --git a/src/views/error/404.vue b/src/views/error/404.vue index 52c37ba..ff01027 100644 --- a/src/views/error/404.vue +++ b/src/views/error/404.vue @@ -12,7 +12,7 @@
- +
diff --git a/src/views/home/mock.js b/src/views/home/mock.js index 73074c3..2664bd9 100644 --- a/src/views/home/mock.js +++ b/src/views/home/mock.js @@ -63,22 +63,22 @@ export const newsInfoList = [ { title: '[发布] 2021年04月15日发布 vue2.x + webpack 重构版本', date: '04/15', - link: 'https://gitee.com/lyt-top/vue-admin-wonderful', + link: 'https://gitee.com/lyt-top/vue-next-admin/tree/vue-prev-admin/', }, { title: '[重构] 2021年04月10日 重构 vue2.x + webpack v1.0.0 版本', date: '04/10', - link: 'https://gitee.com/lyt-top/vue-admin-wonderful', + link: 'https://gitee.com/lyt-top/vue-next-admin/tree/vue-prev-admin/', }, { title: '[预览] 2020年12月08日,基于 vue3.x 版本后台模板的预览', date: '12/08', - link: 'http://lyt-top.gitee.io/vue-next-admin-preview', + link: 'http://lyt-top.gitee.io/vue-next-admin-preview/#/login', }, { title: '[预览] 2020年11月15日,基于 vue2.x 版本后台模板的预览', date: '11/15', - link: 'http://lyt-top.gitee.io/vue-admin-wonderful-preview', + link: 'https://lyt-top.gitee.io/vue-prev-admin-preview/#/login', }, ]; diff --git a/src/views/layout/logo/index.vue b/src/views/layout/logo/index.vue index 03ea8b0..fa22582 100644 --- a/src/views/layout/logo/index.vue +++ b/src/views/layout/logo/index.vue @@ -1,10 +1,10 @@ @@ -52,6 +52,8 @@ export default { &-medium-img { width: 20px; margin-right: 5px; + position: relative; + top: 2px; } } .layout-logo-size { diff --git a/src/views/layout/navBars/breadcrumb/setings.vue b/src/views/layout/navBars/breadcrumb/setings.vue index 100263f..180edfd 100644 --- a/src/views/layout/navBars/breadcrumb/setings.vue +++ b/src/views/layout/navBars/breadcrumb/setings.vue @@ -216,13 +216,13 @@ export default { appEl.style.cssText = getLocal('appFilterStyle'); } // 语言国际化 - if (getLocal('themeConfig')) this.$i18n.locale = getLocal('themeConfig').globalI18n; + if (getLocal('themeConfigPrev')) this.$i18n.locale = getLocal('themeConfigPrev').globalI18n; }); }, // 存储布局配置 setLocalThemeConfig() { - removeLocal('themeConfig'); - setLocal('themeConfig', this.$store.state.themeConfig.themeConfig); + removeLocal('themeConfigPrev'); + setLocal('themeConfigPrev', this.$store.state.themeConfig.themeConfig); this.setLocalThemeConfigStyle(); }, // 存储布局配置全局主题样式(html根标签) diff --git a/src/views/layout/navBars/breadcrumb/user.vue b/src/views/layout/navBars/breadcrumb/user.vue index 6dc5115..63d8268 100644 --- a/src/views/layout/navBars/breadcrumb/user.vue +++ b/src/views/layout/navBars/breadcrumb/user.vue @@ -82,7 +82,7 @@ export default { }, }, mounted() { - if (getLocal('themeConfig')) this.initI18n(); + if (getLocal('themeConfigPrev')) this.initI18n(); }, methods: { // 搜索点击 @@ -104,15 +104,15 @@ export default { }, // 语言切换 onLanguageChange(lang) { - removeLocal('themeConfig'); + removeLocal('themeConfigPrev'); this.$store.state.themeConfig.themeConfig.globalI18n = lang; - setLocal('themeConfig', this.$store.state.themeConfig.themeConfig); + setLocal('themeConfigPrev', this.$store.state.themeConfig.themeConfig); this.$i18n.locale = lang; this.initI18n(); }, // 初始化言语国际化 initI18n() { - switch (getLocal('themeConfig').globalI18n) { + switch (getLocal('themeConfigPrev').globalI18n) { case 'zh-cn': this.disabledI18n = 'zh-cn'; break;