Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Bug 终结者
vue-vben-admin
提交
7653610c
V
vue-vben-admin
项目概览
Bug 终结者
/
vue-vben-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-vben-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7653610c
编写于
10月 08, 2020
作者:
陈
陈文彬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: fix the problem of page blank caused by page refresh
上级
e4c952f3
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
35 addition
and
54 deletion
+35
-54
src/layouts/default/LayoutContent.tsx
src/layouts/default/LayoutContent.tsx
+1
-7
src/layouts/page/index.tsx
src/layouts/page/index.tsx
+31
-25
src/router/routes/modules/demo/iframe.ts
src/router/routes/modules/demo/iframe.ts
+2
-0
yarn.lock
yarn.lock
+1
-22
未找到文件。
src/layouts/default/LayoutContent.tsx
浏览文件 @
7653610c
...
...
@@ -6,23 +6,17 @@ import { ContentEnum } from '/@/enums/appEnum';
import
{
appStore
}
from
'
/@/store/modules/app
'
;
// import { RouterView } from 'vue-router';
import
PageLayout
from
'
/@/layouts/page/index
'
;
import
FrameLayout
from
'
/@/layouts/iframe/index.vue
'
;
import
{
useSetting
}
from
'
/@/hooks/core/useSetting
'
;
export
default
defineComponent
({
name
:
'
DefaultLayoutContent
'
,
setup
()
{
const
{
projectSetting
}
=
useSetting
();
return
()
=>
{
const
{
getProjectConfig
}
=
appStore
;
const
{
contentMode
}
=
getProjectConfig
;
const
wrapClass
=
contentMode
===
ContentEnum
.
FULL
?
'
full
'
:
'
fixed
'
;
return
(
<
Layout
.
Content
class
=
{
`layout-content
${
wrapClass
}
`
}
>
{
{
default
:
()
=>
[<
PageLayout
/>,
projectSetting
.
canEmbedIFramePage
&&
<
FrameLayout
/>]
,
default
:
()
=>
<
PageLayout
/>
,
}
}
</
Layout
.
Content
>
);
...
...
src/layouts/page/index.tsx
浏览文件 @
7653610c
...
...
@@ -6,7 +6,9 @@ import { useTransition } from './useTransition';
import
{
RouterView
,
RouteLocation
}
from
'
vue-router
'
;
import
{
tabStore
}
from
'
/@/store/modules/tab
'
;
import
FrameLayout
from
'
/@/layouts/iframe/index.vue
'
;
import
{
useSetting
}
from
'
/@/hooks/core/useSetting
'
;
// import { useRouter } from 'vue-router';
export
default
defineComponent
({
name
:
'
PageLayout
'
,
...
...
@@ -22,6 +24,7 @@ export default defineComponent({
const
{
on
:
transitionOn
}
=
useTransition
();
on
=
transitionOn
;
}
const
{
projectSetting
}
=
useSetting
();
return
()
=>
{
const
{
routerTransition
,
...
...
@@ -32,32 +35,35 @@ export default defineComponent({
const
openCache
=
openKeepAlive
&&
show
;
const
cacheTabs
=
toRaw
(
tabStore
.
getKeepAliveTabsState
)
as
string
[];
return
[
<
RouterView
>
{
{
default
:
({
Component
,
route
}:
{
Component
:
any
;
route
:
RouteLocation
})
=>
{
const
Content
=
openCache
?
(
<
KeepAlive
max
=
{
max
}
include
=
{
cacheTabs
}
>
return
(
<
div
>
<
RouterView
>
{
{
default
:
({
Component
,
route
}:
{
Component
:
any
;
route
:
RouteLocation
})
=>
{
const
Content
=
openCache
?
(
<
KeepAlive
max
=
{
max
}
include
=
{
cacheTabs
}
>
<
Component
{
...
route
.
params
}
/>
</
KeepAlive
>
)
:
(
<
Component
{
...
route
.
params
}
/>
</
KeepAlive
>
)
:
(
<
Component
{
...
route
.
params
}
/>
);
return
openRouterTransition
?
(
<
Transition
{
...
on
}
name
=
{
route
.
meta
.
transitionName
||
routerTransition
}
mode
=
"out-in"
>
{
()
=>
Content
}
</
Transition
>
)
:
(
Content
);
},
}
}
</
RouterView
>,
];
);
return
openRouterTransition
?
(
<
Transition
{
...
on
}
name
=
{
route
.
meta
.
transitionName
||
routerTransition
}
mode
=
"out-in"
>
{
()
=>
Content
}
</
Transition
>
)
:
(
Content
);
},
}
}
</
RouterView
>
{
projectSetting
.
canEmbedIFramePage
&&
<
FrameLayout
/>
}
</
div
>
);
};
},
});
src/router/routes/modules/demo/iframe.ts
浏览文件 @
7653610c
...
...
@@ -23,6 +23,7 @@ export default {
meta
:
{
frameSrc
:
'
https://2x.antdv.com/docs/vue/introduce-cn/
'
,
title
:
'
antVue文档(内嵌)
'
,
afterCloseLoading
:
true
,
},
},
{
...
...
@@ -32,6 +33,7 @@ export default {
meta
:
{
frameSrc
:
'
https://vvbin.cn/docs/
'
,
title
:
'
项目文档(内嵌)
'
,
afterCloseLoading
:
true
,
},
},
{
...
...
yarn.lock
浏览文件 @
7653610c
...
...
@@ -1601,7 +1601,7 @@ cli-cursor@^3.1.0:
dependencies:
restore-cursor "^3.1.0"
cli-spinners@^2.2.0
, cli-spinners@^2.4.0
:
cli-spinners@^2.2.0:
version "2.4.0"
resolved "https://registry.npm.taobao.org/cli-spinners/download/cli-spinners-2.4.0.tgz?cache=0&sync_timestamp=1595080377121&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcli-spinners%2Fdownload%2Fcli-spinners-2.4.0.tgz#c6256db216b878cfba4720e719cec7cf72685d7f"
integrity sha1-xiVtsha4eM+6RyDnGc7Hz3JoXX8=
...
...
@@ -4821,20 +4821,6 @@ ora@^4.0.4:
strip-ansi "^6.0.0"
wcwidth "^1.0.1"
ora@^5.1.0:
version "5.1.0"
resolved "https://registry.npm.taobao.org/ora/download/ora-5.1.0.tgz?cache=0&sync_timestamp=1599424857800&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fora%2Fdownload%2Fora-5.1.0.tgz#b188cf8cd2d4d9b13fd25383bc3e5cba352c94f8"
integrity sha1-sYjPjNLU2bE/0lODvD5cujUslPg=
dependencies:
chalk "^4.1.0"
cli-cursor "^3.1.0"
cli-spinners "^2.4.0"
is-interactive "^1.0.0"
log-symbols "^4.0.0"
mute-stream "0.0.8"
strip-ansi "^6.0.0"
wcwidth "^1.0.1"
os-tmpdir@~1.0.2:
version "1.0.2"
resolved "https://registry.npm.taobao.org/os-tmpdir/download/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
...
...
@@ -6935,13 +6921,6 @@ vfile@^4.0.0:
unist-util-stringify-position "^2.0.0"
vfile-message "^2.0.0"
vite-jsx@^1.0.5:
version "1.0.6"
resolved "https://registry.npm.taobao.org/vite-jsx/download/vite-jsx-1.0.6.tgz#5c33b9da6a6562d041418005370a7e3043b0e70c"
integrity sha1-XDO52mplYtBBQYAFNwp+MEOw5ww=
dependencies:
magic-string "^0.25.7"
vite-plugin-mock@^1.0.2:
version "1.0.2"
resolved "https://registry.npm.taobao.org/vite-plugin-mock/download/vite-plugin-mock-1.0.2.tgz#07bdd67a8006fd60a6a83198479f3c0c57c7df53"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录