UNPKG

vuux

Version:

Vue3 Nuxt3 Nuxt4 组件库

32 lines (31 loc) 798 B
import { defineComponent as f, createElementBlock as u, openBlock as d, withModifiers as c, normalizeStyle as x, unref as r, renderSlot as S } from "vue"; import { useForm as g } from "./hook/useForm.mjs"; const b = /* @__PURE__ */ f({ name: "Form", __name: "index", props: { gap: { default: 18 }, model: {}, rules: {} }, emits: ["ok"], setup(n, { expose: m, emit: s }) { const e = n, p = s, { validate: a, onSubmit: o } = g(e, p); return m({ validate: a }), (i, t) => (d(), u("form", { class: "app-form", style: x(`gap: ${e.gap}px`), onSubmit: t[0] || (t[0] = c( //@ts-ignore (...l) => r(o) && r(o)(...l), ["prevent"] )) }, [ S(i.$slots, "default") ], 36)); } }); export { b as default };