'admin-21.06.22:修复内嵌iframe不可使用的问题'

This commit is contained in:
lyt-Top 2021-06-22 22:03:59 +08:00
parent 20e8cad9c7
commit 8ab22b0a02
3 changed files with 13 additions and 4 deletions

View File

@ -2,6 +2,13 @@
🎉🎉🔥 `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
`2021.06.19`

View File

@ -1,6 +1,6 @@
{
"name": "vue-next-admin",
"version": "1.0.4",
"version": "1.0.5",
"scripts": {
"dev": "vite",
"build": "vite build",
@ -46,7 +46,7 @@
"sass": "^1.35.1",
"sass-loader": "^12.1.0",
"typescript": "^4.3.4",
"vite": "^2.3.7",
"vite": "^2.3.8",
"vue-eslint-parser": "^7.6.0"
},
"browserslist": [

View File

@ -5,12 +5,14 @@ import { setAddRoute, setFilterMenuAndCacheTagsViewRoutes } from '/@/router/inde
import { dynamicRoutes } from '/@/router/route';
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
* @method import.meta.glob
* @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) {
const keys = Object.keys(dynamicViewsModules);
const matchKeys = keys.filter((key) => {
const k = key.replace('../views', '');
const k = key.replace(/..\/views|../, '');
return k.startsWith(`${component}`) || k.startsWith(`/${component}`);
});
if (matchKeys?.length === 1) {