bri-components 1.2.67 → 1.2.68

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bri-components",
3
- "version": "1.2.67",
3
+ "version": "1.2.68",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -182,7 +182,7 @@
182
182
 
183
183
  & + span {
184
184
  color: @value;
185
- opacity: 0.5;
185
+ opacity: 0.6;
186
186
  }
187
187
  }
188
188
 
@@ -6,13 +6,13 @@
6
6
  >
7
7
  <TabPane
8
8
  v-for="tabItem in list"
9
- :key="tabItem._key"
9
+ :key="tabItem[keyField]"
10
10
  class="DshTabs-item"
11
- :name="tabItem._key"
11
+ :name="tabItem[keyField]"
12
12
  :label="getLabel(tabItem)"
13
13
  >
14
14
  <slot
15
- v-if="renderStatusMap[tabItem._key]"
15
+ v-if="renderStatusMap[tabItem[keyField]]"
16
16
  :tabItem="tabItem"
17
17
  >
18
18
  <span></span>
@@ -20,17 +20,18 @@
20
20
  </TabPane>
21
21
 
22
22
  <div
23
+ v-if="rightTabList.length"
23
24
  slot="extra"
24
25
  class="extra"
25
26
  >
26
27
  <span
27
28
  v-for="tabItem in rightTabList"
28
- :key="tabItem._key"
29
+ :key="tabItem[keyField]"
29
30
  :class="{
30
31
  'extra-item': true,
31
- 'extra-item-active': tabItem._key === curTabKey
32
+ 'extra-item-active': tabItem[keyField] === curTabKey
32
33
  }"
33
- @click="curTabKey = tabItem._key"
34
+ @click="curTabKey = tabItem[keyField]"
34
35
  >
35
36
  {{ tabItem.name }}
36
37
  </span>
@@ -49,9 +50,13 @@
49
50
  type: String,
50
51
  default: "creative",
51
52
  validator (val) {
52
- return ["creative", "tradition", "page"].includes(val);
53
+ return ["creative", "tradition", "page", "line"].includes(val);
53
54
  }
54
55
  },
56
+ keyField: {
57
+ type: String,
58
+ default: "_key"
59
+ },
55
60
  list: {
56
61
  type: Array,
57
62
  default () {
@@ -75,7 +80,7 @@
75
80
  this.init(tabKey);
76
81
 
77
82
  this.$emit("input", tabKey);
78
- this.$emit("change", tabKey, this.list.find(item => item._key === tabKey));
83
+ this.$emit("change", tabKey, this.list.find(item => item[this.keyField] === tabKey));
79
84
  }
80
85
  }
81
86
  },
@@ -84,7 +89,7 @@
84
89
  }
85
90
  },
86
91
  created () {
87
- this.init(this.curTabKey != undefined ? this.curTabKey : (this.list[0] && this.list[0]._key));
92
+ this.init(this.curTabKey != undefined ? this.curTabKey : (this.list[0] && this.list[0][this.keyField]));
88
93
  },
89
94
  mounted () {},
90
95
  methods: {
@@ -133,17 +138,6 @@
133
138
  &-active {
134
139
  color: @themeColor;
135
140
  position: relative;
136
-
137
- // &::after {
138
- // content: "";
139
- // width: 100%;
140
- // height: 2px;
141
- // position: absolute;
142
- // bottom: 0px;
143
- // left: 0;
144
- // z-index: 1;
145
- // background-color: @themeColor;
146
- // }
147
141
  }
148
142
  }
149
143
  }
@@ -325,6 +319,7 @@
325
319
  // tab切换下方下划线
326
320
  .ivu-tabs-ink-bar {
327
321
  display: none;
322
+
328
323
  &-animated {
329
324
  display: none;
330
325
  }
@@ -370,5 +365,53 @@
370
365
  }
371
366
  }
372
367
  }
368
+
369
+ // 下划线
370
+ &-line {
371
+ .ivu-tabs {
372
+ // color: @titleColor;
373
+
374
+ &-bar {
375
+ height: 100%;
376
+ border-bottom: 0px!important;
377
+ margin-bottom: 0px!important;
378
+
379
+ .ivu-tabs-nav-container {
380
+
381
+ .ivu-tabs-nav-wrap {
382
+
383
+ .ivu-tabs-nav {
384
+ &-prev,
385
+ &-next {
386
+
387
+ }
388
+
389
+ &-scroll {
390
+ &-disabled {
391
+
392
+ }
393
+
394
+ .ivu-tabs-nav {
395
+
396
+ .ivu-tabs-ink-bar {
397
+
398
+ }
399
+
400
+ .ivu-tabs-tab {
401
+ // margin-right: 0px;
402
+
403
+ &-active,
404
+ &-focused {
405
+
406
+ }
407
+ }
408
+ }
409
+ }
410
+ }
411
+ }
412
+ }
413
+ }
414
+ }
415
+ }
373
416
  }
374
417
  </style>