import { resolveComponent as a, openBlock as _, createBlock as v, withCtx as n, createVNode as o, createTextVNode as b } from "vue"; import { l as g, bv as k, U as C } from "./index2.js"; import { C as h } from "./index25.js"; const y = { name: "FormPage", props: { id: { type: String, default: "" } }, watch: { id: { handler(e) { this.props.id = e || this.id; }, immediate: !0 } }, data() { return { props: { id: "" }, form: { name: "", code: "" }, rules: { name: [{ required: !0, message: "请输入表单名称", trigger: "blur" }] } }; }, methods: { footCallback(e) { e === "cancel" && this.$router.go(-1); }, handSubmit() { this.$refs.form.validate().then((e) => { console.log("success", e); }).catch((e) => { console.log(e); }), this.$refs["group-form"].validate().then((e) => { console.log("success", e); }).catch((e) => { console.log(e); }); } }, mounted() { } }; function x(e, l, U, B, t, s) { const m = k, u = a("s-form-item"), f = a("s-form"), c = h, d = a("check-outlined"), i = C, p = a("s-form-layout"); return _(), v(p, { ref: "formLayout", title: "基础表单示例", subTitle: "", onFooterCallback: s.footCallback }, { form: n(() => [ o(c, { class: "mb-50", title: "表单列可设置为最多4列" }, { default: n(() => [ o(f, { model: t.form, rules: t.rules, ref: "form", layout: "horizontal", column: 4 }, { default: n(() => [ o(u, { label: "表单名称", name: "name" }, { default: n(() => [ o(m, { value: t.form.name, "onUpdate:value": l[0] || (l[0] = (r) => t.form.name = r) }, null, 8, ["value"]) ]), _: 1 }), o(u, { label: "表单编码", name: "code" }, { default: n(() => [ o(m, { value: t.form.code, "onUpdate:value": l[1] || (l[1] = (r) => t.form.code = r) }, null, 8, ["value"]) ]), _: 1 }), o(u, { label: "表单类型", name: "code" }, { default: n(() => [ o(m, { value: t.form.code, "onUpdate:value": l[2] || (l[2] = (r) => t.form.code = r) }, null, 8, ["value"]) ]), _: 1 }), o(u, { label: "表单状态", name: "code" }, { default: n(() => [ o(m, { value: t.form.code, "onUpdate:value": l[3] || (l[3] = (r) => t.form.code = r) }, null, 8, ["value"]) ]), _: 1 }), o(u, { label: "表单属性", name: "code" }, { default: n(() => [ o(m, { value: t.form.code, "onUpdate:value": l[4] || (l[4] = (r) => t.form.code = r) }, null, 8, ["value"]) ]), _: 1 }) ]), _: 1 }, 8, ["model", "rules"]) ]), _: 1 }) ]), footer: n(() => [ o(i, { type: "primary", onClick: s.handSubmit }, { default: n(() => [ o(d), l[5] || (l[5] = b("提交")) ]), _: 1 }, 8, ["onClick"]) ]), _: 1 }, 8, ["onFooterCallback"]); } const N = /* @__PURE__ */ g(y, [["render", x]]); export { N as default };