epic-designer-cjh
Version:
基于vue3的设计器,可视化开发页面表单
129 lines (128 loc) • 3.76 kB
JavaScript
import { defineComponent as h, ref as g, watch as m, computed as v, h as o, nextTick as U } from "vue";
import { d as V, m as l } from "./index-aabdecf2.js";
import { B as x } from "./index-0514f4b2.js";
import "./interopRequireDefault-40f894e3.js";
import "./typeof-88a201b1.js";
import "./public_api-1267ff2a.js";
import "./_commonjsHelpers-c5d32002.js";
import "./index.esm-56aac43a.js";
import "./index-2b6651fc.js";
import "./_vue_commonjs-external-eb7fec7f.js";
import "./useConfigInject-bc9599af.js";
import "./isPlainObject-527734d2.js";
import "./isObjectLike-4c09a3af.js";
import "./vue-types.m-289f467a.js";
import "./vue-types.m-76c57684.js";
import "./LoadingOutlined-93b8de63.js";
import "./ExclamationCircleFilled-873bbaab.js";
import "./CloseCircleFilled-268a9271.js";
import "./InfoCircleFilled-299f61de.js";
import "./index-b5b1eb67.js";
import "./CloseOutlined-e8461703.js";
import "./pickAttrs-bdc76c16.js";
import "./DownloadOutlined-9cd200ec.js";
import "./isEqual-b1699f9b.js";
import "./index-c3e64a00.js";
import "./omit-f0993d0d.js";
import "./_flatRest-b83a0ce4.js";
import "./index-e4f65aa1.js";
import "./wave-7dc199b4.js";
import "./raf-09a8b76f.js";
import "./classCallCheck-358ed622.js";
import "./EyeOutlined-a078ec1c.js";
import "./EyeOutlined-488be415.js";
import "./index-e810688f.js";
import "./index-09b69dcc.js";
import "./Portal-59ca1f55.js";
import "./vnode-8ae20ac3.js";
import "./ResizeObserver.es-df63660c.js";
import "./ResizeObserver.es-fc1a163b.js";
import "./colors-f65ae2e2.js";
import "./firstNotUndefined-ac7713f5.js";
import "./CheckOutlined-d3c8be7c.js";
import "./CheckOutlined-4bef68e3.js";
import "./useRefs-693840e3.js";
import "./collapseMotion-5cf5ac0f.js";
import "./useMergedState-a602e9b0.js";
import "./index-fac71ccf.js";
import "./Col-335609df.js";
import "./useFlexGapSupport-43e73827.js";
import "./index-816021be.js";
import "./index-97ce4605.js";
import "./FormItemContext-321b802f.js";
import "./index-cd8ad455.js";
const xt = h({
props: {
modelValue: {
type: Array,
default: () => []
}
},
emits: ["update:modelValue"],
setup(a, { emit: u, attrs: n }) {
const r = g([]);
m(r, (t) => {
u("update:modelValue", t);
}), m(
() => a.modelValue,
(t) => {
if (t != null && t.length > 0 && r.value != null) {
if (r.value === t)
return;
r.value.length = 0, r.value.push(...t);
}
},
{ deep: !0, immediate: !0 }
);
function s(t) {
U(() => {
r.value = t;
});
}
const d = (t) => {
var i, e;
if (t.file.status !== "uploading") {
if (t.file.status === "done") {
const p = (e = (i = t.file.response) == null ? void 0 : i.data) == null ? void 0 : e.url;
if (!t.file.url && !p) {
t.file.status = "error", l.error("上传失败");
return;
}
t.file.url = p;
}
t.file.status === "error" && l.error("upload error");
}
}, f = (t) => {
}, c = v(() => ({
...n,
"onUpdate:file-list": s,
"file-list": r.value,
"onBefore-upload": f,
onChange: d
}));
return () => o("div", null, {
default: () => [
o(V, c.value, {
default: () => [
o(
x,
{},
{
default: () => [
o("span", {
class: "iconfont epic-icon-shangchuan1",
style: { "margin-right": "2px" }
}),
o("span", null, { default: () => "上传文件" })
]
}
)
]
})
]
});
}
});
export {
xt as default
};