mirror of
https://gitee.com/log4j/pig-ui.git
synced 2024-12-22 21:22:33 +08:00
'admin-21.07.16:发布v1.0.12版本,具体更新内容查看CHANGELOG.md'
This commit is contained in:
parent
804213a646
commit
7138d5a24d
@ -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/'
|
10
CHANGELOG.md
10
CHANGELOG.md
@ -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`
|
||||
|
@ -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",
|
||||
|
@ -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',
|
||||
|
@ -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: '语言切换',
|
||||
|
@ -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: '語言切換',
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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),
|
||||
|
@ -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}¶ms=${JSON.stringify(to.query ? to.query : to.params)}`);
|
||||
Session.clear();
|
||||
resetRoute();
|
||||
NProgress.done();
|
||||
|
@ -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',
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@ -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
|
||||
|
3
src/views/visualizing/demo1.vue
Normal file
3
src/views/visualizing/demo1.vue
Normal file
@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<div>数据可视化演示1</div>
|
||||
</template>
|
3
src/views/visualizing/demo2.vue
Normal file
3
src/views/visualizing/demo2.vue
Normal file
@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<div>数据可视化演示2</div>
|
||||
</template>
|
Loading…
Reference in New Issue
Block a user