gy-webcode2 1.1.4 → 1.1.6
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/components/breadcrumb.vue +46 -45
- package/css/layout.scss +2 -0
- package/css/login.scss +3 -1
- package/css/modules/button.scss +15 -0
- package/css/modules/sidebar.scss +4 -3
- package/css/modules/tabs.scss +3 -0
- package/css/modules/tree_check.scss +3 -0
- package/img/login_bg.png +0 -0
- package/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="breadcrumb"
|
|
2
|
+
<div class="breadcrumb">
|
|
3
3
|
<div class="row1" v-if="showRow1">
|
|
4
4
|
<div class="title ">
|
|
5
5
|
<span class="">{{$route.meta.headerMenuName}}</span>
|
|
6
|
-
<span class="breadcrumb_iconBox">
|
|
6
|
+
<!-- <span class="breadcrumb_iconBox">
|
|
7
7
|
<i class="el-icon-arrow-right"></i>
|
|
8
8
|
</span>
|
|
9
|
-
<span @click="menuClick" :class="{myHover:
|
|
9
|
+
<span @click="menuClick" :class="{myHover:routerBreadcrumb.length,s1:routerBreadcrumb.length == 0}" >
|
|
10
10
|
{{$route.meta.name}}
|
|
11
|
-
</span>
|
|
12
|
-
<template v-for="item,index in
|
|
11
|
+
</span> -->
|
|
12
|
+
<template v-for="item,index in routerBreadcrumb">
|
|
13
13
|
<span class="breadcrumb_iconBox">
|
|
14
14
|
<i class="el-icon-arrow-right"></i>
|
|
15
15
|
</span>
|
|
16
|
-
<span :class="{hover2:index <
|
|
16
|
+
<span :class="{hover2:index < routerBreadcrumb.length -1,s1:index == routerBreadcrumb.length -1}" @click="itemClick(item,index)">
|
|
17
17
|
{{item.name}}
|
|
18
18
|
</span>
|
|
19
19
|
</template>
|
|
@@ -24,13 +24,14 @@
|
|
|
24
24
|
<div class="name">
|
|
25
25
|
<span class="flex aic" :class="{myHover:isBack}" @click="backClick()">
|
|
26
26
|
<i v-if="isBack" class="el-icon-arrow-left mar_r_6"></i>
|
|
27
|
-
<template v-if="
|
|
28
|
-
{{
|
|
27
|
+
<template v-if="routerBreadcrumb.length">
|
|
28
|
+
{{routerBreadcrumb[routerBreadcrumb.length -1].name}}
|
|
29
29
|
</template>
|
|
30
30
|
<template v-else>
|
|
31
31
|
{{$route.meta.name}}
|
|
32
32
|
</template>
|
|
33
33
|
</span>
|
|
34
|
+
|
|
34
35
|
</div>
|
|
35
36
|
<slot name="nameAfter"></slot>
|
|
36
37
|
</div>
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
</template>
|
|
44
45
|
|
|
45
46
|
<script>
|
|
47
|
+
import uuid from "gy-webcode2/scripts/uuid"
|
|
46
48
|
export default {
|
|
47
49
|
// props:['name','showBack','goBack','pageHeaderShow'],
|
|
48
50
|
props:{
|
|
@@ -57,22 +59,10 @@ export default {
|
|
|
57
59
|
},
|
|
58
60
|
data(){
|
|
59
61
|
return {
|
|
60
|
-
|
|
62
|
+
myID:"",
|
|
61
63
|
}
|
|
62
64
|
},
|
|
63
65
|
watch:{
|
|
64
|
-
names(){
|
|
65
|
-
let breadcrumb_list = this.$store.state.menu.breadcrumb_list;
|
|
66
|
-
if(this.names.length){
|
|
67
|
-
this.names.forEach(item => {
|
|
68
|
-
breadcrumb_list.push({
|
|
69
|
-
name:item,
|
|
70
|
-
click:this.backClick
|
|
71
|
-
})
|
|
72
|
-
})
|
|
73
|
-
}
|
|
74
|
-
// console.log(breadcrumb_list);
|
|
75
|
-
}
|
|
76
66
|
},
|
|
77
67
|
computed:{
|
|
78
68
|
names(){
|
|
@@ -85,56 +75,67 @@ export default {
|
|
|
85
75
|
return this.$listeners && this.$listeners['goBack']
|
|
86
76
|
},
|
|
87
77
|
showRow1(){
|
|
88
|
-
if(this.
|
|
89
|
-
|
|
90
|
-
return true;
|
|
91
|
-
}
|
|
78
|
+
if(this.$store.state.vuex_breadcrumbShow){
|
|
79
|
+
return true;
|
|
92
80
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
81
|
+
},
|
|
82
|
+
routeName(){
|
|
83
|
+
return this.$route.name;
|
|
84
|
+
},
|
|
85
|
+
routerBreadcrumb(){
|
|
86
|
+
if(this.breadcrumb_list[this.routeName]){
|
|
87
|
+
return this.breadcrumb_list[this.routeName]
|
|
97
88
|
}
|
|
89
|
+
return []
|
|
98
90
|
}
|
|
99
91
|
|
|
100
92
|
},
|
|
101
93
|
created(){
|
|
102
|
-
|
|
103
|
-
let
|
|
94
|
+
let breadcrumb_list = this.breadcrumb_list;
|
|
95
|
+
let routeName = this.$route.name;
|
|
96
|
+
if(!breadcrumb_list[routeName]){
|
|
97
|
+
this.$set(breadcrumb_list,routeName,[])
|
|
98
|
+
}
|
|
99
|
+
let myID = uuid(10,16)
|
|
100
|
+
this.myID = myID;
|
|
101
|
+
|
|
104
102
|
if(this.names.length){
|
|
105
103
|
this.names.forEach(item => {
|
|
106
|
-
|
|
104
|
+
|
|
105
|
+
breadcrumb_list[routeName].push({
|
|
107
106
|
name:item,
|
|
107
|
+
id:myID,
|
|
108
108
|
click:this.backClick
|
|
109
109
|
})
|
|
110
110
|
})
|
|
111
111
|
}
|
|
112
|
+
else{
|
|
113
|
+
breadcrumb_list[routeName].push({
|
|
114
|
+
name:this.$route.meta.name,
|
|
115
|
+
id:myID,
|
|
116
|
+
click:this.backClick
|
|
117
|
+
})
|
|
118
|
+
}
|
|
112
119
|
},
|
|
113
120
|
methods:{
|
|
114
121
|
backClick(){
|
|
115
122
|
this.$emit('goBack');
|
|
116
123
|
},
|
|
117
124
|
itemClick(data,index){
|
|
118
|
-
if(index
|
|
119
|
-
this.
|
|
125
|
+
if(index != this.routerBreadcrumb.length -1){
|
|
126
|
+
this.routerBreadcrumb[index+1].click()
|
|
120
127
|
}
|
|
121
128
|
},
|
|
122
129
|
menuClick(){
|
|
123
|
-
if(this.
|
|
124
|
-
this.
|
|
130
|
+
if(this.routerBreadcrumb.length){
|
|
131
|
+
this.routerBreadcrumb[0].click()
|
|
125
132
|
}
|
|
126
133
|
}
|
|
127
134
|
},
|
|
128
135
|
beforeDestroy(){
|
|
129
|
-
let
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
let isFind = breadcrumb_list.findIndex(i => i.name == item)
|
|
133
|
-
if(isFind > -1){
|
|
134
|
-
breadcrumb_list.splice(isFind,1)
|
|
135
|
-
}
|
|
136
|
-
})
|
|
137
|
-
}
|
|
136
|
+
let routeName = this.$route.name;
|
|
137
|
+
let rIndex = this.routerBreadcrumb.findIndex(i => i.id == this.myID)
|
|
138
|
+
this.breadcrumb_list[routeName] = this.routerBreadcrumb.splice(0,rIndex);
|
|
138
139
|
}
|
|
139
140
|
}
|
|
140
141
|
</script>
|
package/css/layout.scss
CHANGED
package/css/login.scss
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
.loginBody{
|
|
2
|
-
background:#00656b url("~gy-webcode2/img/login_bg2.jpg") top center no-repeat;
|
|
2
|
+
// background:#00656b url("~gy-webcode2/img/login_bg2.jpg") top center no-repeat;
|
|
3
|
+
background: url("~gy-webcode2/img/login_bg.png") top center no-repeat;
|
|
3
4
|
background-size: 100% 100%;
|
|
5
|
+
@include themeColor("background-color",'down');
|
|
4
6
|
position: absolute;
|
|
5
7
|
left: 0;
|
|
6
8
|
top: 0;
|
package/css/modules/button.scss
CHANGED
|
@@ -79,6 +79,21 @@
|
|
|
79
79
|
opacity: 0.3;
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
+
&.hui{
|
|
83
|
+
background: #ccc;
|
|
84
|
+
user-select: none;
|
|
85
|
+
&:hover{
|
|
86
|
+
background: #dddddd;
|
|
87
|
+
}
|
|
88
|
+
&:active{
|
|
89
|
+
background: #ccc;
|
|
90
|
+
}
|
|
91
|
+
&.disabled{
|
|
92
|
+
cursor: no-drop;
|
|
93
|
+
background: #c1c1c1;
|
|
94
|
+
opacity: 0.3;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
82
97
|
|
|
83
98
|
}
|
|
84
99
|
.operateBtnIconPopper.is-light{
|
package/css/modules/sidebar.scss
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
flex-direction: column;
|
|
8
8
|
transition: all 0.3s ease;
|
|
9
9
|
user-select: none;
|
|
10
|
-
position: relative;
|
|
11
|
-
z-index: 100;
|
|
10
|
+
// position: relative;
|
|
11
|
+
// z-index: 100;
|
|
12
12
|
&.mini{
|
|
13
13
|
width: 48px;
|
|
14
14
|
.sildeBody {
|
|
@@ -110,7 +110,8 @@
|
|
|
110
110
|
transition: all 0.3s ease;
|
|
111
111
|
position: relative;
|
|
112
112
|
&:hover{
|
|
113
|
-
color: #60abff ;
|
|
113
|
+
// color: #60abff ;
|
|
114
|
+
@include themeColor('background-color','hover');
|
|
114
115
|
}
|
|
115
116
|
.icon{
|
|
116
117
|
transition: all 0.3s ease;
|
package/css/modules/tabs.scss
CHANGED
package/img/login_bg.png
ADDED
|
Binary file
|
package/index.js
CHANGED