dfish-widget 1.0.98 → 1.0.99

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/lib/index.esm.js CHANGED
@@ -7619,7 +7619,16 @@ const {leafSymbol: leafSymbol$1} = $$1.symbol;
7619
7619
  onclick: e => {
7620
7620
  if (this.isNormal) {
7621
7621
  this.indeterminate = false;
7622
- } else e.preventDefault();
7622
+ if (this.x.cancelable && this.isChecked) {
7623
+ e.preventDefault();
7624
+ this.val(false);
7625
+ setTimeout(() => {
7626
+ this.$refs.v.checked = false;
7627
+ });
7628
+ }
7629
+ } else {
7630
+ e.preventDefault();
7631
+ }
7623
7632
  },
7624
7633
  onchange: this.onchange,
7625
7634
  ...this.input_prop,
@@ -9870,6 +9879,7 @@ var script$j = {
9870
9879
  name: 'w-radio',
9871
9880
  pubParentName: 'w-radiogroup',
9872
9881
  mixins: [script$A],
9882
+ props: ['cancelable'],
9873
9883
  methods: {
9874
9884
 
9875
9885
  },
@@ -11371,7 +11381,7 @@ var script$b = {
11371
11381
  return {
11372
11382
  showDrop: false,
11373
11383
  currentDate: null,
11374
- focusValue: null,
11384
+ lastValue: null,
11375
11385
  placeholder_type: 'placeholder_select',
11376
11386
  }
11377
11387
  },
@@ -11397,7 +11407,7 @@ var script$b = {
11397
11407
  return true
11398
11408
  },
11399
11409
  onfocus(e) {
11400
- this.focusValue = this.x.modelValue;
11410
+ this.lastValue = this.x.modelValue;
11401
11411
  this.baseFocus(e);
11402
11412
  },
11403
11413
  onkeyup() {
@@ -11420,7 +11430,7 @@ var script$b = {
11420
11430
  let v = this.x.modelValue;
11421
11431
  if (v) {
11422
11432
  if (!this.isUsableVal(v)) {
11423
- this.x.autoFix && this.val(this.focusValue);
11433
+ this.x.autoFix && this.val(this.lastValue);
11424
11434
  } else {
11425
11435
  let re = /\b(\d)\b/g;
11426
11436
  if (re.test(v)) {
@@ -11597,6 +11607,18 @@ var script$b = {
11597
11607
  'z-clearable': this.x.clearable,
11598
11608
  }
11599
11609
  }
11610
+ },
11611
+ mounted() {
11612
+ this.$watch('modelValue', (v) => {
11613
+ if (this.x.autoFix && v && (v = $$1.strTrim(v))) {
11614
+ if (!$$1.dateValid(v, this.x.format)) {
11615
+ let d = $$1.dateParse(v, this.x.format);
11616
+ v = $$1.dateFormat(d, this.x.format);
11617
+ this.val(v);
11618
+ }
11619
+ this.lastValue = v;
11620
+ }
11621
+ }, {immediate: true});
11600
11622
  }
11601
11623
  };
11602
11624
 
@@ -13083,6 +13105,7 @@ var script = {
13083
13105
  let v = (dist / (bar.width)) * (this.x.maxValue - this.x.minValue);
13084
13106
  v = $$1.numRange(v, this.x.minValue, this.x.maxValue);
13085
13107
  this.val(v);
13108
+ this.trigger('drop', v);
13086
13109
  }
13087
13110
  },
13088
13111
  html_input() {