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.
@@ -1,19 +1,19 @@
1
1
  <template>
2
- <div class="breadcrumb" :class="{default:position=='default',breadcrumb_top:position == 'top'}">
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:breadcrumb_list.length,s1:breadcrumb_list.length == 0}" >
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 breadcrumb_list">
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 < breadcrumb_list.length -1,s1:index == breadcrumb_list.length -1}" @click="itemClick(item,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="breadcrumb_list.length">
28
- {{breadcrumb_list[breadcrumb_list.length -1].name}}
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
- headerMenuHide:defaultConfig.headerMenuHide
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.position == 'default'){
89
- if(this.$store.state.vuex_breadcrumbShow){
90
- return true;
91
- }
78
+ if(this.$store.state.vuex_breadcrumbShow){
79
+ return true;
92
80
  }
93
- else if(this.position == 'top'){
94
- if(this.$store.state.vuex_breadcrumbShow){
95
- return true;
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
- // console.log(this.$listeners['goBack']);
103
- let breadcrumb_list = this.$store.state.menu.breadcrumb_list;
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
- breadcrumb_list.push({
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 < this.breadcrumb_list.length -1){
119
- this.breadcrumb_list[index + 1].click()
125
+ if(index != this.routerBreadcrumb.length -1){
126
+ this.routerBreadcrumb[index+1].click()
120
127
  }
121
128
  },
122
129
  menuClick(){
123
- if(this.breadcrumb_list.length){
124
- this.breadcrumb_list[0].click()
130
+ if(this.routerBreadcrumb.length){
131
+ this.routerBreadcrumb[0].click()
125
132
  }
126
133
  }
127
134
  },
128
135
  beforeDestroy(){
129
- let breadcrumb_list = this.$store.state.menu.breadcrumb_list;
130
- if(this.names.length){
131
- this.names.forEach(item => {
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
@@ -173,6 +173,8 @@
173
173
  min-height: 32px;
174
174
  margin-bottom: 5px;
175
175
  margin-top: 5px;
176
+ display: flex;
177
+ align-items: center;
176
178
  }
177
179
  }
178
180
  }
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;
@@ -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{
@@ -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;
@@ -45,6 +45,9 @@
45
45
  }
46
46
 
47
47
  }
48
+ .items{
49
+ display: flex;
50
+ }
48
51
  .other{
49
52
  display: flex;
50
53
  align-items: center;
@@ -25,6 +25,8 @@
25
25
  .right{
26
26
  overflow: auto;
27
27
  }
28
+ .left,.right{
29
+
28
30
  ul{
29
31
  padding:10px;
30
32
  li{
@@ -50,4 +52,5 @@
50
52
  }
51
53
  }
52
54
  }
55
+ }
53
56
  }
Binary file
package/index.js CHANGED
@@ -13,5 +13,5 @@
13
13
  // 已使用项目 指标管理
14
14
 
15
15
  module.exports = {
16
- version :'1.1.4',
16
+ version :'1.1.6',
17
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gy-webcode2",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "gy前端公共代码",
5
5
  "main": "index.js",
6
6
  "scripts": {