@tmagic/form 1.0.0-beta.4 → 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.
@@ -267,9 +267,14 @@
267
267
  };
268
268
  const onChangeHandler = async function(v, key2) {
269
269
  const { filter, onChange, trim, name: name2, dynamicKey } = props.config;
270
- let value = filterHandler(filter, v);
271
- value = await changeHandler(onChange, value) ?? value;
272
- value = trimHandler(trim, value) ?? value;
270
+ let value = v;
271
+ try {
272
+ value = filterHandler(filter, v);
273
+ value = await changeHandler(onChange, value) ?? value;
274
+ value = trimHandler(trim, value) ?? value;
275
+ } catch (e) {
276
+ console.error(e);
277
+ }
273
278
  if ((name2 || name2 === 0) && props.model !== value && (v !== value || props.model[name2] !== value)) {
274
279
  props.model[name2] = value;
275
280
  }
@@ -2989,6 +2994,7 @@
2989
2994
  remote,
2990
2995
  options,
2991
2996
  moreLoadingVisible,
2997
+ popperClass: mForm?.popperClass,
2992
2998
  getRequestFuc() {
2993
2999
  return getConfig("request");
2994
3000
  },
@@ -3042,6 +3048,7 @@
3042
3048
  ref: "select",
3043
3049
  clearable: "",
3044
3050
  filterable: "",
3051
+ "popper-class": `m-select-popper ${_ctx.popperClass}`,
3045
3052
  size: _ctx.size,
3046
3053
  remote: _ctx.remote,
3047
3054
  placeholder: _ctx.config.placeholder,
@@ -3085,7 +3092,7 @@
3085
3092
  ]) : vue.createCommentVNode("", true)
3086
3093
  ]),
3087
3094
  _: 1
3088
- }, 8, ["modelValue", "size", "remote", "placeholder", "multiple", "value-key", "allow-create", "disabled", "remote-method", "onChange", "onVisibleChange"])), [
3095
+ }, 8, ["modelValue", "popper-class", "size", "remote", "placeholder", "multiple", "value-key", "allow-create", "disabled", "remote-method", "onChange", "onVisibleChange"])), [
3089
3096
  [_directive_loading, _ctx.loading]
3090
3097
  ]) : vue.createCommentVNode("", true);
3091
3098
  }
@@ -3406,6 +3413,9 @@
3406
3413
  keyProp: {
3407
3414
  type: String,
3408
3415
  default: "__key"
3416
+ },
3417
+ popperClass: {
3418
+ type: String
3409
3419
  }
3410
3420
  },
3411
3421
  emits: ["change", "field-input", "field-change"],
@@ -3417,6 +3427,7 @@
3417
3427
  const requestFuc = getConfig("request");
3418
3428
  const formState = vue.reactive({
3419
3429
  keyProp: props.keyProp,
3430
+ popperClass: props.popperClass,
3420
3431
  config: props.config,
3421
3432
  initValues: props.initValues,
3422
3433
  parentValues: props.parentValues,