Skip to content

Commit f8a94c8

Browse files
committed
fix: 修复 tag 页面缓存不生效;去除页面切换动画;
1 parent 86f5e20 commit f8a94c8

File tree

6 files changed

+28
-37
lines changed

6 files changed

+28
-37
lines changed

packages/devops-admin/src/layout/components/AppMain.vue

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<template>
22
<section class="app-main">
3-
<transition name="fade-transform" mode="out-in">
4-
<!-- <keep-alive> -->
3+
<!-- <transition name="fade-transform" mode="out-in"> -->
4+
<!-- <keep-alive> -->
55

6-
<keep-alive :include="cachedViews">
7-
<router-view :key="key" />
8-
</keep-alive>
9-
</transition>
6+
<keep-alive :include="cachedViews">
7+
<router-view :key="key" />
8+
</keep-alive>
9+
<!-- </transition> -->
1010
</section>
1111
</template>
1212

@@ -40,11 +40,11 @@ export default {
4040
.hasTagsView {
4141
.app-main {
4242
/* 84 = navbar + tags-view = 50 + 34 */
43-
min-height: calc(100vh - 84px);
43+
min-height: calc(100vh - 54px);
4444
}
4545
4646
.fixed-header+.app-main {
47-
padding-top: 84px;
47+
padding-top: 54px;
4848
}
4949
}
5050
</style>

packages/devops-admin/src/router/async.js

+12-22
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,27 @@ export const asyncRoutes = [
1010
component: Layout,
1111
redirect: '/development/functions',
1212
meta: {
13-
title: '开发控制台', icon: 'guide', noCache: true
13+
title: '开发控制台', icon: 'guide'
1414
},
1515
children: [
1616
{
1717
path: 'functions',
1818
component: () => import('@/views/development/functions'),
19-
name: 'FunctionManagement',
19+
name: 'FunctionListPage',
2020
meta: {
2121
title: '云函数',
2222
icon: 'bug',
23-
noCache: true,
2423
permissions: ['function.read']
2524
}
2625
},
2726
{
2827
path: 'functions/:id',
2928
component: () => import('@/views/development/function'),
30-
name: 'FunctionEdit',
29+
name: 'FunctionEditorPage',
3130
hidden: true,
3231
meta: {
3332
title: '调试云函数',
3433
icon: 'bug',
35-
noCache: true,
3634
permissions: ['function.read']
3735
}
3836
},
@@ -43,31 +41,28 @@ export const asyncRoutes = [
4341
meta: {
4442
title: '云函数日志',
4543
icon: 'documentation',
46-
noCache: true,
4744
permissions: ['function.read', 'function.edit', 'function.create', 'function.debug']
4845
}
4946
},
5047
{
5148
path: 'function-logs/:id',
5249
component: () => import('@/views/development/function_logs'),
53-
name: 'FunctionLogs',
50+
name: 'FunctionlogsListPage',
5451
hidden: true,
5552
meta: {
5653
title: '云函数日志',
5754
icon: 'lock',
58-
noCache: true,
5955
permissions: ['function_logs.read', 'function.read', 'function.edit', 'function.create', 'function.debug']
6056
}
6157
},
6258
{
6359
path: 'triggers/:funcId',
6460
component: () => import('@/views/development/triggers'),
65-
name: 'TriggerManagement',
61+
name: 'TriggerListPage',
6662
hidden: true,
6763
meta: {
6864
title: '云函数触发器',
6965
icon: 'lock',
70-
noCache: true,
7166
permissions: ['trigger.read', 'trigger.edit', 'trigger.create', 'trigger.delete']
7267
}
7368
}
@@ -78,29 +73,27 @@ export const asyncRoutes = [
7873
component: Layout,
7974
redirect: '/database/collections',
8075
meta: {
81-
title: '数据管理', icon: 'excel', noCache: true
76+
title: '数据管理', icon: 'excel', noCache: false
8277
},
8378
children: [
8479
{
8580
path: 'policies',
8681
component: () => import('@/views/database/policies'),
87-
name: 'RuleManagement',
82+
name: 'PoliciesListPage',
8883
meta: {
8984
title: '访问策略',
9085
icon: 'eye',
91-
noCache: true,
9286
permissions: ['policy.read']
9387
}
9488
},
9589
{
9690
path: 'policy',
9791
component: () => import('@/views/database/policy'),
98-
name: 'RuleManagement',
92+
name: 'RuleEditorPage',
9993
hidden: true,
10094
meta: {
10195
title: '访问规则编辑',
102-
icon: 'edit',
103-
noCache: true
96+
icon: 'edit'
10497
}
10598
},
10699
{
@@ -110,7 +103,6 @@ export const asyncRoutes = [
110103
meta: {
111104
title: '集合管理',
112105
icon: 'example',
113-
noCache: true,
114106
permissions: ['database.manage', 'collections.get', 'collections.createIndex', 'collections.deleteIndex']
115107
}
116108
}
@@ -121,28 +113,26 @@ export const asyncRoutes = [
121113
component: Layout,
122114
redirect: '/system/role',
123115
meta: {
124-
title: '成员管理', icon: 'peoples', noCache: true
116+
title: '成员管理', icon: 'peoples'
125117
},
126118
children: [
127119
{
128120
path: 'admin',
129121
component: () => import('@/views/system/admin'),
130-
name: 'AdminManagement',
122+
name: 'AdminListPage',
131123
meta: {
132124
title: '开发者',
133125
icon: 'people',
134-
noCache: true,
135126
permissions: ['admin.read']
136127
}
137128
},
138129
{
139130
path: 'role',
140131
component: () => import('@/views/system/role'),
141-
name: 'RoleManagement',
132+
name: 'RoleListPage',
142133
meta: {
143134
title: '角色',
144135
icon: 'user',
145-
noCache: true,
146136
permissions: ['role.edit', 'role.create']
147137
}
148138
}

packages/devops-admin/src/settings.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = {
1717
* @type {boolean} true | false
1818
* @description Whether fix the header
1919
*/
20-
fixedHeader: false,
20+
fixedHeader: true,
2121

2222
/**
2323
* @type {boolean} true | false

packages/devops-admin/src/styles/transition.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@
1414
/* fade-transform */
1515
.fade-transform-leave-active,
1616
.fade-transform-enter-active {
17-
transition: all .5s;
17+
transition: all .05s;
1818
}
1919

2020
.fade-transform-enter {
2121
opacity: 0;
22-
transform: translateX(-30px);
22+
transform: translateX(-10px);
2323
}
2424

2525
.fade-transform-leave-to {
2626
opacity: 0;
27-
transform: translateX(30px);
27+
transform: translateX(10px);
2828
}
2929

3030
/* breadcrumb transition */
3131
.breadcrumb-enter-active,
3232
.breadcrumb-leave-active {
33-
transition: all .5s;
33+
transition: all .2s;
3434
}
3535

3636
.breadcrumb-enter,
@@ -40,7 +40,7 @@
4040
}
4141

4242
.breadcrumb-move {
43-
transition: all .5s;
43+
transition: all .2s;
4444
}
4545

4646
.breadcrumb-leave-active {

packages/devops-admin/src/views/system/admin.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const defaultForm = {
103103
}
104104
105105
export default {
106-
106+
name: 'AdminListPage',
107107
data() {
108108
return {
109109
admin: Object.assign({}, defaultForm),

packages/devops-admin/src/views/system/role.vue

+1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ const defaultForm = {
110110
}
111111
112112
export default {
113+
name: 'RoleListPage',
113114
data() {
114115
return {
115116
role: Object.assign({}, defaultForm),

0 commit comments

Comments
 (0)