bri-components 1.3.80 → 1.3.81

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.80",
3
+ "version": "1.3.81",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -188,7 +188,7 @@ export default {
188
188
  },
189
189
  on: {
190
190
  click: () => {
191
- this.clickCreate(this.operationMap.canCreate, row, rowIndex);
191
+ this.clickCreateChild(this.operationMap.canCreate, row, rowIndex);
192
192
  }
193
193
  }
194
194
  })
@@ -221,6 +221,10 @@ export default {
221
221
 
222
222
  // 点击 -添加一行
223
223
  clickCreate (operationItem, row, rowIndex) {
224
+
225
+ },
226
+ // 点击 -添加子行
227
+ clickCreateChild (operationItem, row, rowIndex) {
224
228
  const newRow = {
225
229
  ...this.$deepCopy(this.selfRowDefault),
226
230
  _id: this.$ObjectID().str,
@@ -248,6 +252,8 @@ export default {
248
252
 
249
253
  this.toggleExpand(row, true);
250
254
  }
255
+
256
+ this.change("createRow", null, newRow, row.children.length);
251
257
  },
252
258
  // 点击 -删除行
253
259
  clickDelete (operationItem, row, rowIndex) {
@@ -258,6 +264,8 @@ export default {
258
264
  const parentNode = this.getParentNode(row, this.data);
259
265
  const index = parentNode.children.findIndex(childNode => childNode._id === row._id);
260
266
  parentNode.children.splice(index, 1);
267
+
268
+ this.change("deleteRow", null, row, rowIndex);
261
269
  }
262
270
  });
263
271
  },
@@ -136,11 +136,11 @@ export default {
136
136
  canCreate: {
137
137
  name: "添加一行",
138
138
  type: "canCreate",
139
+ btnType: "default",
139
140
  size: "default",
140
141
  long: true,
141
142
  disabled: false,
142
- event: "clickCreate",
143
- btnType: "default"
143
+ event: "clickCreate"
144
144
  },
145
145
  canDelete: {
146
146
  name: "删除",