bri-components 1.2.75 → 1.2.76

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.75",
3
+ "version": "1.2.76",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -2,6 +2,7 @@
2
2
  <Tabs
3
3
  :class="['DshTabs', `DshTabs-${mode}`]"
4
4
  v-model="curTabKey"
5
+ :type="['button', 'card'].includes(mode) ? 'card' : undefined"
5
6
  :animated="false"
6
7
  >
7
8
  <TabPane
@@ -50,7 +51,7 @@
50
51
  type: String,
51
52
  default: "creative",
52
53
  validator (val) {
53
- return ["creative", "tradition", "page", "line"].includes(val);
54
+ return ["creative", "tradition", "page", "button", "card", "line"].includes(val);
54
55
  }
55
56
  },
56
57
  keyField: {
@@ -103,7 +104,7 @@
103
104
  ? (h) => {
104
105
  return h("div", {
105
106
  style: {
106
- padding: "0px 16px"
107
+ padding: this.mode === "button" ? undefined : "0px 16px"
107
108
  }
108
109
  }, tabItem.name);
109
110
  }
@@ -366,6 +367,51 @@
366
367
  }
367
368
  }
368
369
 
370
+ // 按钮式、卡片式
371
+ &-button,
372
+ &-card {
373
+ &.ivu-tabs.ivu-tabs-card {
374
+ & > .ivu-tabs-bar {
375
+ border: none;
376
+ margin-bottom: 0px;
377
+
378
+ .ivu-tabs-nav-container {
379
+ height: 33px;
380
+ }
381
+
382
+ .ivu-tabs-tab {
383
+ height: 28px;
384
+ background-color: transparent;
385
+ color: @contentColor;
386
+ border-radius: 4px;
387
+ border: none;
388
+ margin: 2px;
389
+ padding: 3px 16px;
390
+ line-height: 22px;
391
+
392
+ &-active {
393
+ background-color: #fff;
394
+ color: @textColor;
395
+ }
396
+
397
+ &:hover {
398
+ color: @textColor;
399
+ }
400
+ }
401
+
402
+ .ivu-tabs-ink-bar {
403
+ background-color: transparent;
404
+ display: none;
405
+ }
406
+ }
407
+
408
+ .ivu-tabs-nav {
409
+ background-color: @borderColor;
410
+ border-radius: @borderRadius;
411
+ }
412
+ }
413
+ }
414
+
369
415
  // 下划线
370
416
  &-line {
371
417
  .ivu-tabs {
@@ -4,7 +4,6 @@ const transformToColumns = function (form, {
4
4
  headerFilter = false
5
5
  } = {}) {
6
6
  return form
7
- .filter(col => col._type !== "tag")
8
7
  .map(col => {
9
8
  const typeData = this.$modFieldMap[col._type] || {};
10
9