bri-components 1.4.81 → 1.4.82

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.4.81",
3
+ "version": "1.4.82",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -262,7 +262,6 @@
262
262
  loadingText: "加载中,请稍等……",
263
263
  finishedText: "暂无更多数据!",
264
264
  noDataText: "暂无数据",
265
- noDataImg: "https://apaas-static.oss-cn-beijing.aliyuncs.com/kongdata.png",
266
265
 
267
266
  ...this.propsObj
268
267
  };
@@ -83,9 +83,33 @@
83
83
  return {
84
84
  ...operationItem,
85
85
  width: operationItem.width || getOperationItemMaxWidth(operationItem),
86
- style: (operationItem._name_ || operationItem.name).split("/").length > 1
87
- ? `width: ${getOperationItemMaxWidth(operationItem)}px; `
88
- : undefined
86
+ style: {
87
+ ...(
88
+ (operationItem._name_ || operationItem.name).split("/").length > 1
89
+ ? { width: `${getOperationItemMaxWidth(operationItem)}px` }
90
+ : {}
91
+ ),
92
+ ...(
93
+ typeof operationItem.style === "object"
94
+ ? operationItem.style
95
+ : typeof operationItem.style === "string"
96
+ ? operationItem.style.split(";").reduce((styleObj, styleItem) => {
97
+ if (styleItem) {
98
+ const property = styleItem.split(":")[0];
99
+ const val = styleItem.split(":")[1];
100
+
101
+ return {
102
+ ...styleObj,
103
+ [property]: val
104
+ };
105
+ }
106
+ else {
107
+ return styleObj;
108
+ }
109
+ }, {})
110
+ : {}
111
+ )
112
+ }
89
113
  };
90
114
  });
91
115
  },
@@ -136,7 +136,6 @@ export default {
136
136
  btnType: "errorText",
137
137
  icon: "md-trash",
138
138
  size: "small",
139
- color: "#E83636",
140
139
  disabled: false,
141
140
  event: "clickDelete"
142
141
  }
@@ -466,7 +465,7 @@ export default {
466
465
  .map((rowItem, rowIndex) => {
467
466
  rowItem.__index__ = rowIndex + 1;
468
467
  return rowItem;
469
- });
468
+ });
470
469
  },
471
470
  // 全部数据 或 筛选时符合条件的数据 -总数
472
471
  selfTotal () {
@@ -488,11 +487,11 @@ export default {
488
487
  ? initDftVal
489
488
  : dftVal
490
489
  : dftInRowVal
491
- // [column._key]: this.$isEmptyData(dftInRowVal)
492
- // ? this.$isEmptyData(dftVal)
493
- // ? initDftVal
494
- // : dftVal
495
- // : dftInRowVal
490
+ // [column._key]: this.$isEmptyData(dftInRowVal)
491
+ // ? this.$isEmptyData(dftVal)
492
+ // ? initDftVal
493
+ // : dftVal
494
+ // : dftInRowVal
496
495
  });
497
496
  }, {});
498
497
  },
@@ -1180,7 +1179,7 @@ export default {
1180
1179
  e.stopPropagation();
1181
1180
  }
1182
1181
  }
1183
- });
1182
+ });
1184
1183
  },
1185
1184
  topSearchRender (h) {
1186
1185
  return this.searchFormList.length
@@ -1466,7 +1465,7 @@ export default {
1466
1465
  getRowDelBtnCanEdit (row, rowIndex) {
1467
1466
  return row.__readonly__ !== true && // 不能为只读数据
1468
1467
  (this.disabledDeleteDftRow ? row.__isDefault__ !== true : true) && // 默认数据可删除
1469
- (this.disabledDeleteOldRow ? row.__old__ !== true : true); // 老数据可删除
1468
+ (this.disabledDeleteOldRow ? row.__old__ !== true : true); // 老数据可删除
1470
1469
  },
1471
1470
  // 行内容是否可编辑
1472
1471
  getRowCanEdit (row, rowIndex) {
@@ -25,7 +25,6 @@ export default {
25
25
  // btnType: "errorText",
26
26
  // icon: "ios-trash-outline",
27
27
  // size: "small",
28
- // color: "#E83636",
29
28
  // disabled: false,
30
29
  // event: "clickDeleteChilds"
31
30
  // }
@@ -54,7 +54,7 @@
54
54
  }
55
55
 
56
56
  return {
57
- class: ["cancel", "linkText", "primaryText", "errorLine", "errorText", "primaryLine"].includes(defaultType) ? `ivu-btn-${defaultType}` : "",
57
+ class: ["cancel", "errorLine", "primaryLine", "linkText", "primaryText", "errorText"].includes(defaultType) ? `ivu-btn-${defaultType}` : "",
58
58
  ...this.propsObj,
59
59
  btnType: setType,
60
60
  customIcon: this.propsObj.customIcon ? `bico-font ${this.propsObj.customIcon}` : undefined