cloud-web-corejs 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/src/layout/EmptyLayout.vue +3 -0
- package/src/layout/components/AppMain.vue +111 -0
- package/src/layout/components/Sidebar/index.vue +1198 -0
- package/src/layout/components/TagsView/ScrollPane.vue +112 -0
- package/src/layout/components/TagsView/index.vue +281 -0
- package/src/layout/components/index.js +5 -0
- package/src/layout/components/langTool.vue +121 -0
- package/src/layout/components/notify_message/unreadDialog.vue +135 -0
- package/src/layout/index.vue +151 -0
- package/src/store/modules/permission.js +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloud-web-corejs",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vue-cli-service serve",
|
|
7
7
|
"lint": "eslint --ext .js,.vue src",
|
|
@@ -156,6 +156,7 @@
|
|
|
156
156
|
"src/store",
|
|
157
157
|
"src/resources/js",
|
|
158
158
|
"src/lang/index.js",
|
|
159
|
+
"src//layout",
|
|
159
160
|
"permission.js",
|
|
160
161
|
"src/index.js"
|
|
161
162
|
],
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="app-main">
|
|
3
|
+
<transition name="fade-transform" mode="out-in">
|
|
4
|
+
<!-- <keep-alive :include="cachedViews"><router-view :key="key" v-if="$route.name !== 'outLink'" /></keep-alive>-->
|
|
5
|
+
|
|
6
|
+
<BaseKeepAlive :include="cachedViews">
|
|
7
|
+
<router-view :key="$route.path" v-if="$route.name !== 'outLink'" />
|
|
8
|
+
</BaseKeepAlive>
|
|
9
|
+
|
|
10
|
+
</transition>
|
|
11
|
+
<template v-for="item in outVisitedViews">
|
|
12
|
+
<outLink
|
|
13
|
+
:ref="'ref_'+$route.path"
|
|
14
|
+
:key="item.path"
|
|
15
|
+
v-show="$route.path === item.path"
|
|
16
|
+
v-if="$route.path !== item.path || reflushFlag"
|
|
17
|
+
visible-key="reflushFlag"
|
|
18
|
+
:parent-target="_self"
|
|
19
|
+
@reload="$reloadHandle"
|
|
20
|
+
></outLink>
|
|
21
|
+
</template>
|
|
22
|
+
<unreadDialog></unreadDialog>
|
|
23
|
+
</section>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<script>
|
|
27
|
+
import outLink from '@base/views/user/outLink/index.vue';
|
|
28
|
+
import unreadDialog from "../../layout/components/notify_message/unreadDialog.vue";
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
name: 'AppMain',
|
|
32
|
+
computed: {
|
|
33
|
+
cachedViews() {
|
|
34
|
+
return this.$store.state.tagsView.cachedViews.filter(item => item != 'outLink');
|
|
35
|
+
},
|
|
36
|
+
key() {
|
|
37
|
+
return this.$route.path;
|
|
38
|
+
},
|
|
39
|
+
outVisitedViews() {
|
|
40
|
+
let visitedViews = this.$store.state.tagsView.visitedViews;
|
|
41
|
+
return visitedViews.filter(visitedView => visitedView.name == 'outLink');
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
components: {
|
|
45
|
+
outLink,
|
|
46
|
+
unreadDialog
|
|
47
|
+
},
|
|
48
|
+
data() {
|
|
49
|
+
return {
|
|
50
|
+
rIndex: -1,
|
|
51
|
+
reflushFlag: true
|
|
52
|
+
};
|
|
53
|
+
},
|
|
54
|
+
methods: {
|
|
55
|
+
reflushIframe(path) {
|
|
56
|
+
this.outVisitedViews.findIndex(item => item.full);
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
created() {
|
|
60
|
+
this.$baseEventBus.$on("reflushRouteView",(view)=>{
|
|
61
|
+
if(this.$route.name=="outLink"){
|
|
62
|
+
let t = this.$refs["ref_"+this.$route.path][0];
|
|
63
|
+
t.$baseReload();
|
|
64
|
+
}else{
|
|
65
|
+
this.$store.dispatch('tagsView/delCachedView', view).then(() => {
|
|
66
|
+
const { fullPath } = view
|
|
67
|
+
this.$nextTick(() => {
|
|
68
|
+
this.$router.replace({
|
|
69
|
+
path: '/redirect' + fullPath
|
|
70
|
+
})
|
|
71
|
+
})
|
|
72
|
+
})
|
|
73
|
+
}
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<style lang="scss" scoped>
|
|
80
|
+
.app-main {
|
|
81
|
+
/* 45= navbar 45 */
|
|
82
|
+
min-height: calc(100vh - 45px);
|
|
83
|
+
width: 100%;
|
|
84
|
+
position: relative;
|
|
85
|
+
overflow: hidden;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.fixed-header + .app-main {
|
|
89
|
+
padding-top: 32px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.hasTagsView {
|
|
93
|
+
.app-main {
|
|
94
|
+
/* 84 = navbar + tags-view = 45 + 34 */
|
|
95
|
+
min-height: calc(100vh - 79px);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.fixed-header + .app-main {
|
|
99
|
+
padding-top: 79px;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
</style>
|
|
103
|
+
|
|
104
|
+
<style lang="scss">
|
|
105
|
+
// fix css style bug in open el-dialog
|
|
106
|
+
.el-popup-parent--hidden {
|
|
107
|
+
.fixed-header {
|
|
108
|
+
padding-right: 15px;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
</style>
|