UNPKG

epic-designer-cjh

Version:

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

124 lines (123 loc) 3.41 kB
import { p as m, C as g, u as v, e as h } from "./index-e2a664aa.js"; import { inject as x, computed as u, onBeforeMount as b, watchEffect as S } from "vue"; import { b$ as R } from "./index-97ce4605.js"; const y = "n", d = `.${y}-`, z = "__", M = "--", f = g(), p = m({ blockPrefix: d, elementPrefix: z, modifierPrefix: M }); f.use(p); const { c: s, find: A } = f, { cB: P, cE: H, cM: T, cNotM: _ } = p; function U(n) { return s(({ props: { bPrefix: o } }) => `${o || d}modal, ${o || d}drawer`, [n]); } function D(n) { return s(({ props: { bPrefix: o } }) => `${o || d}popover`, [n]); } function K(n) { return s(({ props: { bPrefix: o } }) => `&${o || d}modal`, n); } const L = (...n) => s(">", [P(...n)]), B = { fontFamily: 'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', fontFamilyMono: "v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace", fontWeight: "400", fontWeightStrong: "500", cubicBezierEaseInOut: "cubic-bezier(.4, 0, .2, 1)", cubicBezierEaseOut: "cubic-bezier(0, 0, .2, 1)", cubicBezierEaseIn: "cubic-bezier(.4, 0, 1, 1)", borderRadius: "3px", borderRadiusSmall: "2px", fontSize: "14px", fontSizeMini: "12px", fontSizeTiny: "12px", fontSizeSmall: "14px", fontSizeMedium: "14px", fontSizeLarge: "15px", fontSizeHuge: "16px", lineHeight: "1.6", heightMini: "16px", heightTiny: "22px", heightSmall: "28px", heightMedium: "34px", heightLarge: "40px", heightHuge: "46px" }, { fontSize: C, fontFamily: $, lineHeight: j } = B, O = s("body", ` margin: 0; font-size: ${C}; font-family: ${$}; line-height: ${j}; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; `, [s("input", ` font-family: inherit; font-size: inherit; `)]), k = R("n-config-provider"), E = "naive-ui-style", I = "n"; function W(n = {}, o = { defaultBordered: !0 }) { const e = x(k, null); return { // NConfigProvider, inlineThemeDisabled: e == null ? void 0 : e.inlineThemeDisabled, mergedRtlRef: e == null ? void 0 : e.mergedRtlRef, mergedComponentPropsRef: e == null ? void 0 : e.mergedComponentPropsRef, mergedBreakpointsRef: e == null ? void 0 : e.mergedBreakpointsRef, mergedBorderedRef: u(() => { var i, t; const { bordered: a } = n; return a !== void 0 ? a : (t = (i = e == null ? void 0 : e.mergedBorderedRef.value) !== null && i !== void 0 ? i : o.defaultBordered) !== null && t !== void 0 ? t : !0; }), mergedClsPrefixRef: u(() => (e == null ? void 0 : e.mergedClsPrefixRef.value) || I), namespaceRef: u(() => e == null ? void 0 : e.mergedNamespaceRef.value) }; } function V(n, o, e) { if (!o) return; const i = v(), t = u(() => { const { value: r } = o; if (!r) return; const l = r[n]; if (l) return l; }), a = () => { S(() => { const { value: r } = e, l = `${r}${n}Rtl`; if (h(l, i)) return; const { value: c } = t; c && c.style.mount({ id: l, head: !0, anchorMetaName: E, props: { bPrefix: r ? `.${r}-` : void 0 }, ssr: i }); }); }; return i ? a() : b(a), t; } export { P as a, H as b, s as c, B as d, T as e, _ as f, V as g, k as h, E as i, O as j, K as k, U as l, D as m, L as n, W as u };