bri-components 1.3.79 → 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.79",
3
+ "version": "1.3.81",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -338,6 +338,7 @@
338
338
  this.$emit("on-focus", event);
339
339
  },
340
340
  blur () {
341
+ this.focused = false;
341
342
  if (this.transferValue !== this.currentValue) {
342
343
  this.currentValue = this.transferValue;
343
344
  this.$emit("input", this.transferValue);
@@ -227,28 +227,30 @@
227
227
  }
228
228
 
229
229
  /* 为了消除表格类型字段检验后,外层出现.ivu-form-item-error的class,对默认筛选的控件样式的影响 */
230
- .ivu-input,
231
- .ivu-input-number,
232
- .ivu-select-selection,
233
- .DshControlInput {
234
- border-color: #E5E5E6;
230
+ > div {
231
+ .ivu-input,
232
+ .ivu-input-number,
233
+ .ivu-select-selection,
234
+ .DshControlInput {
235
+ border-color: #E5E5E6;
235
236
 
236
- &-focused,
237
- &:focus {
237
+ &-focused,
238
+ &:focus {
239
+ border-color: #64c6d1;
240
+ box-shadow: 0 0 0 2px rgba(61, 184, 197, 0.2);
241
+ }
242
+ &:hover {
243
+ border-color: #64c6d1;
244
+ }
245
+ }
246
+ .ivu-select-visible .ivu-select-selection {
238
247
  border-color: #64c6d1;
239
248
  box-shadow: 0 0 0 2px rgba(61, 184, 197, 0.2);
240
249
  }
241
- &:hover {
242
- border-color: #64c6d1;
250
+ .ivu-input-icon,
251
+ .ivu-select-arrow {
252
+ color: #808695;
243
253
  }
244
254
  }
245
- .ivu-select-visible .ivu-select-selection {
246
- border-color: #64c6d1;
247
- box-shadow: 0 0 0 2px rgba(61, 184, 197, 0.2);
248
- }
249
- .ivu-input-icon,
250
- .ivu-select-arrow {
251
- color: #808695;
252
- }
253
255
  }
254
256
  </style>
@@ -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: "删除",