support form-id
This commit is contained in:
@@ -12,6 +12,11 @@ const props = defineProps({
|
|||||||
type: Object,
|
type: Object,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
formId: {
|
||||||
|
type: String,
|
||||||
|
default: "form",
|
||||||
|
required: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const emits = defineEmits(["submit", "failedValidation"]);
|
const emits = defineEmits(["submit", "failedValidation"]);
|
||||||
|
|
||||||
@@ -26,7 +31,7 @@ const handleSubmit = async function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
provide("form", props.modelValue);
|
provide(props.formId, props.modelValue);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
Reference in New Issue
Block a user