'admin-21.06.22:修复内嵌iframe不可使用的问题'
This commit is contained in:
parent
20e8cad9c7
commit
8ab22b0a02
@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
🎉🎉🔥 `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.5
|
||||||
|
|
||||||
|
`2021.06.22`
|
||||||
|
|
||||||
|
- 🌟 更新 vite 降级为@vite2.3.7,降级方法 `cnpm install @vite2.3.7 --save-dev`,防止 element plus 字体图标消失
|
||||||
|
- 🐞 修复 开启后端控制路由(isRequestRoutes = true)时,内嵌 iframe、外链不可使用的问题
|
||||||
|
|
||||||
## 1.0.4
|
## 1.0.4
|
||||||
|
|
||||||
`2021.06.19`
|
`2021.06.19`
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-next-admin",
|
"name": "vue-next-admin",
|
||||||
"version": "1.0.4",
|
"version": "1.0.5",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
@ -46,7 +46,7 @@
|
|||||||
"sass": "^1.35.1",
|
"sass": "^1.35.1",
|
||||||
"sass-loader": "^12.1.0",
|
"sass-loader": "^12.1.0",
|
||||||
"typescript": "^4.3.4",
|
"typescript": "^4.3.4",
|
||||||
"vite": "^2.3.7",
|
"vite": "^2.3.8",
|
||||||
"vue-eslint-parser": "^7.6.0"
|
"vue-eslint-parser": "^7.6.0"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
|
@ -5,12 +5,14 @@ import { setAddRoute, setFilterMenuAndCacheTagsViewRoutes } from '/@/router/inde
|
|||||||
import { dynamicRoutes } from '/@/router/route';
|
import { dynamicRoutes } from '/@/router/route';
|
||||||
import { getMenuAdmin, getMenuTest } from '/@/api/menu/index';
|
import { getMenuAdmin, getMenuTest } from '/@/api/menu/index';
|
||||||
|
|
||||||
|
const layouModules: any = import.meta.glob('../layout/routerView/*.{vue,tsx}');
|
||||||
|
const viewsModules: any = import.meta.glob('../views/**/*.{vue,tsx}');
|
||||||
/**
|
/**
|
||||||
* 获取目录下的 .vue、.tsx 全部文件
|
* 获取目录下的 .vue、.tsx 全部文件
|
||||||
* @method import.meta.glob
|
* @method import.meta.glob
|
||||||
* @link 参考:https://cn.vitejs.dev/guide/features.html#json
|
* @link 参考:https://cn.vitejs.dev/guide/features.html#json
|
||||||
*/
|
*/
|
||||||
const dynamicViewsModules: Record<string, Function> = import.meta.glob('../views/**/*.{vue,tsx}');
|
const dynamicViewsModules: Record<string, Function> = Object.assign({}, { ...layouModules }, { ...viewsModules });
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 后端控制路由:初始化方法,防止刷新时路由丢失
|
* 后端控制路由:初始化方法,防止刷新时路由丢失
|
||||||
@ -85,7 +87,7 @@ export function backEndComponent(routes: any) {
|
|||||||
export function dynamicImport(dynamicViewsModules: Record<string, Function>, component: string) {
|
export function dynamicImport(dynamicViewsModules: Record<string, Function>, component: string) {
|
||||||
const keys = Object.keys(dynamicViewsModules);
|
const keys = Object.keys(dynamicViewsModules);
|
||||||
const matchKeys = keys.filter((key) => {
|
const matchKeys = keys.filter((key) => {
|
||||||
const k = key.replace('../views', '');
|
const k = key.replace(/..\/views|../, '');
|
||||||
return k.startsWith(`${component}`) || k.startsWith(`/${component}`);
|
return k.startsWith(`${component}`) || k.startsWith(`/${component}`);
|
||||||
});
|
});
|
||||||
if (matchKeys?.length === 1) {
|
if (matchKeys?.length === 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user