gy-webcode2 1.1.7 → 1.2.0

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.
@@ -2,7 +2,7 @@
2
2
  <div class="breadcrumb">
3
3
  <div class="row1" v-if="showRow1">
4
4
  <div class="title ">
5
- <span class="">{{$route.meta.headerMenuName}}</span>
5
+ <span class="">{{menuPath.meta.headerMenuName}}</span>
6
6
  <!-- <span class="breadcrumb_iconBox">
7
7
  <i class="el-icon-arrow-right"></i>
8
8
  </span>
@@ -10,8 +10,9 @@
10
10
  {{$route.meta.name}}
11
11
  </span> -->
12
12
  <template v-for="item,index in routerBreadcrumb">
13
- <span class="breadcrumb_iconBox">
14
- <i class="el-icon-arrow-right"></i>
13
+ <span class="breadcrumb_iconBox flex aic jcc">
14
+ <i class="common_iconfont common_icon-xiexian fs_12"></i>
15
+ <!-- <i class="el-icon-arrow-right"></i> -->
15
16
  </span>
16
17
  <span :class="{hover2:index < routerBreadcrumb.length -1,s1:index == routerBreadcrumb.length -1}" @click="itemClick(item,index)">
17
18
  {{item.name}}
@@ -28,7 +29,7 @@
28
29
  {{routerBreadcrumb[routerBreadcrumb.length -1].name}}
29
30
  </template>
30
31
  <template v-else>
31
- {{$route.meta.name}}
32
+ {{menuPath.name}}
32
33
  </template>
33
34
  </span>
34
35
 
@@ -38,6 +39,9 @@
38
39
  <div class="other">
39
40
  <div class="otherContainer">
40
41
  <slot name="other"></slot>
42
+ <el-button title="返回" @click="backClick()" v-if="isBack" icon="" type="primary" class="btnIcon mar_l_10">
43
+ <i class="el-icon-arrow-left"></i>
44
+ </el-button>
41
45
  </div>
42
46
  </div>
43
47
  </div>
@@ -60,11 +64,21 @@ export default {
60
64
  data(){
61
65
  return {
62
66
  myID:"",
67
+ fullPath:"",
63
68
  }
64
69
  },
65
70
  watch:{
66
71
  },
67
72
  computed:{
73
+ menuPath(){
74
+ // return this.$store.state.menu.menuPath[this.$route.fullPath]
75
+ let menu = this.$store.state.menu.menuPath
76
+ let menuKey = Object.keys(menu).find(key => {
77
+ return this.fullPath.includes(key)
78
+ })
79
+ // let findMenu =
80
+ return menu[menuKey]
81
+ },
68
82
  names(){
69
83
  return this.name ? this.name.split(',') : []
70
84
  },
@@ -79,12 +93,9 @@ export default {
79
93
  return true;
80
94
  }
81
95
  },
82
- routeName(){
83
- return this.$route.name;
84
- },
85
96
  routerBreadcrumb(){
86
- if(this.breadcrumb_list[this.routeName]){
87
- return this.breadcrumb_list[this.routeName]
97
+ if(this.breadcrumb_list[this.fullPath]){
98
+ return this.breadcrumb_list[this.fullPath]
88
99
  }
89
100
  return []
90
101
  }
@@ -92,9 +103,10 @@ export default {
92
103
  },
93
104
  created(){
94
105
  let breadcrumb_list = this.breadcrumb_list;
95
- let routeName = this.$route.name;
96
- if(!breadcrumb_list[routeName]){
97
- this.$set(breadcrumb_list,routeName,[])
106
+ let fullPath = this.$route.fullPath;
107
+ this.fullPath = fullPath;
108
+ if(!breadcrumb_list[fullPath]){
109
+ this.$set(breadcrumb_list,fullPath,[])
98
110
  }
99
111
  let myID = uuid(10,16)
100
112
  this.myID = myID;
@@ -102,7 +114,7 @@ export default {
102
114
  if(this.names.length){
103
115
  this.names.forEach(item => {
104
116
 
105
- breadcrumb_list[routeName].push({
117
+ breadcrumb_list[fullPath].push({
106
118
  name:item,
107
119
  id:myID,
108
120
  click:this.backClick
@@ -110,8 +122,8 @@ export default {
110
122
  })
111
123
  }
112
124
  else{
113
- breadcrumb_list[routeName].push({
114
- name:this.$route.meta.name,
125
+ breadcrumb_list[fullPath].push({
126
+ name:this.menuPath.name,
115
127
  id:myID,
116
128
  click:this.backClick
117
129
  })
@@ -133,9 +145,9 @@ export default {
133
145
  }
134
146
  },
135
147
  beforeDestroy(){
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);
148
+ let rIndex = this.breadcrumb_list[this.fullPath].findIndex(i => i.id == this.myID)
149
+ this.breadcrumb_list[this.fullPath].splice(rIndex,1)
150
+
139
151
  }
140
152
  }
141
153
  </script>
package/css/layout.scss CHANGED
@@ -191,6 +191,16 @@
191
191
  line-height: 32px;
192
192
  &.noPad{
193
193
  padding:12px 0 0 0;
194
+ .start{
195
+ .item:nth-of-type(1){
196
+ margin-left: 0;
197
+ }
198
+ }
199
+ .end{
200
+ .item:nth-last-of-type(1){
201
+ margin-right: 0;
202
+ }
203
+ }
194
204
  }
195
205
  .start{
196
206
  display: flex;
@@ -329,7 +339,7 @@
329
339
  top: 0;
330
340
  right: 0;
331
341
  bottom: 0;
332
- z-index: 10;
342
+ z-index: 99999;
333
343
  }
334
344
 
335
345
  .routerTabs{
@@ -393,3 +403,32 @@
393
403
  }
394
404
  }
395
405
 
406
+ .rightMenuBox{
407
+ position: fixed;
408
+ width: 100px;
409
+ // height: 200px;
410
+ padding:5px 0;
411
+ background: #fff;
412
+ left: 10px;
413
+ top: 10px;
414
+ z-index: 999;
415
+ // box-shadow: 0 0 10px 3px #aaa;
416
+ box-shadow: 0 0 10px 0px #aaa ;
417
+ border-radius:4px;
418
+ .item{
419
+ display: flex;
420
+ align-items: center;
421
+ font-size: 12px;
422
+ height: 30px;
423
+ // border: 1px solid #000;
424
+ padding-left: 12px;
425
+ cursor: pointer;
426
+ .icon{
427
+ margin-right: 5px;
428
+ }
429
+ &:hover{
430
+ // color: #009499;
431
+ @include themeColor("color",'hover')
432
+ }
433
+ }
434
+ }
@@ -48,7 +48,10 @@
48
48
  .color_2{
49
49
  color: $color2;
50
50
  }
51
-
51
+ .color_3{
52
+ color: $color3;
53
+ // background-color: rgba($color: #000000, $alpha: 1.0);
54
+ }
52
55
  .color_4{
53
56
  color: $color4;
54
57
  // background-color: rgba($color: #000000, $alpha: 1.0);
@@ -5,6 +5,7 @@
5
5
  // align-items: center;
6
6
  line-height: normal;
7
7
  transition: all 0.2s ease;
8
+
8
9
  // color: #262626;
9
10
  &.lan{
10
11
  @include themeColor("color",'color');
@@ -76,6 +77,7 @@
76
77
  font-size: 14px;
77
78
  padding: 5px 10px;
78
79
  min-width: 72px;
80
+ height: 32px;
79
81
  border-radius: 6px;
80
82
  // padding: 0;
81
83
  }
@@ -107,6 +109,10 @@
107
109
  min-width: auto ;
108
110
  font-size: 12px ;
109
111
  }
112
+ &.is-disabled{
113
+ color: #fff !important;
114
+ opacity: 0.5 !important;
115
+ }
110
116
  }
111
117
  // 输入框
112
118
  .el-input__inner{
@@ -12,17 +12,48 @@
12
12
  font-weight: initial;
13
13
  font-size: 14px;
14
14
  }
15
- &:nth-of-type(1){
16
- border-radius: 8px 0 0 0 ;
15
+ // &:nth-of-type(1){
16
+ // border-radius: 8px 0 0 0 ;
17
+ // }
18
+ // &:nth-last-child(2){
19
+ // border-radius:0 ;
20
+ // // border-right: none;
21
+ // }
22
+ // &:nth-last-child(1){
23
+ // border-radius:0 8px 0 0 ;
24
+ // }
25
+ }
26
+
27
+ thead.is-group th.el-table__cell,th{
28
+ // --el-fill-color-light:var(#fafafa);
29
+ background: #f0f0f0 !important;
30
+ // @include themeColor("-el-fill-color-light",'hover');
31
+ border-right: 1px solid #d9d9d9 !important;
32
+
33
+ >.cell{
34
+ color:$color;
35
+ font-weight: initial;
36
+ font-size: 14px;
17
37
  }
18
- &:nth-last-child(2){
19
- border-radius:0 ;
20
- // border-right: none;
38
+
39
+ // &:nth-last-child(1){
40
+ // border-radius:0 8px 0 0 ;
41
+ // border-right: none !important;
42
+ // }
43
+ }
44
+
45
+ thead tr:nth-of-type(1){
46
+ th:nth-of-type(1){
47
+ border-radius: 8px 0 0 0 ;
21
48
  }
22
- &:nth-last-child(1){
49
+ th:nth-last-child(1){
23
50
  border-radius:0 8px 0 0 ;
51
+ border-right: none !important;
24
52
  }
25
53
  }
54
+
55
+
56
+
26
57
  .cell{
27
58
  line-height: 20px;
28
59
  padding-left:10px;
@@ -42,16 +73,26 @@
42
73
  @include themeColor("background-color",'hover',0.1)
43
74
  }
44
75
 
45
- .el-table td.el-table__cell, .el-table th.el-table__cell.is-leaf{
46
- border-bottom: 1px solid #d9d9d9;
76
+ .el-table td.el-table__cell{
77
+ border-bottom: 1px solid #ebebeb;
47
78
  }
48
79
  .el-table--border .el-table__cell, .el-table__body-wrapper .el-table--border.is-scrolling-left~.el-table__fixed{
49
80
  border-right: 1px solid #d9d9d9;
50
81
  }
82
+ .el-table--border th.el-table__cell{
83
+ border-bottom: 1px solid #d9d9d9;
84
+ }
85
+
86
+ .el-table th.el-table__cell.is-leaf{
87
+ border-bottom: 1px solid #d9d9d9;
88
+ }
89
+
51
90
 
52
91
  .el-table--border, .el-table--group{
53
92
  // border: none;
54
- border: 1px solid #d9d9d9;
93
+ border: 1px solid #ebebeb;
94
+ border-radius: 8px 8px 0 0;
95
+
55
96
  }
56
97
  .el-table--border {
57
98
  border-right: none;
@@ -25,7 +25,7 @@
25
25
  .right{
26
26
  overflow: auto;
27
27
  }
28
- .left,.right{
28
+ .left{
29
29
 
30
30
  ul{
31
31
  padding:10px;
@@ -53,4 +53,31 @@
53
53
  }
54
54
  }
55
55
  }
56
+ .right{
57
+ >ul{
58
+ padding:10px;
59
+ li{
60
+ height: 25px;
61
+ margin-bottom: 5px;
62
+ display: flex;
63
+ font-size: 14px;
64
+ line-height: 25px;
65
+ div:nth-of-type(1){
66
+ border: 1px solid #efefef;
67
+ flex: 1;
68
+ color:#666666;
69
+ padding-left: 10px;
70
+ overflow: hidden;
71
+ text-overflow: ellipsis;
72
+ white-space: nowrap;
73
+ }
74
+ div:nth-of-type(2){
75
+ width: 30px;
76
+ text-align:center;
77
+ color:#a5becf;
78
+ cursor: pointer;
79
+ }
80
+ }
81
+ }
82
+ }
56
83
  }
package/index.js CHANGED
@@ -10,9 +10,10 @@
10
10
  // ~的意思是匹配最近的小版本 比如~1.0.2将会匹配所有的1.0.x版本,但不匹配1.1.0
11
11
  // ^的意思是最近的一个大版本 比如1.0.2 将会匹配 所有 1.x.x, 但不包括2.x.x
12
12
  // * 这意味着安装最新版本的依赖包
13
- // 已使用项目 指标管理、数据治理
13
+ // 已使用项目 指标管理、数据治理 、数据标准
14
14
  // https://registry.npmjs.org/gy-webcode2
15
15
 
16
+ // 1.2.0 breadcrumb 使用store的menuPath了
16
17
  module.exports = {
17
- version :'1.1.7',
18
+ version :'1.2.0',
18
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gy-webcode2",
3
- "version": "1.1.7",
3
+ "version": "1.2.0",
4
4
  "description": "gy前端公共代码",
5
5
  "main": "index.js",
6
6
  "scripts": {