bri-components 1.3.96 → 1.3.98

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.
@@ -13,6 +13,7 @@ export default {
13
13
  selfPropsObj () {
14
14
  return {
15
15
  _treeForm: [],
16
+ ...(this.typePropsObj || {}),
16
17
  ...this.commonPropsObj,
17
18
 
18
19
  _maxLevel: this.commonPropsObj._maxLevel || 3 // 最大级数
@@ -56,7 +57,7 @@ export default {
56
57
  : list.length;
57
58
  list.splice(newRowIndex, 0, newRow);
58
59
 
59
- this.change("createRow", null, newRow, newRowIndex);
60
+ this.change("createRow", newRow, newRowIndex, null);
60
61
  },
61
62
  // 节点操作 -添加子行
62
63
  clickCreateChild (operationItem, row, rowIndex, col) {
@@ -68,7 +69,7 @@ export default {
68
69
  // 展开子级
69
70
  this.toggleExpand(row, true);
70
71
 
71
- this.change("createChildRow", null, newRow, newRowIndex);
72
+ this.change("createChildRow", newRow, newRowIndex, null);
72
73
  },
73
74
  // 节点操作 -删除行
74
75
  clickDelete (operationItem, row, rowIndex, col) {
@@ -80,7 +81,7 @@ export default {
80
81
  const index = parentRow.children.findIndex(childRowItem => childRowItem._id === row._id);
81
82
  parentRow.children.splice(index, 1);
82
83
 
83
- this.change("deleteRow", null, row, rowIndex);
84
+ this.change("deleteRow", row, rowIndex, null);
84
85
  }
85
86
  });
86
87
  },
@@ -88,11 +89,11 @@ export default {
88
89
  clickDeleteChilds (operationItem, row, rowIndex, col) {
89
90
  this.$Modal.confirm({
90
91
  title: "警告",
91
- content: "确定删除该行及其所有下级吗?",
92
+ content: "确定删除所有下级吗?",
92
93
  onOk: () => {
93
94
  row.children.splice(0);
94
95
 
95
- this.change("deleteChildRows", null, row, rowIndex);
96
+ this.change("deleteChildRows", row, rowIndex, null);
96
97
  }
97
98
  });
98
99
  },
@@ -1,15 +1,15 @@
1
1
  <template>
2
2
  <div class="DshListUnit">
3
- <template v-if="formItem._type === 'index'">
3
+ <template v-if="selfFormItem._type === 'index'">
4
4
  <span>{{ indexStr || rowIndex + 1 }}</span>
5
5
  </template>
6
6
 
7
- <template v-else-if="formItem.render">
7
+ <template v-else-if="selfFormItem.render">
8
8
  <dsh-list-render
9
- :column="formItem"
9
+ :column="selfFormItem"
10
10
  :row="formData"
11
11
  :index="rowIndex"
12
- :render="formItem.render"
12
+ :render="selfFormItem.render"
13
13
  ></dsh-list-render>
14
14
  </template>
15
15
 
@@ -19,7 +19,7 @@
19
19
  :canEdit="canEdit"
20
20
  :value="formData"
21
21
  :propsObj="{
22
- ...formItem,
22
+ ...selfFormItem,
23
23
  size: 'default',
24
24
  inTable: true
25
25
  }"
@@ -59,6 +59,10 @@ export default {
59
59
  computed: {
60
60
  curComponentName () {
61
61
  return componentNameMap[this.formItem._type] || "DshUndeveloped";
62
+ },
63
+
64
+ selfFormItem () {
65
+ return this.$transformDynamicProperty(this.formItem, this.formData, this.parentObj);
62
66
  }
63
67
  },
64
68
  created () { },
@@ -123,7 +123,7 @@ const transformToColumns = function (form, {
123
123
  }
124
124
  : undefined
125
125
  : undefined,
126
- renderHeaderCell: ({ row, column }, h) => {
126
+ renderHeaderCell: ({ column }, h) => {
127
127
  return getHeadRender(h, column, {
128
128
  showRequired,
129
129
  showDescription,