UNPKG

quick-admin-vue3-core

Version:

以快(计算机执行效率、开发效率)为核心的后台管理系统开发模板

67 lines (66 loc) 2.18 kB
import { defineComponent as g, computed as v, resolveComponent as s, createBlock as _, openBlock as m, unref as l, withCtx as d, createVNode as b, createElementBlock as k, Fragment as y, renderList as C, createTextVNode as w, toDisplayString as B } from "vue"; import { v as N, b5 as $ } from "./platform-DsTwHxm6.js"; const P = /* @__PURE__ */ g({ __name: "CombinationPath", props: { modelValue: {} }, emits: ["update:modelValue"], setup(f, { emit: h }) { const { formItem: r } = N(), i = f, x = $(), c = h; let n = v({ get() { if (!i.modelValue) return ""; const [a, ...t] = i.modelValue.slice(1).split("/"); return new Proxy( { root: a, path: "/" + t.join("/") }, { set(u, V, o) { const { root: e, path: p } = u; return console.log(e, p, "root-path--------"), o.startsWith("/") && (o = o.slice(1)), c("update:modelValue", `/${e}/${o}.vue`), r == null || r.validate("input"), !0; } } ); }, set(a) { c("update:modelValue", a); } }); return (a, t) => { const u = s("el-option"), V = s("el-select"), o = s("el-input"); return m(), _(o, { modelValue: l(n).path, "onUpdate:modelValue": t[1] || (t[1] = (e) => l(n).path = e), placeholder: "请输入路径,例:/auth/menu/Index", clearable: "" }, { prepend: d(() => [ b(V, { modelValue: l(n).root, "onUpdate:modelValue": t[0] || (t[0] = (e) => l(n).root = e), placeholder: "请选择", filterable: "", style: { width: "12em" } }, { default: d(() => [ (m(!0), k(y, null, C(l(x), (e, p) => (m(), _(u, { value: e.value, key: p }, { default: d(() => [ w(B(e.value), 1) ]), _: 2 }, 1032, ["value"]))), 128)) ]), _: 1 }, 8, ["modelValue"]) ]), _: 1 }, 8, ["modelValue"]); }; } }); export { P as default };