UNPKG

epic-designer-cjh

Version:

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

106 lines (105 loc) 3.05 kB
import { defineComponent as f, ref as h, watch as p, h as i, nextTick as g } from "vue"; import { N } from "./Upload-4254b22d.js"; import { N as V } from "./Button-e71f72ac.js"; import "./index-97ce4605.js"; import "./resolve-slot-d8544b74.js"; import "./Icon-6fe59076.js"; import "./use-rtl-d05cb593.js"; import "./index-e2a664aa.js"; import "./use-style-b9e822e4.js"; import "./FadeInExpandTransition-596a1c51.js"; import "./format-length-59d2d3ae.js"; import "./fade-in-scale-up.cssr-104df6e0.js"; import "./flatten-3c263333.js"; import "./replaceable-3545da1a.js"; import "./_baseSlice-4d543985.js"; import "./light-76d75dc8.js"; import "./isArrayLikeObject-e5e231b4.js"; import "./_overRest-dc82ce77.js"; import "./index-4562f02c.js"; import "./index-b826a2e2.js"; import "./use-false-until-truthy-cceb153b.js"; import "./index-f636e660.js"; import "./delegate-6e021bb9.js"; import "./create-key-76a2bf3d.js"; import "./use-memo-01b53d71.js"; import "./index-ea4aeba0.js"; import "./use-is-mounted-a0b9f33e.js"; import "./_baseIteratee-9edfdc6e.js"; import "./_baseIsEqual-2f2ed312.js"; import "./hasIn-b4ac620c.js"; import "./clickoutside-3b4c9484.js"; import "./mousemoveoutside-95e23ec7.js"; import "./use-merged-state-7348d957.js"; import "./icon-switch.cssr-d74fe364.js"; import "./fade-in-height-expand.cssr-52e7384f.js"; import "./use-form-item-4d43edfb.js"; const to = f({ props: { modelValue: { type: Array, default: () => [] } }, emits: ["update:modelValue"], setup(e, { emit: a, attrs: m }) { const t = h([]); p(t, (o) => { a("update:modelValue", o); }), p( () => e.modelValue, (o) => { if (o != null && o.length > 0 && t.value != null) { if (t.value === o) return; t.value.length = 0, t.value.push(...o); } }, { deep: !0, immediate: !0 } ); function n(o) { console.log("onChange called->", o), g(() => { t.value = o; }); } const u = ({ file: o, event: r }) => { console.log("OnError called->", o, r); }, s = ({ file: o, event: r }) => { var l; console.log("OnFinish called->", o, r); const d = r == null ? void 0 : r.target, c = JSON.parse(d.response ?? "{}"); o.url = (l = c.data) == null ? void 0 : l.url; }; return () => i("div", null, { default: () => [ i(N, { ...m, "onUpdate:file-list": n, "file-list": t.value, onError: u, onFinish: s, "default-upload": !0 }, { default: () => [ i( V, {}, { default: () => [ i("span", { class: "iconfont epic-icon-shangchuan1", style: { "margin-right": "2px" } }), i("span", null, { default: () => "上传文件" }) ] } ) ] }) ] }); } }); export { to as default };