bri-components 1.3.50 → 1.3.51

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.50",
3
+ "version": "1.3.51",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -122,7 +122,7 @@
122
122
  },
123
123
 
124
124
  showVal () {
125
- return `${this.curVal ? this.$getTreeLeafTotal(this.curVal.tree) : 0} 行`;
125
+ return `${this.curVal ? this.$getTreeLeafTotal(this.curVal.tree, this.showMode === "treeTable") : 0} 行`;
126
126
  }
127
127
  },
128
128
  created () {},
@@ -27,12 +27,12 @@ export default {
27
27
  this.data.forEach(item => {
28
28
  !item._id && this.$set(item, "_id", this.$ObjectID().str);
29
29
 
30
- if (!this.initFlag) {
30
+ if (this.initFlag) {
31
31
  item.__old__ = true; // 标记老数据(initFlag不用在data中声明)
32
32
  }
33
33
  });
34
34
 
35
- this.initFlag = true;
35
+ this.initFlag = false;
36
36
  return this.data;
37
37
  },
38
38
  footerData () {
@@ -699,8 +699,8 @@ export default {
699
699
  // 行按钮是否可编辑(删除按钮可编辑 不代表行内容是可编辑的)
700
700
  getRowBtnCanEdit (row) {
701
701
  return this.canEdit && // 是编辑状态
702
- (this.disabledOldDataRow ? !row.__old__ : true) && // 老数据行不置灰/置灰时是新增数据
703
- !row.__readonly__; // 不能为只读数据
702
+ (this.disabledOldDataRow ? row.__old__ !== true : true) && // 老数据行不置灰/置灰时是新增数据
703
+ row.__readonly__ !== true; // 不能为只读数据
704
704
  },
705
705
  // 行内容是否可编辑
706
706
  getRowCanEdit (row) {
@@ -727,11 +727,11 @@ export default {
727
727
  )
728
728
  : true
729
729
  ) &&
730
- (col._oldReadonly ? !row.__old__ : true) && // 老数据行里某些列不可编辑
731
- (row.__isQuote__ ? this.quoteDataCanEdit : true) && // 引用过来的数据是否可编辑
730
+ (col._oldReadonly ? row.__old__ !== true : true) && // 老数据行里某些列不可编辑
731
+ (row.__isQuote__ ? this.quoteDataCanEdit === true : true) && // 引用过来的数据是否可编辑
732
732
  col._enterType !== "calculate" && // 计算的不可编辑
733
733
  col._readonly !== true && // 不能为只读
734
- col.canEdit;
734
+ col.canEdit !== false; // 字段本身编辑权限 考虑为undefined时候
735
735
  },
736
736
  // 单元格最终编辑状态
737
737
  getUnitCanEdit (col, row) {