@tmagic/form 1.0.0-beta.6 → 1.0.0-beta.8

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.
@@ -264,9 +264,14 @@ const _sfc_main$s = defineComponent({
264
264
  };
265
265
  const onChangeHandler = async function(v, key2) {
266
266
  const { filter, onChange, trim, name: name2, dynamicKey } = props.config;
267
- let value = filterHandler(filter, v);
268
- value = await changeHandler(onChange, value) ?? value;
269
- value = trimHandler(trim, value) ?? value;
267
+ let value = v;
268
+ try {
269
+ value = filterHandler(filter, v);
270
+ value = await changeHandler(onChange, value) ?? value;
271
+ value = trimHandler(trim, value) ?? value;
272
+ } catch (e) {
273
+ console.error(e);
274
+ }
270
275
  if ((name2 || name2 === 0) && props.model !== value && (v !== value || props.model[name2] !== value)) {
271
276
  props.model[name2] = value;
272
277
  }
@@ -2986,6 +2991,7 @@ const _sfc_main$6 = defineComponent({
2986
2991
  remote,
2987
2992
  options,
2988
2993
  moreLoadingVisible,
2994
+ popperClass: mForm?.popperClass,
2989
2995
  getRequestFuc() {
2990
2996
  return getConfig("request");
2991
2997
  },
@@ -3039,6 +3045,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
3039
3045
  ref: "select",
3040
3046
  clearable: "",
3041
3047
  filterable: "",
3048
+ "popper-class": `m-select-popper ${_ctx.popperClass}`,
3042
3049
  size: _ctx.size,
3043
3050
  remote: _ctx.remote,
3044
3051
  placeholder: _ctx.config.placeholder,
@@ -3082,7 +3089,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
3082
3089
  ]) : createCommentVNode("", true)
3083
3090
  ]),
3084
3091
  _: 1
3085
- }, 8, ["modelValue", "size", "remote", "placeholder", "multiple", "value-key", "allow-create", "disabled", "remote-method", "onChange", "onVisibleChange"])), [
3092
+ }, 8, ["modelValue", "popper-class", "size", "remote", "placeholder", "multiple", "value-key", "allow-create", "disabled", "remote-method", "onChange", "onVisibleChange"])), [
3086
3093
  [_directive_loading, _ctx.loading]
3087
3094
  ]) : createCommentVNode("", true);
3088
3095
  }
@@ -3403,6 +3410,9 @@ const _sfc_main$1 = defineComponent({
3403
3410
  keyProp: {
3404
3411
  type: String,
3405
3412
  default: "__key"
3413
+ },
3414
+ popperClass: {
3415
+ type: String
3406
3416
  }
3407
3417
  },
3408
3418
  emits: ["change", "field-input", "field-change"],
@@ -3414,6 +3424,7 @@ const _sfc_main$1 = defineComponent({
3414
3424
  const requestFuc = getConfig("request");
3415
3425
  const formState = reactive({
3416
3426
  keyProp: props.keyProp,
3427
+ popperClass: props.popperClass,
3417
3428
  config: props.config,
3418
3429
  initValues: props.initValues,
3419
3430
  parentValues: props.parentValues,