@varlet/ui 3.10.1 → 3.10.3

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.
@@ -283,7 +283,7 @@ import './tooltip/style/index.mjs'
283
283
  import './uploader/style/index.mjs'
284
284
  import './watermark/style/index.mjs'
285
285
 
286
- const version = '3.10.1'
286
+ const version = '3.10.3'
287
287
 
288
288
  function install(app) {
289
289
  ActionSheet.install && app.use(ActionSheet)
package/es/index.mjs CHANGED
@@ -188,7 +188,7 @@ export * from './tooltip/index.mjs'
188
188
  export * from './uploader/index.mjs'
189
189
  export * from './watermark/index.mjs'
190
190
 
191
- const version = '3.10.1'
191
+ const version = '3.10.3'
192
192
 
193
193
  function install(app) {
194
194
  ActionSheet.install && app.use(ActionSheet)
@@ -433,7 +433,7 @@ const __sfc__ = defineComponent({
433
433
  }
434
434
  }
435
435
  function handleClear() {
436
- const { disabled, readonly, multiple: multiple2, clearable, onClear } = props2;
436
+ const { disabled, readonly, multiple: multiple2, clearable, onClear, onChange } = props2;
437
437
  if ((form == null ? void 0 : form.disabled.value) || (form == null ? void 0 : form.readonly.value) || disabled || readonly || !clearable) {
438
438
  return;
439
439
  }
@@ -441,6 +441,8 @@ const __sfc__ = defineComponent({
441
441
  call(props2["onUpdate:modelValue"], changedModelValue);
442
442
  call(onClear, changedModelValue);
443
443
  validateWithTrigger("onClear");
444
+ call(onChange, changedModelValue);
445
+ validateWithTrigger("onChange");
444
446
  }
445
447
  function handleClick(e) {
446
448
  const { disabled, onClick } = props2;
@@ -451,20 +453,22 @@ const __sfc__ = defineComponent({
451
453
  validateWithTrigger("onClick");
452
454
  }
453
455
  function handleClose(text) {
454
- const { disabled, readonly, modelValue, onClose } = props2;
456
+ const { disabled, readonly, modelValue, onClose, onChange } = props2;
455
457
  if ((form == null ? void 0 : form.disabled.value) || (form == null ? void 0 : form.readonly.value) || disabled || readonly) {
456
458
  return;
457
459
  }
458
460
  const option = options.find(({ label: label2 }) => label2.value === text);
459
- const currentModelValue = modelValue.filter(
461
+ const changedModelValue = modelValue.filter(
460
462
  (value) => {
461
463
  var _a;
462
464
  return value !== ((_a = option.value.value) != null ? _a : option.label.value);
463
465
  }
464
466
  );
465
- call(props2["onUpdate:modelValue"], currentModelValue);
466
- call(onClose, currentModelValue);
467
+ call(props2["onUpdate:modelValue"], changedModelValue);
468
+ call(onClose, changedModelValue);
467
469
  validateWithTrigger("onClose");
470
+ call(onChange, changedModelValue);
471
+ validateWithTrigger("onChange");
468
472
  }
469
473
  function focus() {
470
474
  offsetY.value = toPxNum(props2.offsetY);