epic-designer-cjh
Version:
基于vue3的设计器,可视化开发页面表单
142 lines (141 loc) • 4.23 kB
JavaScript
import { defineComponent as h, ref as g, watch as e, computed as v, h as o, nextTick as U } from "vue";
import { d as V, m as l } from "./index-7873b327.js";
import { B as x } from "./index-6b0e7bb1.js";
import "./interopRequireDefault-40f894e3.js";
import "./public_api-1267ff2a.js";
import "./typeof-88a201b1.js";
import "./_commonjsHelpers-c5d32002.js";
import "./index.esm-56aac43a.js";
import "./index-2b6651fc.js";
import "./_vue_commonjs-external-eb7fec7f.js";
import "./useConfigInject-d85d8c62.js";
import "./stylis-9146bd77.js";
import "./pickAttrs-8a877861.js";
import "./DownloadOutlined-9cd200ec.js";
import "./isEqual-b1699f9b.js";
import "./index-c3e64a00.js";
import "./isObjectLike-4c09a3af.js";
import "./omit-f0993d0d.js";
import "./_flatRest-b83a0ce4.js";
import "./isPlainObject-527734d2.js";
import "./LoadingOutlined-7a37e4f8.js";
import "./LoadingOutlined-93b8de63.js";
import "./AntdIcon-b29a156c.js";
import "./index-5a88efc4.js";
import "./index-62ef22df.js";
import "./isVisible-f22c1e3a.js";
import "./useState-f730f903.js";
import "./raf-dd6c1047.js";
import "./index-f96a976e.js";
import "./vue-types.m-289f467a.js";
import "./vue-types.m-76c57684.js";
import "./transition-d16825f8.js";
import "./compact-item-020b9c99.js";
import "./createContext-a42fe982.js";
import "./lodash-915646fb.js";
import "./EyeOutlined-7595d49c.js";
import "./EyeOutlined-488be415.js";
import "./index-0e1c5170.js";
import "./index-74b3b9ac.js";
import "./PortalWrapper-9d2c005f.js";
import "./vnode-45aa23d5.js";
import "./ResizeObserver.es-df63660c.js";
import "./ResizeObserver.es-fc1a163b.js";
import "./firstNotUndefined-57974c1b.js";
import "./colors-8180628c.js";
import "./index-977e4f68.js";
import "./CloseOutlined-ca523fbb.js";
import "./CloseOutlined-e8461703.js";
import "./CheckOutlined-7bbf15ee.js";
import "./CheckOutlined-4bef68e3.js";
import "./ExclamationCircleFilled-5348250c.js";
import "./ExclamationCircleFilled-873bbaab.js";
import "./CloseCircleFilled-9cec1aca.js";
import "./CloseCircleFilled-268a9271.js";
import "./useRefs-8fb1d76b.js";
import "./collapseMotion-cf2619c2.js";
import "./useMergedState-8adea16c.js";
import "./index-6bd43371.js";
import "./Col-dad05aa8.js";
import "./useFlexGapSupport-f3b1c137.js";
import "./index-816021be.js";
import "./index-97ce4605.js";
import "./FormItemContext-6c3deaca.js";
import "./index-cd8ad455.js";
import "./index-95f97c1c.js";
import "./InfoCircleFilled-299f61de.js";
const jt = h({
props: {
modelValue: {
type: Array,
default: () => []
}
},
emits: ["update:modelValue"],
setup(a, { emit: u, attrs: n }) {
const r = g([]);
e(r, (t) => {
u("update:modelValue", t);
}), e(
() => 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, p;
if (t.file.status !== "uploading") {
if (t.file.status === "done") {
const m = (p = (i = t.file.response) == null ? void 0 : i.data) == null ? void 0 : p.url;
if (!t.file.url && !m) {
t.file.status = "error", l.error("上传失败");
return;
}
t.file.url = m;
}
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 {
jt as default
};