'admin-21.07.16:发布v1.0.12版本,具体更新内容查看CHANGELOG.md'

This commit is contained in:
lyt 2021-07-16 12:46:26 +08:00
parent 804213a646
commit 7138d5a24d
15 changed files with 140 additions and 23 deletions

View File

@ -2,4 +2,4 @@
ENV = 'production' ENV = 'production'
# 线上环境接口地址 # 线上环境接口地址
VITE_API_URL = 'https://gitee.com/gitee.io' VITE_API_URL = 'https://lyt-top.gitee.io/vue-next-admin-preview/'

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.12
`2021.07.16`
- 🌟 更新 依赖更新最新版本
- 🎉 新增 数据可视化演示空界面(待完善)
- 🎯 优化 tagsView 动态路由xxx/:id/:name时的右键菜单刷新、关闭其它时参数丢失问题2021.07.15 优化)
- 🐞 修复 路由带参数时,复制路径到登录页,跳转后参数消失的问题
- 🐞 修复 设置多个外链,点击后,页面内容停留在上一个内容(内容未改变)、国际化处理、打开新窗口 sessionStorage 共享等
## 1.0.11 ## 1.0.11
`2021.07.14` `2021.07.14`

View File

@ -1,6 +1,6 @@
{ {
"name": "vue-next-admin", "name": "vue-next-admin",
"version": "1.0.11", "version": "1.0.12",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",
@ -23,7 +23,7 @@
"vue": "^3.0.11", "vue": "^3.0.11",
"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.4", "vue-i18n": "^9.1.7",
"vue-router": "^4.0.8", "vue-router": "^4.0.8",
"vue-web-screen-shot": "^1.2.0", "vue-web-screen-shot": "^1.2.0",
"vuex": "^4.0.1", "vuex": "^4.0.1",
@ -32,7 +32,7 @@
"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.3.1", "@types/node": "^16.3.2",
"@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.28.3", "@typescript-eslint/eslint-plugin": "^4.28.3",

View File

@ -58,11 +58,19 @@ export default {
paramsCommonDetails: 'General routing details', paramsCommonDetails: 'General routing details',
paramsDynamicDetails: 'Dynamic routing details', paramsDynamicDetails: 'Dynamic routing details',
chartIndex: 'chartIndex', chartIndex: 'chartIndex',
visualizingIndex: 'visualizingIndex',
visualizingLinkDemo1: 'visualizingLinkDemo1',
visualizingLinkDemo2: 'visualizingLinkDemo2',
personal: 'personal', personal: 'personal',
tools: 'tools', tools: 'tools',
layoutLinkView: 'LinkView', layoutLinkView: 'LinkView',
layoutIfameView: 'IfameView', layoutIfameView: 'IfameView',
}, },
staticRoutes: {
signIn: 'signIn',
notFound: 'notFound',
noPower: 'noPower',
},
user: { user: {
title0: 'Component size', title0: 'Component size',
title1: 'Language switching', title1: 'Language switching',

View File

@ -58,11 +58,19 @@ export default {
paramsCommonDetails: '普通路由详情', paramsCommonDetails: '普通路由详情',
paramsDynamicDetails: '动态路由详情', paramsDynamicDetails: '动态路由详情',
chartIndex: '大数据图表', chartIndex: '大数据图表',
visualizingIndex: '数据可视化',
visualizingLinkDemo1: '数据可视化演示1',
visualizingLinkDemo2: '数据可视化演示2',
personal: '个人中心', personal: '个人中心',
tools: '工具类集合', tools: '工具类集合',
layoutLinkView: '外链', layoutLinkView: '外链',
layoutIfameView: '内嵌 iframe', layoutIfameView: '内嵌 iframe',
}, },
staticRoutes: {
signIn: '登录',
notFound: '找不到此页面',
noPower: '没有权限',
},
user: { user: {
title0: '组件大小', title0: '组件大小',
title1: '语言切换', title1: '语言切换',

View File

@ -58,11 +58,19 @@ export default {
paramsCommonDetails: '普通路由詳情', paramsCommonDetails: '普通路由詳情',
paramsDynamicDetails: '動態路由詳情', paramsDynamicDetails: '動態路由詳情',
chartIndex: '大資料圖表', chartIndex: '大資料圖表',
visualizingIndex: '數據視覺化',
visualizingLinkDemo1: '數據視覺化演示1',
visualizingLinkDemo2: '數據視覺化演示2',
personal: '個人中心', personal: '個人中心',
tools: '工具類集合', tools: '工具類集合',
layoutLinkView: '外鏈', layoutLinkView: '外鏈',
layoutIfameView: '内嵌 iframe', layoutIfameView: '内嵌 iframe',
}, },
staticRoutes: {
signIn: '登入',
notFound: '找不到此頁面',
noPower: '沒有許可權',
},
user: { user: {
title0: '組件大小', title0: '組件大小',
title1: '語言切換', title1: '語言切換',

View File

@ -16,7 +16,7 @@
{{ $t(val.meta.title) }} {{ $t(val.meta.title) }}
</template> </template>
<template #title v-else> <template #title v-else>
<a :href="val.meta.isLink" target="_blank"> <a :href="val.meta.isLink" target="_blank" rel="opener">
<i :class="val.meta.icon ? val.meta.icon : ''"></i> <i :class="val.meta.icon ? val.meta.icon : ''"></i>
{{ $t(val.meta.title) }} {{ $t(val.meta.title) }}
</a> </a>

View File

@ -13,7 +13,7 @@
<span>{{ $t(val.meta.title) }}</span> <span>{{ $t(val.meta.title) }}</span>
</template> </template>
<template v-else> <template v-else>
<a :href="val.meta.isLink" target="_blank"> <a :href="val.meta.isLink" target="_blank" rel="opener">
<i :class="val.meta.icon ? val.meta.icon : ''"></i> <i :class="val.meta.icon ? val.meta.icon : ''"></i>
{{ $t(val.meta.title) }} {{ $t(val.meta.title) }}
</a> </a>

View File

@ -21,7 +21,7 @@
<span>{{ $t(val.meta.title) }}</span> <span>{{ $t(val.meta.title) }}</span>
</template> </template>
<template #title v-else> <template #title v-else>
<a :href="val.meta.isLink" target="_blank">{{ $t(val.meta.title) }}</a></template <a :href="val.meta.isLink" target="_blank" rel="opener">{{ $t(val.meta.title) }}</a></template
> >
</el-menu-item> </el-menu-item>
</template> </template>

View File

@ -1,13 +1,13 @@
<template> <template>
<div class="layout-view-bg-white flex layout-view-link" :style="{ height: `calc(100vh - ${setLinkHeight}` }"> <div class="layout-view-bg-white flex layout-view-link" :style="{ height: `calc(100vh - ${setLinkHeight}` }">
<a href="https://element-plus.gitee.io/#/zh-CN/component/installation" target="_blank" class="flex-margin" <a :href="currentRouteMeta.isLink" target="_blank" rel="opener" class="flex-margin"
>{{ currentRouteMeta.title }}{{ currentRouteMeta.isLink }}</a >{{ $t(currentRouteMeta.title) }}{{ currentRouteMeta.isLink }}</a
> >
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, toRefs, reactive, onMounted, computed } from 'vue'; import { defineComponent, toRefs, reactive, computed, watch } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import { useStore } from '/@/store/index'; import { useStore } from '/@/store/index';
export default defineComponent({ export default defineComponent({
@ -18,20 +18,22 @@ export default defineComponent({
const state = reactive({ const state = reactive({
currentRouteMeta: {}, currentRouteMeta: {},
}); });
// meta
const initGetMeta = () => {
state.currentRouteMeta = route.meta;
};
// link // link
const setLinkHeight = computed(() => { const setLinkHeight = computed(() => {
let { isTagsview } = store.state.themeConfig.themeConfig; let { isTagsview } = store.state.themeConfig.themeConfig;
if (isTagsview) return `114px`; if (isTagsview) return `114px`;
else return `80px`; else return `80px`;
}); });
// //
onMounted(() => { watch(
initGetMeta(); () => route.path,
}); () => {
state.currentRouteMeta = route.meta;
},
{
immediate: true,
}
);
return { return {
setLinkHeight, setLinkHeight,
...toRefs(state), ...toRefs(state),

View File

@ -198,7 +198,7 @@ router.beforeEach(async (to, from, next) => {
NProgress.done(); NProgress.done();
} else { } else {
if (!token) { if (!token) {
next(`/login?redirect=${to.path}`); next(`/login?redirect=${to.path}&params=${JSON.stringify(to.query ? to.query : to.params)}`);
Session.clear(); Session.clear();
resetRoute(); resetRoute();
NProgress.done(); NProgress.done();

View File

@ -895,6 +895,54 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
}, },
], ],
}, },
{
path: '/visualizing',
name: 'visualizingIndex',
component: () => import('/@/layout/routerView/parent.vue'),
redirect: '/visualizingLinkDemo1',
meta: {
title: 'message.router.visualizingIndex',
isLink: '',
isHide: false,
isKeepAlive: true,
isAffix: false,
isIframe: false,
auth: ['admin'],
icon: 'el-icon-data-line',
},
children: [
{
path: '/visualizing/visualizingLinkDemo1',
name: 'visualizingLinkDemo1',
component: () => import('/@/layout/routerView/link.vue'),
meta: {
title: 'message.router.visualizingLinkDemo1',
isLink: `${import.meta.env.VITE_API_URL}/#/visualizingDemo1`,
isHide: false,
isKeepAlive: false,
isAffix: false,
isIframe: false,
auth: ['admin'],
icon: 'iconfont icon-caozuo-wailian',
},
},
{
path: '/visualizing/visualizingLinkDemo2',
name: 'visualizingLinkDemo2',
component: () => import('/@/layout/routerView/link.vue'),
meta: {
title: 'message.router.visualizingLinkDemo2',
isLink: `${import.meta.env.VITE_API_URL}/#/visualizingDemo2`,
isHide: false,
isKeepAlive: false,
isAffix: false,
isIframe: false,
auth: ['admin'],
icon: 'iconfont icon-caozuo-wailian',
},
},
],
},
{ {
path: '/chart', path: '/chart',
name: 'chartIndex', name: 'chartIndex',
@ -985,7 +1033,7 @@ export const staticRoutes: Array<RouteRecordRaw> = [
name: 'login', name: 'login',
component: () => import('/@/views/login/index.vue'), component: () => import('/@/views/login/index.vue'),
meta: { meta: {
title: '登', title: '登',
}, },
}, },
{ {
@ -993,7 +1041,7 @@ export const staticRoutes: Array<RouteRecordRaw> = [
name: 'notFound', name: 'notFound',
component: () => import('/@/views/error/404.vue'), component: () => import('/@/views/error/404.vue'),
meta: { meta: {
title: '找不到此页面', title: 'message.staticRoutes.notFound',
}, },
}, },
{ {
@ -1001,7 +1049,27 @@ export const staticRoutes: Array<RouteRecordRaw> = [
name: 'noPower', name: 'noPower',
component: () => import('/@/views/error/401.vue'), component: () => import('/@/views/error/401.vue'),
meta: { meta: {
title: '没有权限', title: 'message.staticRoutes.noPower',
},
},
/**
*
* `dynamicRoutes`
*/
{
path: '/visualizingDemo1',
name: 'visualizingDemo1',
component: () => import('/@/views/visualizing/demo1.vue'),
meta: {
title: 'message.router.visualizingLinkDemo1',
},
},
{
path: '/visualizingDemo2',
name: 'visualizingDemo2',
component: () => import('/@/views/visualizing/demo2.vue'),
meta: {
title: 'message.router.visualizingLinkDemo2',
}, },
}, },
]; ];

View File

@ -147,7 +147,14 @@ export default defineComponent({
// //
// router No match found for location with path "/" // router No match found for location with path "/"
// / // /
route.query?.redirect ? router.push(route.query.redirect) : router.push('/'); if (route.query?.redirect) {
router.push({
path: route.query?.redirect,
query: Object.keys(route.query?.params).length > 0 ? JSON.parse(route.query?.params) : '',
});
} else {
router.push('/');
}
// //
setTimeout(() => { setTimeout(() => {
// loading // loading

View File

@ -0,0 +1,3 @@
<template>
<div>数据可视化演示1</div>
</template>

View File

@ -0,0 +1,3 @@
<template>
<div>数据可视化演示2</div>
</template>