UNPKG

epic-designer-cjh

Version:

基于vue3的设计器,可视化开发页面表单

82 lines (81 loc) 2.19 kB
import { defineComponent as m, inject as h, computed as r, openBlock as g, createBlock as $, resolveDynamicComponent as N, normalizeClass as _, unref as p, normalizeStyle as j, withCtx as x, renderSlot as C } from "vue"; import { a5 as v, a6 as o, bs as u, a9 as O, aK as f, bw as E, ag as w, aF as k } from "./index-97ce4605.js"; import { r as K } from "./constants-669e1a5f.js"; const S = v({ tag: { type: String, default: "div" }, span: { type: Number, default: 24 }, offset: { type: Number, default: 0 }, pull: { type: Number, default: 0 }, push: { type: Number, default: 0 }, xs: { type: o([Number, Object]), default: () => u({}) }, sm: { type: o([Number, Object]), default: () => u({}) }, md: { type: o([Number, Object]), default: () => u({}) }, lg: { type: o([Number, Object]), default: () => u({}) }, xl: { type: o([Number, Object]), default: () => u({}) } }), B = m({ name: "ElCol" }), P = /* @__PURE__ */ m({ ...B, props: S, setup(b) { const s = b, { gutter: n } = h(K, { gutter: r(() => 0) }), a = O("col"), d = r(() => { const e = {}; return n.value && (e.paddingLeft = e.paddingRight = `${n.value / 2}px`), e; }), i = r(() => { const e = []; return ["span", "offset", "pull", "push"].forEach((t) => { const l = s[t]; f(l) && (t === "span" ? e.push(a.b(`${s[t]}`)) : l > 0 && e.push(a.b(`${t}-${s[t]}`))); }), ["xs", "sm", "md", "lg", "xl"].forEach((t) => { f(s[t]) ? e.push(a.b(`${t}-${s[t]}`)) : E(s[t]) && Object.entries(s[t]).forEach(([l, c]) => { e.push(l !== "span" ? a.b(`${t}-${l}-${c}`) : a.b(`${t}-${c}`)); }); }), n.value && e.push(a.is("guttered")), [a.b(), e]; }); return (e, y) => (g(), $(N(e.tag), { class: _(p(i)), style: j(p(d)) }, { default: x(() => [ C(e.$slots, "default") ]), _: 3 }, 8, ["class", "style"])); } }); var D = /* @__PURE__ */ w(P, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/col/src/col.vue"]]); const T = k(D); export { T as E, S as c };