'admin-21.08.29:修复优化诸多内容,请查看CHANGELOG.md文件'

This commit is contained in:
lyt-Top 2021-08-29 18:45:29 +08:00
parent 8b1c80a8d4
commit f6ff10c4a9
15 changed files with 63 additions and 45 deletions

View File

@ -2,6 +2,16 @@
🎉🎉🔥 `vue-next-admin` 基于 vue3.x 、Typescript、vite、Element plus 等适配手机、平板、pc 的后台开源免费模板库vue2.x 请切换 vue-prev-admin 分支) 🎉🎉🔥 `vue-next-admin` 基于 vue3.x 、Typescript、vite、Element plus 等适配手机、平板、pc 的后台开源免费模板库vue2.x 请切换 vue-prev-admin 分支)
## 1.0.18
`2021.08.29`
- 🌟 更新 依赖更新最新版本
- 🎯 优化 权限组件去掉顶级 div`/src/components/auth`
- 🎉 新增 布局配置添加恢复默认按钮
- 🐞 修复 升级 <a href="https://element-plus.gitee.io/#/zh-CN/component/changelog" target="_blank">element plus 1.1.0-beta.7</a>后项目无法启动、el-menu 菜单
- 🐞 修复 表格固定列时的层级、设置了相对定位时,遮挡左侧导航菜单问题
## 1.0.17 ## 1.0.17
`2021.08.22` `2021.08.22`

View File

@ -1,6 +1,6 @@
{ {
"name": "vue-next-admin", "name": "vue-next-admin",
"version": "1.0.16", "version": "1.0.18",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",
@ -13,7 +13,7 @@
"echarts": "^5.1.2", "echarts": "^5.1.2",
"echarts-gl": "^2.0.8", "echarts-gl": "^2.0.8",
"echarts-wordcloud": "^2.0.0", "echarts-wordcloud": "^2.0.0",
"element-plus": "^1.0.2-beta.71", "element-plus": "^1.1.0-beta.7",
"mitt": "^3.0.0", "mitt": "^3.0.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"print-js": "^1.6.0", "print-js": "^1.6.0",
@ -21,11 +21,11 @@
"screenfull": "^5.1.0", "screenfull": "^5.1.0",
"sortablejs": "^1.14.0", "sortablejs": "^1.14.0",
"splitpanes": "^3.0.4", "splitpanes": "^3.0.4",
"vue": "^3.1.5", "vue": "^3.2.6",
"vue-clipboard3": "^1.0.1", "vue-clipboard3": "^1.0.1",
"vue-grid-layout": "^3.0.0-beta1", "vue-grid-layout": "^3.0.0-beta1",
"vue-i18n": "^9.1.7", "vue-i18n": "^9.1.7",
"vue-router": "^4.0.10", "vue-router": "^4.0.11",
"vue-web-screen-shot": "^1.2.0", "vue-web-screen-shot": "^1.2.0",
"vuex": "^4.0.2", "vuex": "^4.0.2",
"wangeditor": "^4.7.7" "wangeditor": "^4.7.7"
@ -33,21 +33,21 @@
"devDependencies": { "devDependencies": {
"@types/axios": "^0.14.0", "@types/axios": "^0.14.0",
"@types/clipboard": "^2.0.1", "@types/clipboard": "^2.0.1",
"@types/node": "^16.7.1", "@types/node": "^16.7.5",
"@types/nprogress": "^0.2.0", "@types/nprogress": "^0.2.0",
"@types/sortablejs": "^1.10.7", "@types/sortablejs": "^1.10.7",
"@typescript-eslint/eslint-plugin": "^4.29.2", "@typescript-eslint/eslint-plugin": "^4.29.3",
"@typescript-eslint/parser": "^4.29.2", "@typescript-eslint/parser": "^4.29.3",
"@vitejs/plugin-vue": "^1.4.0", "@vitejs/plugin-vue": "^1.6.0",
"@vue/compiler-sfc": "^3.2.4", "@vue/compiler-sfc": "^3.2.6",
"dotenv": "^10.0.0", "dotenv": "^10.0.0",
"eslint": "^7.32.0", "eslint": "^7.32.0",
"eslint-plugin-vue": "^7.16.0", "eslint-plugin-vue": "^7.17.0",
"prettier": "^2.3.2", "prettier": "^2.3.2",
"sass": "^1.38.0", "sass": "^1.38.2",
"sass-loader": "^12.1.0", "sass-loader": "^12.1.0",
"typescript": "^4.3.5", "typescript": "^4.4.2",
"vite": "^2.5.0", "vite": "^2.5.1",
"vue-eslint-parser": "^7.10.0" "vue-eslint-parser": "^7.10.0"
}, },
"browserslist": [ "browserslist": [

View File

@ -1,7 +1,5 @@
<template> <template>
<div v-if="getUserAuthBtnList"> <slot v-if="getUserAuthBtnList" />
<slot />
</div>
</template> </template>
<script lang="ts"> <script lang="ts">

View File

@ -1,7 +1,5 @@
<template> <template>
<div v-if="getUserAuthBtnList"> <slot v-if="getUserAuthBtnList" />
<slot />
</div>
</template> </template>
<script lang="ts"> <script lang="ts">

View File

@ -1,7 +1,5 @@
<template> <template>
<div v-if="getUserAuthBtnList"> <slot v-if="getUserAuthBtnList" />
<slot />
</div>
</template> </template>
<script lang="ts"> <script lang="ts">

View File

@ -167,6 +167,7 @@ export default {
sixColumns: 'Four', sixColumns: 'Four',
tipText: 'Click the button below to copy the layout configuration to `/src/store/modules/themeConfig.ts` It has been modified in.', tipText: 'Click the button below to copy the layout configuration to `/src/store/modules/themeConfig.ts` It has been modified in.',
copyText: 'replication configuration', copyText: 'replication configuration',
resetText: 'restore default',
copyTextSuccess: 'Copy succeeded!', copyTextSuccess: 'Copy succeeded!',
copyTextError: 'Copy failed!', copyTextError: 'Copy failed!',
}, },

View File

@ -167,6 +167,7 @@ export default {
sixColumns: '分栏', sixColumns: '分栏',
tipText: '点击下方按钮,复制布局配置去 `src/store/modules/themeConfig.ts` 中修改。', tipText: '点击下方按钮,复制布局配置去 `src/store/modules/themeConfig.ts` 中修改。',
copyText: '一键复制配置', copyText: '一键复制配置',
resetText: '一键恢复默认',
copyTextSuccess: '复制成功!', copyTextSuccess: '复制成功!',
copyTextError: '复制失败!', copyTextError: '复制失败!',
}, },

View File

@ -167,6 +167,7 @@ export default {
sixColumns: '分欄', sixColumns: '分欄',
tipText: '點擊下方按鈕,複製佈局配寘去`src/store/modules/themeConfig.ts`中修改。', tipText: '點擊下方按鈕,複製佈局配寘去`src/store/modules/themeConfig.ts`中修改。',
copyText: '一鍵複製配寘', copyText: '一鍵複製配寘',
resetText: '一鍵恢復默認',
copyTextSuccess: '複製成功!', copyTextSuccess: '複製成功!',
copyTextError: '複製失敗!', copyTextError: '複製失敗!',
}, },

View File

@ -365,6 +365,9 @@
@click="onCopyConfigClick" @click="onCopyConfigClick"
>{{ $t('message.layout.copyText') }} >{{ $t('message.layout.copyText') }}
</el-button> </el-button>
<el-button size="small" class="copy-config-btn-reset" icon="el-icon-refresh-right" type="info" @click="onResetConfigClick"
>{{ $t('message.layout.resetText') }}
</el-button>
</div> </div>
</el-scrollbar> </el-scrollbar>
</el-drawer> </el-drawer>
@ -561,6 +564,11 @@ export default defineComponent({
getThemeConfig.value.isDrawer = false; getThemeConfig.value.isDrawer = false;
}); });
}; };
//
const onResetConfigClick = () => {
Local.clear();
window.location.reload();
};
// 退() // 退()
const initSetStyle = () => { const initSetStyle = () => {
setTimeout(() => { setTimeout(() => {
@ -637,6 +645,7 @@ export default defineComponent({
onSortableTagsViewChange, onSortableTagsViewChange,
onShareTagsViewChange, onShareTagsViewChange,
onCopyConfigClick, onCopyConfigClick,
onResetConfigClick,
}; };
}, },
}); });
@ -773,7 +782,8 @@ export default defineComponent({
width: 100%; width: 100%;
margin-top: 15px; margin-top: 15px;
} }
.copy-config-last-btn { .copy-config-btn-reset {
width: 100%;
margin: 10px 0 0; margin: 10px 0 0;
} }
} }

View File

@ -3,13 +3,13 @@
<el-scrollbar @wheel.native.prevent="onElMenuHorizontalScroll" ref="elMenuHorizontalScrollRef"> <el-scrollbar @wheel.native.prevent="onElMenuHorizontalScroll" ref="elMenuHorizontalScrollRef">
<el-menu router :default-active="defaultActive" background-color="transparent" mode="horizontal"> <el-menu router :default-active="defaultActive" background-color="transparent" mode="horizontal">
<template v-for="val in menuLists"> <template v-for="val in menuLists">
<el-submenu :index="val.path" v-if="val.children && val.children.length > 0" :key="val.path"> <el-sub-menu :index="val.path" v-if="val.children && val.children.length > 0" :key="val.path">
<template #title> <template #title>
<i :class="val.meta.icon ? val.meta.icon : ''"></i> <i :class="val.meta.icon ? val.meta.icon : ''"></i>
<span>{{ $t(val.meta.title) }}</span> <span>{{ $t(val.meta.title) }}</span>
</template> </template>
<SubItem :chil="val.children" /> <SubItem :chil="val.children" />
</el-submenu> </el-sub-menu>
<el-menu-item :index="val.path" :key="val.path" v-else> <el-menu-item :index="val.path" :key="val.path" v-else>
<template #title v-if="!val.meta.isLink || (val.meta.isLink && val.meta.isIframe)"> <template #title v-if="!val.meta.isLink || (val.meta.isLink && val.meta.isIframe)">
<i :class="val.meta.icon ? val.meta.icon : ''"></i> <i :class="val.meta.icon ? val.meta.icon : ''"></i>

View File

@ -1,12 +1,12 @@
<template> <template>
<template v-for="val in chils"> <template v-for="val in chils">
<el-submenu :index="val.path" :key="val.path" v-if="val.children && val.children.length > 0"> <el-sub-menu :index="val.path" :key="val.path" v-if="val.children && val.children.length > 0">
<template #title> <template #title>
<i :class="val.meta.icon"></i> <i :class="val.meta.icon"></i>
<span>{{ $t(val.meta.title) }}</span> <span>{{ $t(val.meta.title) }}</span>
</template> </template>
<sub-item :chil="val.children" /> <sub-item :chil="val.children" />
</el-submenu> </el-sub-menu>
<el-menu-item :index="val.path" :key="val.path" v-else> <el-menu-item :index="val.path" :key="val.path" v-else>
<template v-if="!val.meta.isLink || (val.meta.isLink && val.meta.isIframe)"> <template v-if="!val.meta.isLink || (val.meta.isLink && val.meta.isIframe)">
<i :class="val.meta.icon ? val.meta.icon : ''"></i> <i :class="val.meta.icon ? val.meta.icon : ''"></i>

View File

@ -8,13 +8,13 @@
:collapse-transition="false" :collapse-transition="false"
> >
<template v-for="val in menuLists"> <template v-for="val in menuLists">
<el-submenu :index="val.path" v-if="val.children && val.children.length > 0" :key="val.path"> <el-sub-menu :index="val.path" v-if="val.children && val.children.length > 0" :key="val.path">
<template #title> <template #title>
<i :class="val.meta.icon ? val.meta.icon : ''"></i> <i :class="val.meta.icon ? val.meta.icon : ''"></i>
<span>{{ $t(val.meta.title) }}</span> <span>{{ $t(val.meta.title) }}</span>
</template> </template>
<SubItem :chil="val.children" /> <SubItem :chil="val.children" />
</el-submenu> </el-sub-menu>
<el-menu-item :index="val.path" :key="val.path" v-else> <el-menu-item :index="val.path" :key="val.path" v-else>
<i :class="val.meta.icon ? val.meta.icon : ''"></i> <i :class="val.meta.icon ? val.meta.icon : ''"></i>
<template #title v-if="!val.meta.isLink || (val.meta.isLink && val.meta.isIframe)"> <template #title v-if="!val.meta.isLink || (val.meta.isLink && val.meta.isIframe)">

View File

@ -7,7 +7,7 @@ import { i18n } from '/@/i18n/index';
import { globalComponentSize } from '/@/utils/componentSize'; import { globalComponentSize } from '/@/utils/componentSize';
import ElementPlus from 'element-plus'; import ElementPlus from 'element-plus';
import 'element-plus/lib/theme-chalk/index.css'; import 'element-plus/dist/index.css';
import '/@/theme/index.scss'; import '/@/theme/index.scss';
import mitt from 'mitt'; import mitt from 'mitt';
import screenShort from 'vue-web-screen-shot'; import screenShort from 'vue-web-screen-shot';

View File

@ -84,11 +84,11 @@ body,
top: 0; top: 0;
left: -220px; left: -220px;
width: 220px; width: 220px;
z-index: 1; z-index: 9999999;
} }
.layout-aside-mobile-close { .layout-aside-mobile-close {
left: -220px; left: -220px;
transition: all 0.3s cubic-bezier(0.71, -0.01, 0.18, 0.95); transition: all 0.3s cubic-bezier(1, -0.04, 0, 1.32);
} }
.layout-aside-mobile-open { .layout-aside-mobile-open {
left: 0; left: 0;
@ -102,6 +102,7 @@ body,
left: 0; left: 0;
height: 100%; height: 100%;
background-color: rgba(0, 0, 0, 0.5); background-color: rgba(0, 0, 0, 0.5);
z-index: 9999998;
} }
.layout-scrollbar { .layout-scrollbar {
@extend .el-scrollbar; @extend .el-scrollbar;

View File

@ -754,7 +754,7 @@
width: 64px !important; width: 64px !important;
} }
.el-menu-item, .el-menu-item,
.el-submenu__title { .el-sub-menu__title {
height: 50px !important; height: 50px !important;
line-height: 50px !important; line-height: 50px !important;
color: var(--bg-menuBarColor); color: var(--bg-menuBarColor);
@ -762,31 +762,31 @@
} }
// horizontal 水平方向时 // horizontal 水平方向时
.el-menu--horizontal > .el-menu-item.is-active, .el-menu--horizontal > .el-menu-item.is-active,
.el-menu--horizontal > .el-submenu.is-active .el-submenu__title { .el-menu--horizontal > .el-sub-menu.is-active .el-sub-menu__title {
border-bottom: 3px solid !important; border-bottom: 3px solid !important;
border-bottom-color: set-color(primary); border-bottom-color: set-color(primary);
color: set-color(primary) !important; color: set-color(primary) !important;
} }
.el-menu--horizontal .el-menu-item:not(.is-disabled):focus, .el-menu--horizontal .el-menu-item:not(.is-disabled):focus,
.el-menu--horizontal .el-menu-item:not(.is-disabled):hover, .el-menu--horizontal .el-menu-item:not(.is-disabled):hover,
.el-menu--horizontal > .el-submenu:focus .el-submenu__title, .el-menu--horizontal > .el-sub-menu:focus .el-sub-menu__title,
.el-menu--horizontal > .el-submenu:hover .el-submenu__title, .el-menu--horizontal > .el-sub-menu:hover .el-sub-menu__title,
.el-menu--horizontal .el-menu .el-menu-item.is-active, .el-menu--horizontal .el-menu .el-menu-item.is-active,
.el-menu--horizontal .el-menu .el-submenu.is-active > .el-submenu__title { .el-menu--horizontal .el-menu .el-sub-menu.is-active > .el-sub-menu__title {
color: set-color(primary) !important; color: set-color(primary) !important;
} }
.el-menu.el-menu--horizontal { .el-menu.el-menu--horizontal {
border-bottom: none !important; border-bottom: none !important;
} }
.el-menu--horizontal > .el-menu-item, .el-menu--horizontal > .el-menu-item,
.el-menu--horizontal > .el-submenu .el-submenu__title { .el-menu--horizontal > .el-sub-menu .el-sub-menu__title {
color: var(--bg-topBarColor); color: var(--bg-topBarColor);
} }
// 外部链接时 // 外部链接时
.el-menu-item a, .el-menu-item a,
.el-menu-item a:hover, .el-menu-item a:hover,
.el-menu-item i, .el-menu-item i,
.el-submenu__title i { .el-sub-menu__title i {
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
} }
@ -796,7 +796,7 @@
} }
// 默认 hover // 默认 hover
.el-menu-item:hover, .el-menu-item:hover,
.el-submenu__title:hover { .el-sub-menu__title:hover {
color: set-color(primary) !important; color: set-color(primary) !important;
background-color: transparent !important; background-color: transparent !important;
i { i {
@ -805,7 +805,7 @@
} }
// 高亮时/菜单收起时 // 高亮时/菜单收起时
.el-menu-item.is-active, .el-menu-item.is-active,
.el-menu--collapse .el-submenu.is-active i { .el-menu--collapse .el-sub-menu.is-active i {
color: set-color(primary); color: set-color(primary);
} }
.el-active-extend { .el-active-extend {
@ -834,22 +834,22 @@
.el-menu--horizontal { .el-menu--horizontal {
background: var(--bg-topBar); background: var(--bg-topBar);
.el-menu-item, .el-menu-item,
.el-submenu__title { .el-sub-menu__title {
color: var(--bg-topBarColor); color: var(--bg-topBarColor);
} }
} }
} }
// 第三方图标字体间距/大小设置 // 第三方图标字体间距/大小设置
.el-menu-item .iconfont, .el-menu-item .iconfont,
.el-submenu .iconfont { .el-sub-menu .iconfont {
@include generalIcon; @include generalIcon;
} }
.el-menu-item .fa, .el-menu-item .fa,
.el-submenu .fa { .el-sub-menu .fa {
@include generalIcon; @include generalIcon;
} }
// element plus 本身字体图标 // element plus 本身字体图标
.el-submenu [class^='el-icon-'] { .el-sub-menu [class^='el-icon-'] {
font-size: 14px !important; font-size: 14px !important;
} }
// 去掉离开浏览器时菜单的默认高亮 // 去掉离开浏览器时菜单的默认高亮