mirror of
https://github.com/ZeroCatDev/Classworks.git
synced 2026-03-21 09:13:10 +00:00
2 lines
855 B
JavaScript
2 lines
855 B
JavaScript
import{f as p,u as b,p as v,k as y}from"./vendor-vuetify-s-yw_Hr8.js";import{d as F,e as V}from"./VLabel-CU-8PdVS.js";import{D as h}from"./index-CFUCTEXJ.js";import{k,N as R,n as P,b as C}from"./vendor-vue-B2vxubPy.js";const D=v({...y(),...V()},"VForm"),w=p()({name:"VForm",props:D(),emits:{"update:modelValue":o=>!0,submit:o=>!0},setup(o,i){let{slots:s,emit:f}=i;const r=F(o),n=C();function l(t){t.preventDefault(),r.reset()}function u(t){const a=t,e=r.validate();a.then=e.then.bind(e),a.catch=e.catch.bind(e),a.finally=e.finally.bind(e),f("submit",a),a.defaultPrevented||e.then(c=>{var m;let{valid:d}=c;d&&((m=n.value)==null||m.submit())}),a.preventDefault()}return b(()=>{var t;return k("form",{ref:n,class:P(["v-form",o.class]),style:R(o.style),novalidate:!0,onReset:l,onSubmit:u},[(t=s.default)==null?void 0:t.call(s,r)])}),h(r,n)}});export{w as V};
|