bri-components 1.4.4 → 1.4.5

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.4.4",
3
+ "version": "1.4.5",
4
4
  "author": "dengshanghui",
5
5
  "description": "a component lib for vue project",
6
6
  "main": "src/index.js",
@@ -330,6 +330,14 @@
330
330
  this.$emit("input", val);
331
331
  this.$emit("on-change", val);
332
332
  this.dispatch("FormItem", "on-form-change", val);
333
+ } else {
334
+ clearTimeout(this.timer);
335
+ this.timer = setTimeout(() => {
336
+ this.currentValue = val;
337
+ this.$emit("input", val);
338
+ this.$emit("on-change", val);
339
+ this.dispatch("FormItem", "on-form-change", val);
340
+ }, 600);
333
341
  }
334
342
  });
335
343
  },
@@ -340,10 +348,6 @@
340
348
  blur () {
341
349
  this.focused = false;
342
350
  if (this.transferValue !== this.currentValue) {
343
- this.currentValue = this.transferValue;
344
- this.$emit("input", this.transferValue);
345
- this.$emit("on-change", this.transferValue);
346
- this.dispatch("FormItem", "on-form-change", this.transferValue);
347
351
  this.focused = false;
348
352
  this.$emit("on-blur");
349
353
  if (!findComponentUpward(this, ["DatePicker", "TimePicker", "Cascader", "Search"])) {
@@ -364,6 +368,7 @@
364
368
  if (event.type == "change" && this.activeChange) return;
365
369
 
366
370
  if (event.type == "input" && !this.activeChange) return;
371
+
367
372
  let val = event.target.value.trim();
368
373
  if (this.parser) {
369
374
  val = this.parser(val);