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

View File

@ -1,6 +1,6 @@
{
"name": "vue-next-admin",
"version": "1.0.11",
"version": "1.0.12",
"scripts": {
"dev": "vite",
"build": "vite build",
@ -23,7 +23,7 @@
"vue": "^3.0.11",
"vue-clipboard3": "^1.0.1",
"vue-grid-layout": "^3.0.0-beta1",
"vue-i18n": "^9.1.4",
"vue-i18n": "^9.1.7",
"vue-router": "^4.0.8",
"vue-web-screen-shot": "^1.2.0",
"vuex": "^4.0.1",
@ -32,7 +32,7 @@
"devDependencies": {
"@types/axios": "^0.14.0",
"@types/clipboard": "^2.0.1",
"@types/node": "^16.3.1",
"@types/node": "^16.3.2",
"@types/nprogress": "^0.2.0",
"@types/sortablejs": "^1.10.7",
"@typescript-eslint/eslint-plugin": "^4.28.3",

View File

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

View File

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

View File

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

View File

@ -16,7 +16,7 @@
{{ $t(val.meta.title) }}
</template>
<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>
{{ $t(val.meta.title) }}
</a>

View File

@ -13,7 +13,7 @@
<span>{{ $t(val.meta.title) }}</span>
</template>
<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>
{{ $t(val.meta.title) }}
</a>

View File

@ -21,7 +21,7 @@
<span>{{ $t(val.meta.title) }}</span>
</template>
<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>
</template>

View File

@ -1,13 +1,13 @@
<template>
<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"
>{{ currentRouteMeta.title }}{{ currentRouteMeta.isLink }}</a
<a :href="currentRouteMeta.isLink" target="_blank" rel="opener" class="flex-margin"
>{{ $t(currentRouteMeta.title) }}{{ currentRouteMeta.isLink }}</a
>
</div>
</template>
<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 { useStore } from '/@/store/index';
export default defineComponent({
@ -18,20 +18,22 @@ export default defineComponent({
const state = reactive({
currentRouteMeta: {},
});
// meta
const initGetMeta = () => {
state.currentRouteMeta = route.meta;
};
// link
const setLinkHeight = computed(() => {
let { isTagsview } = store.state.themeConfig.themeConfig;
if (isTagsview) return `114px`;
else return `80px`;
});
//
onMounted(() => {
initGetMeta();
});
//
watch(
() => route.path,
() => {
state.currentRouteMeta = route.meta;
},
{
immediate: true,
}
);
return {
setLinkHeight,
...toRefs(state),

View File

@ -198,7 +198,7 @@ router.beforeEach(async (to, from, next) => {
NProgress.done();
} else {
if (!token) {
next(`/login?redirect=${to.path}`);
next(`/login?redirect=${to.path}&params=${JSON.stringify(to.query ? to.query : to.params)}`);
Session.clear();
resetRoute();
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',
name: 'chartIndex',
@ -985,7 +1033,7 @@ export const staticRoutes: Array<RouteRecordRaw> = [
name: 'login',
component: () => import('/@/views/login/index.vue'),
meta: {
title: '登',
title: '登',
},
},
{
@ -993,7 +1041,7 @@ export const staticRoutes: Array<RouteRecordRaw> = [
name: 'notFound',
component: () => import('/@/views/error/404.vue'),
meta: {
title: '找不到此页面',
title: 'message.staticRoutes.notFound',
},
},
{
@ -1001,7 +1049,27 @@ export const staticRoutes: Array<RouteRecordRaw> = [
name: 'noPower',
component: () => import('/@/views/error/401.vue'),
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 "/"
// /
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(() => {
// loading

View File

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

View File

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