bri-components 1.3.88 → 1.3.89

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.88",
3
+ "version": "1.3.89",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -342,7 +342,7 @@ export default {
342
342
  /* ------ 工具方法 ------- */
343
343
  // 加工树形数据
344
344
  getCalcuedTree (treeData = [], cols = []) {
345
- const loop = (list = [], parentRow) =>
345
+ const loop = (list = [], parentRow, levelNum = 1) =>
346
346
  list.forEach((row) => {
347
347
  // 递归到叶子节点前 从上往下执行 要处理的
348
348
  cols.reduce((newRow, column) => {
@@ -365,7 +365,7 @@ export default {
365
365
 
366
366
  if (row.children && row.children.length) {
367
367
  row.isLeaf = false;
368
- loop(row.children, row);
368
+ loop(row.children, row, levelNum + 1);
369
369
 
370
370
  // 递归到叶子节点后到 从下往上执行 要处理的(非叶子节点)
371
371
  cols.reduce((newRow, column) => {
@@ -416,14 +416,15 @@ export default {
416
416
  }, row);
417
417
  }
418
418
 
419
- // 初次进来把前端存的状态值全部清除(除了__readonly__和__isQuote__不处理)
420
419
  if (this.initFlag) {
420
+ // TODO:修正数据level属性,后期可以删除
421
+ row.level = row.level || levelNum;
422
+
423
+ // 初次进来把前端存的状态值全部清除(除了__readonly__和__isQuote__不处理)
421
424
  this.deleteProperties.forEach(property => {
422
425
  delete row[property];
423
426
  });
424
-
425
427
  row.__old__ = true; // 老的数据都打上标记 尽管不一定会用
426
-
427
428
  // row.__isExpand__ = false;
428
429
  // row.__isSearchShow__ = false;
429
430
  // 第一级的需要显示出来