bri-components 1.3.65 → 1.3.67

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.3.65",
3
+ "version": "1.3.67",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -686,7 +686,11 @@
686
686
  );
687
687
  }, [])
688
688
  .concat(
689
- subForm.map(subFormItem => (
689
+ subForm.filter(subFormItem =>
690
+ this.hideStatus === true
691
+ ? !this.hideColKeys.includes(subFormItem._key)
692
+ : true
693
+ ).map(subFormItem => (
690
694
  {
691
695
  ...subFormItem,
692
696
  nodeKey: treeForm[treeForm.length - 1]._key,
@@ -63,7 +63,7 @@ export default {
63
63
  maxHeight: this.contentHeight,
64
64
  // 通过实例方法 hideColumnsByKeys(keys)将列隐藏,通过实例方法 showColumnsByKeys(keys)将隐藏的列显示
65
65
  columnHiddenOption: {
66
- defaultHiddenColumnKeys: this.hideColKeys
66
+ defaultHiddenColumnKeys: [...this.hideColKeys] // 必须这么写,不解构,切换一次隐藏/显示后,hideColKeys会变成空数组
67
67
  },
68
68
  cellStyleOption: {
69
69
  bodyCellClass: ({ row, column, rowIndex }) => {
@@ -73,10 +73,10 @@ export default {
73
73
  : ""
74
74
  }` +
75
75
  `${this.isSearching
76
- ? !row.__isSearchShow__
76
+ ? row.__isSearchShow__ === false
77
77
  ? " bri-table-td-hide"
78
78
  : ""
79
- : !row.__isShow__
79
+ : row.__isShow__ === false
80
80
  ? " bri-table-td-hide"
81
81
  : this.isExpandAction
82
82
  ? " bri-table-td-visible"
@@ -395,7 +395,7 @@ export default {
395
395
  maxHeight: this.contentHeight,
396
396
  // 通过实例方法 hideColumnsByKeys(keys)将列隐藏,通过实例方法 showColumnsByKeys(keys)将隐藏的列显示
397
397
  columnHiddenOption: {
398
- defaultHiddenColumnKeys: [...this.hideColKeys]
398
+ defaultHiddenColumnKeys: [...this.hideColKeys] // 必须这么写,不解构,切换一次隐藏/显示后,hideColKeys会变成空数组
399
399
  },
400
400
  cellStyleOption: {
401
401
  bodyCellClass: ({ column, row, rowIndex }) => {
@@ -405,7 +405,7 @@ export default {
405
405
  : ""
406
406
  }` +
407
407
  `${this.isSearching
408
- ? !row.__isSearchShow__
408
+ ? row.__isSearchShow__ === false
409
409
  ? " bri-table-td-hide"
410
410
  : ""
411
411
  : ""
@@ -670,10 +670,12 @@ export default {
670
670
 
671
671
  /* ----------- 隐藏/显示字段 ---------- */
672
672
  toggleHideOrShow () {
673
- if (this.hideStatus === true) {
674
- this.$refs["briTable"].showColumnsByKeys(this.hideColKeys);
675
- } else {
676
- this.$refs["briTable"].hideColumnsByKeys(this.hideColKeys);
673
+ if (this.$refs["briTable"]) {
674
+ if (this.hideStatus === true) {
675
+ this.$refs["briTable"].showColumnsByKeys(this.hideColKeys);
676
+ } else {
677
+ this.$refs["briTable"].hideColumnsByKeys(this.hideColKeys);
678
+ }
677
679
  }
678
680
 
679
681
  this.hideStatus = !this.hideStatus;