Un format the last auto format. And fix the preventDefault console err

This commit is contained in:
Bill Richardson 2023-07-13 11:14:46 -04:00
parent 8c78204602
commit 526c34cd49

View file

@ -134,27 +134,27 @@ export default {
const { errorMessage, handleBlur, handleChange, meta, validate, errors } = const { errorMessage, handleBlur, handleChange, meta, validate, errors } =
useField(props.inputId, props.validationRules, fieldOptions); useField(props.inputId, props.validationRules, fieldOptions);
return { return {
errorMessage, errorMessage,
handleBlur, handleBlur,
handleChange, handleChange,
validate, validate,
meta, meta,
errors, errors,
}; };
}, },
methods: { methods: {
trimOnPaste(evt) { trimOnPaste(evt) {
evt.stopPropagation(); evt.stopPropagation();
preventDefault();
var data = null; var data = null;
if (evt.type === "paste") { if (evt.type === "paste") {
data = evt.clipboardData || window.clipboardData; data = evt.clipboardData || window.clipboardData;
} else if (evt.type === "drop") { } else if (evt.type === "drop") {
data = evt.dataTransfer; data = evt.dataTransfer;
} evt.preventDefault();
const value = data.getData("Text")?.trim(); }
const value = data.getData("Text")?.trim();
this.$emit("update:modelValue", value); this.$emit("update:modelValue", value);
}, },