UNPKG

epic-designer-cjh

Version:

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

79 lines (78 loc) 1.95 kB
import { defineComponent as f, ref as h, watch as r, computed as g, h as l, nextTick as v } from "vue"; import { n as E, t as F } from "./index-ef10270f.js"; import { E as U } from "./index-d07ec27c.js"; import "./index-97ce4605.js"; import "./isNil-8ef0e4b6.js"; import "./index-da336cb2.js"; import "./cloneDeep-aa0cb853.js"; import "./isEqual-eac09a18.js"; import "./_baseIsEqual-2f2ed312.js"; import "./use-global-config-0bac757e.js"; import "./use-form-item-5dfea179.js"; import "./index-2b6651fc.js"; const P = f({ props: { modelValue: { type: Array, default: () => [] } }, emits: ["update:modelValue"], setup(n, { emit: u, attrs: p }) { const o = h([]); r(o, (e) => { u("update:modelValue", e); }), r( () => n.modelValue, (e) => { if (e != null && e.length > 0 && o.value != null) { if (o.value === e) return; o.value.length = 0, o.value.push(...e); } }, { deep: !0, immediate: !0 } ); const i = (e, t) => { v(() => { o.value = t; }); }, s = (e) => { }, d = (e, t, a) => { console.log(a); }, m = (e, t, a) => { F.error("上传失败"), console.error(e); }, c = g(() => ({ ...p, "file-list": o.value, onBeforeUpload: s, onChange: i, onSuccess: d, onError: m })); return () => l("div", null, { default: () => [ l(E, c.value, { default: () => [ l( U, {}, { default: () => [ l("span", { class: "iconfont epic-icon-shangchuan1", style: { "margin-right": "2px" } }), l("span", null, { default: () => "上传文件" }) ] } ) ] }) ] }); } }); export { P as default };