epic-designer-gold 1.0.22 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{attributeView-CDoPoMy8.js → attributeView-BNUb6_IW.js} +1 -1
- package/dist/{attributeView-DLHntIVU.cjs → attributeView-DWt2LmYW.cjs} +1 -1
- package/dist/{index-DfC1M40-.cjs → index-8d-o3NGf.cjs} +1 -1
- package/dist/{index-C1svXxFR.cjs → index-BFvmsqbe.cjs} +1 -1
- package/dist/{index-S1s5EyEX.cjs → index-BHOIdcXu.cjs} +1 -1
- package/dist/{index-BgsV-cQ7.js → index-BUqQozMa.js} +1 -1
- package/dist/{index-DVF9HIIx.cjs → index-BVlZScLX.cjs} +1 -1
- package/dist/{index-CquiCjYl.js → index-C2a8y8Ga.js} +6 -5
- package/dist/{index-nn6_ml1n.cjs → index-CJwoNKC6.cjs} +1 -1
- package/dist/{index-DWgZA-Xt.cjs → index-CKwY7AEV.cjs} +1 -1
- package/dist/{index-DKq_URx5.js → index-CiD7TDSJ.js} +1 -1
- package/dist/index-CqmFt57U.js +4 -0
- package/dist/{index-BxQ1Bi2l.js → index-DMK88APm.js} +1 -1
- package/dist/{index-DNsJw-co.js → index-DOa-ZTwb.js} +1 -1
- package/dist/{index-tdTN310R.js → index-DOoGneHO.js} +1 -1
- package/dist/index-DiOxIVVT.cjs +1 -0
- package/dist/{index-C0J-aMmj.js → index-G5QRu6oQ.js} +1 -1
- package/dist/index-XixK3NVo.cjs +10 -0
- package/dist/{index-C7iW9KWi.cjs → index-gBxflsvp.cjs} +1 -1
- package/dist/index-rjUej4xS.js +43 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{selectPage-D4jGyEa2.js → selectPage-CzRf24Dg.js} +35 -32
- package/dist/selectPage-DPd8j93L.cjs +1 -0
- package/dist/style.css +1 -1
- package/dist/{styleView-DPlU1BR3.cjs → styleView-BCUpAdf3.cjs} +1 -1
- package/dist/{styleView-DxJ48VZG.js → styleView-C8AriP_c.js} +1 -1
- package/dist/ui/elementPlus/index.cjs +1 -1
- package/dist/ui/elementPlus/index.js +1 -1
- package/package.json +1 -1
- package/dist/index-B8ZkPwJG.cjs +0 -10
- package/dist/index-BAcDYc8e.cjs +0 -1
- package/dist/index-DVXcAkg5.js +0 -35
- package/dist/index-OVAyGpn1.js +0 -4
- package/dist/selectPage-Dy9Qj-zX.cjs +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent as m, ref as f, onMounted as v, openBlock as g, createElementBlock as V, createVNode as b, unref as n, isRef as k } from "vue";
|
|
2
|
+
import { p as t, E as c } from "./pluginManager-BCnrHPYv.js";
|
|
3
|
+
import { g as D } from "./index-C2a8y8Ga.js";
|
|
4
|
+
import { u as S } from "./index-B1s67XDZ.js";
|
|
5
|
+
const _ = { class: "" }, N = /* @__PURE__ */ m({
|
|
6
|
+
__name: "index",
|
|
7
|
+
props: {
|
|
8
|
+
tree: { type: Boolean },
|
|
9
|
+
modelValue: {},
|
|
10
|
+
dynamicId: {},
|
|
11
|
+
type: {}
|
|
12
|
+
},
|
|
13
|
+
emits: ["update:modelValue", "update:EOptionsEditor"],
|
|
14
|
+
setup(r, { emit: u }) {
|
|
15
|
+
const s = t.getComponent("select"), { t: p } = S(), i = r, l = f([]), a = D(i, "dynamicId", u);
|
|
16
|
+
return c.on("deleteSourceData", (e) => {
|
|
17
|
+
a.value === e && (a.value = "");
|
|
18
|
+
}), c.on("updateSource", (e) => {
|
|
19
|
+
console.log("%c [ ]-45", "font-size:13px; background:pink; color:#bf2c9f;", t.sourceData), l.value = t.sourceData.map((o) => ({
|
|
20
|
+
...o,
|
|
21
|
+
label: o.apiName,
|
|
22
|
+
value: o.id
|
|
23
|
+
}));
|
|
24
|
+
}), v(() => {
|
|
25
|
+
console.log("%c [ ]-55", "font-size:13px; background:pink; color:#bf2c9f;", t.sourceData), l.value = t.sourceData.map((e) => ({
|
|
26
|
+
...e,
|
|
27
|
+
label: e.apiName,
|
|
28
|
+
value: e.id
|
|
29
|
+
}));
|
|
30
|
+
}), (e, o) => (g(), V("div", _, [
|
|
31
|
+
b(n(s), {
|
|
32
|
+
modelValue: n(a),
|
|
33
|
+
"onUpdate:modelValue": o[0] || (o[0] = (d) => k(a) ? a.value = d : null),
|
|
34
|
+
placeholder: n(p)("pleaseSelectDataSource"),
|
|
35
|
+
clearable: "",
|
|
36
|
+
options: l.value
|
|
37
|
+
}, null, 8, ["modelValue", "placeholder", "options"])
|
|
38
|
+
]));
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
N as default
|
|
43
|
+
};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-XixK3NVo.cjs"),e=require("./pluginManager-DWHAX8kP.cjs");exports.EBuilder=a._sfc_main$1;exports.EDesigner=a._sfc_main$2;exports.ENode=a._sfc_main;exports.debounce=a.debounce;exports.getDarkState=a.getDarkState;exports.initStore=a.initStore;exports.useDark=a.useDark;exports.useElementDrag=a.useElementDrag;exports.useElementZoom=a.useElementZoom;exports.useKeyPress=a.useKeyPress;exports.usePageManager=a.usePageManager;exports.useRevoke=a.useRevoke;exports.useStore=a.useStore;exports.useTheme=a.useTheme;exports.useTimedQuery=a.useTimedQuery;exports.EventBus=e.EventBus;exports.PluginManager=e.PluginManager;exports.capitalizeFirstLetter=e.capitalizeFirstLetter;exports.convertKFormData=e.convertKFormData;exports.deepClone=e.deepClone;exports.deepCompareAndModify=e.deepCompareAndModify;exports.deepEqual=e.deepEqual;exports.findSchemaById=e.findSchemaById;exports.findSchemaInfoById=e.findSchemaInfoById;exports.findSchemas=e.findSchemas;exports.generateNewSchema=e.generateNewSchema;exports.getFormFields=e.getFormFields;exports.getFormSchemas=e.getFormSchemas;exports.getMatchedById=e.getMatchedById;exports.getUUID=e.getUUID;exports.getValueByPath=e.getValueByPath;exports.loadAsyncComponent=e.loadAsyncComponent;exports.mapSchemas=e.mapSchemas;exports.pluginManager=e.pluginManager;exports.recursionConvertedNode=e.recursionConvertedNode;exports.setValueByPath=e.setValueByPath;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as s, j as t, _ as r, f as o, o as n, p as d, n as m, c as u, e as i, m as g, k as c, l, u as h, h as p, a as f } from "./index-
|
|
1
|
+
import { i as s, j as t, _ as r, f as o, o as n, p as d, n as m, c as u, e as i, m as g, k as c, l, u as h, h as p, a as f } from "./index-C2a8y8Ga.js";
|
|
2
2
|
import { E as S, P as E, c as B, q as D, a as P, d as k, b as F, n as I, o as M, f as v, h as C, j as N, k as b, e as j, g as q, i as x, l as A, m as K, p as T, r as U, s as V } from "./pluginManager-BCnrHPYv.js";
|
|
3
3
|
export {
|
|
4
4
|
s as EBuilder,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as W, ref as u, watch as
|
|
2
|
-
import { a as
|
|
1
|
+
import { defineComponent as W, ref as u, watch as j, openBlock as D, createBlock as A, unref as F, withCtx as G, createElementBlock as Q, Fragment as X, renderList as Y, nextTick as ee } from "vue";
|
|
2
|
+
import { a as U } from "./axios-CXDYiOMX.js";
|
|
3
3
|
import { a as h } from "./index-B1s67XDZ.js";
|
|
4
4
|
import { ElSelect as ae, ElOption as le } from "element-plus";
|
|
5
5
|
import { _ as te } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -21,38 +21,40 @@ const oe = /* @__PURE__ */ W({
|
|
|
21
21
|
sourceDateUrl: { type: String, default: "" }
|
|
22
22
|
},
|
|
23
23
|
emits: ["update:modelValue", "update:modelValueLabel"],
|
|
24
|
-
setup(
|
|
25
|
-
const O = `paginated-select-dropdown-${Math.random().toString(36).slice(2, 8)}`, a =
|
|
26
|
-
|
|
24
|
+
setup(_, { emit: q }) {
|
|
25
|
+
const O = `paginated-select-dropdown-${Math.random().toString(36).slice(2, 8)}`, a = _;
|
|
26
|
+
console.log("%c [ ]-37", "font-size:13px; background:pink; color:#bf2c9f;", a.sourceDateUrl);
|
|
27
|
+
const k = q, v = u(a.modelValue);
|
|
28
|
+
j(
|
|
27
29
|
() => a.modelValue,
|
|
28
30
|
(e) => {
|
|
29
31
|
v.value = e;
|
|
30
32
|
}
|
|
31
|
-
),
|
|
32
|
-
|
|
33
|
+
), j(v, (e) => {
|
|
34
|
+
k("update:modelValue", e);
|
|
33
35
|
let l = n.value.find((t) => t.value === e);
|
|
34
|
-
|
|
36
|
+
k("update:modelValueLabel", {
|
|
35
37
|
label: l.label || a.defaultData.label,
|
|
36
38
|
value: l.value || a.defaultData.value
|
|
37
39
|
});
|
|
38
40
|
});
|
|
39
|
-
const n = u(a.defaultData && Object.keys(a.defaultData).length ? [a.defaultData] : []), s = u(!1),
|
|
40
|
-
function
|
|
41
|
-
n.value = [],
|
|
41
|
+
const n = u(a.defaultData && Object.keys(a.defaultData).length ? [a.defaultData] : []), s = u(!1), p = u(0), c = u(1), P = u(""), m = u(!1), i = u(null), f = u(null);
|
|
42
|
+
function T() {
|
|
43
|
+
n.value = [], p.value = 0, c.value = 1, m.value = !1;
|
|
42
44
|
}
|
|
43
45
|
async function g() {
|
|
44
|
-
var e, l, t, r,
|
|
45
|
-
if (!(s.value ||
|
|
46
|
+
var e, l, t, r, z, x, B, E, K, L;
|
|
47
|
+
if (!(s.value || m.value)) {
|
|
46
48
|
s.value = !0;
|
|
47
49
|
try {
|
|
48
|
-
const d = await
|
|
50
|
+
const d = await U({
|
|
49
51
|
url: o.value.url,
|
|
50
52
|
method: o.value.method,
|
|
51
53
|
data: o.value.body ? JSON.parse(o.value.body) : {},
|
|
52
54
|
params: o.value.params ? {
|
|
53
55
|
...JSON.parse(o.value.params),
|
|
54
56
|
[`${(l = (e = a == null ? void 0 : a.componentSchema) == null ? void 0 : e.componentProps) == null ? void 0 : l.pageKey}`]: c.value,
|
|
55
|
-
[`${(r = (t = a == null ? void 0 : a.componentSchema) == null ? void 0 : t.componentProps) == null ? void 0 : r.searchKey}`]:
|
|
57
|
+
[`${(r = (t = a == null ? void 0 : a.componentSchema) == null ? void 0 : t.componentProps) == null ? void 0 : r.searchKey}`]: P.value
|
|
56
58
|
} : {},
|
|
57
59
|
headers: {
|
|
58
60
|
...JSON.parse(o.value.headers),
|
|
@@ -64,16 +66,16 @@ const oe = /* @__PURE__ */ W({
|
|
|
64
66
|
}
|
|
65
67
|
});
|
|
66
68
|
if (o.value && o.value.dataPath) {
|
|
67
|
-
const Z = ((
|
|
68
|
-
|
|
69
|
-
const R =
|
|
70
|
-
let
|
|
71
|
-
c.value === 1 ? n.value =
|
|
69
|
+
const Z = ((z = o.value) == null ? void 0 : z.dataPath.split(".")).reduce((w, V) => w[V], d.data), C = (x = o.value) == null ? void 0 : x.dataPath.split(".");
|
|
70
|
+
C.pop();
|
|
71
|
+
const R = C.reduce((w, V) => w[V], d.data);
|
|
72
|
+
let N = b(Z, o.value.dataKey, o.value.dataValue);
|
|
73
|
+
c.value === 1 ? n.value = N : n.value = n.value.concat(N), p.value = R[(E = (B = a == null ? void 0 : a.componentSchema) == null ? void 0 : B.componentProps) == null ? void 0 : E.pageTotalKey];
|
|
72
74
|
} else {
|
|
73
75
|
let S = b(d.data, o.value.dataKey, o.value.dataValue);
|
|
74
|
-
c.value === 1 ? n.value = S : n.value = n.value.concat(S),
|
|
76
|
+
c.value === 1 ? n.value = S : n.value = n.value.concat(S), p.value = d.data[(L = (K = a == null ? void 0 : a.componentSchema) == null ? void 0 : K.componentProps) == null ? void 0 : L.pageTotalKey];
|
|
75
77
|
}
|
|
76
|
-
n.value.length >=
|
|
78
|
+
n.value.length >= p.value && (m.value = !0);
|
|
77
79
|
} catch (d) {
|
|
78
80
|
console.error("fetch error:", d);
|
|
79
81
|
} finally {
|
|
@@ -92,9 +94,10 @@ const oe = /* @__PURE__ */ W({
|
|
|
92
94
|
value: r[t] + ""
|
|
93
95
|
}) : [];
|
|
94
96
|
}
|
|
95
|
-
async function
|
|
97
|
+
async function I() {
|
|
96
98
|
var l, t;
|
|
97
|
-
|
|
99
|
+
console.log("%c [ ]-171", "font-size:13px; background:pink; color:#bf2c9f;", a.sourceDateUrl);
|
|
100
|
+
let e = await U({
|
|
98
101
|
url: a.sourceDateUrl,
|
|
99
102
|
method: "get",
|
|
100
103
|
params: {
|
|
@@ -110,12 +113,12 @@ const oe = /* @__PURE__ */ W({
|
|
|
110
113
|
});
|
|
111
114
|
e.data.code === 200 && (o.value = e.data.data);
|
|
112
115
|
}
|
|
113
|
-
|
|
116
|
+
I();
|
|
114
117
|
function $(e) {
|
|
115
|
-
|
|
118
|
+
P.value = e, c.value = 1, T(), g();
|
|
116
119
|
}
|
|
117
120
|
function J(e) {
|
|
118
|
-
e ? (
|
|
121
|
+
e ? (T(), g(), ee(() => setTimeout(M, 0))) : H();
|
|
119
122
|
}
|
|
120
123
|
function M() {
|
|
121
124
|
const e = document.querySelector(`.${O} .el-select-dropdown__wrap`);
|
|
@@ -130,16 +133,16 @@ const oe = /* @__PURE__ */ W({
|
|
|
130
133
|
}
|
|
131
134
|
function y() {
|
|
132
135
|
const e = i.value;
|
|
133
|
-
if (!e || s.value ||
|
|
136
|
+
if (!e || s.value || m.value) return;
|
|
134
137
|
e.scrollTop + e.clientHeight >= e.scrollHeight - 10 && (c.value++, g());
|
|
135
138
|
}
|
|
136
|
-
return (e, l) => (
|
|
139
|
+
return (e, l) => (D(), A(F(ae), {
|
|
137
140
|
modelValue: v.value,
|
|
138
141
|
"onUpdate:modelValue": l[0] || (l[0] = (t) => v.value = t),
|
|
139
142
|
filterable: "",
|
|
140
143
|
remote: "",
|
|
141
144
|
clearable: "",
|
|
142
|
-
placeholder:
|
|
145
|
+
placeholder: _.placeholder,
|
|
143
146
|
"remote-method": $,
|
|
144
147
|
loading: s.value,
|
|
145
148
|
teleported: !0,
|
|
@@ -148,7 +151,7 @@ const oe = /* @__PURE__ */ W({
|
|
|
148
151
|
style: { width: "100%" }
|
|
149
152
|
}, {
|
|
150
153
|
default: G(() => [
|
|
151
|
-
(
|
|
154
|
+
(D(!0), Q(X, null, Y(n.value, (t) => (D(), A(F(le), {
|
|
152
155
|
key: t.value,
|
|
153
156
|
label: t.label,
|
|
154
157
|
value: t.value
|
|
@@ -157,7 +160,7 @@ const oe = /* @__PURE__ */ W({
|
|
|
157
160
|
_: 1
|
|
158
161
|
}, 8, ["modelValue", "placeholder", "loading"]));
|
|
159
162
|
}
|
|
160
|
-
}), ie = /* @__PURE__ */ te(oe, [["__scopeId", "data-v-
|
|
163
|
+
}), ie = /* @__PURE__ */ te(oe, [["__scopeId", "data-v-dc041408"]]);
|
|
161
164
|
export {
|
|
162
165
|
ie as default
|
|
163
166
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),j=require("./axios-tuVKNgv9.cjs"),h=require("./index-BoL2PSBk.cjs"),C=require("element-plus"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Z=l.defineComponent({__name:"selectPage",props:{modelValue:[String,Number],placeholder:String,requestFn:{type:Function,default:()=>{}},valueKey:{type:String,default:"value"},labelKey:{type:String,default:"label"},pageSize:{type:Number,default:20},defaultData:{type:Object,default:()=>{}},componentSchema:{type:Object,default:()=>{}},sourceDateUrl:{type:String,default:""}},emits:["update:modelValue","update:modelValueLabel"],setup(k,{emit:N}){const D=`paginated-select-dropdown-${Math.random().toString(36).slice(2,8)}`,a=k;console.log("%c [ ]-37","font-size:13px; background:pink; color:#bf2c9f;",a.sourceDateUrl);const _=N,v=l.ref(a.modelValue);l.watch(()=>a.modelValue,e=>{v.value=e}),l.watch(v,e=>{_("update:modelValue",e);let t=r.value.find(o=>o.value===e);_("update:modelValueLabel",{label:t.label||a.defaultData.label,value:t.value||a.defaultData.value})});const r=l.ref(a.defaultData&&Object.keys(a.defaultData).length?[a.defaultData]:[]),s=l.ref(!1),p=l.ref(0),c=l.ref(1),O=l.ref(""),f=l.ref(!1),i=l.ref(null),m=l.ref(null);function P(){r.value=[],p.value=0,c.value=1,f.value=!1}async function g(){var e,t,o,u,x,B,T,q,z,E;if(!(s.value||f.value)){s.value=!0;try{const d=await j.axios({url:n.value.url,method:n.value.method,data:n.value.body?JSON.parse(n.value.body):{},params:n.value.params?{...JSON.parse(n.value.params),[`${(t=(e=a==null?void 0:a.componentSchema)==null?void 0:e.componentProps)==null?void 0:t.pageKey}`]:c.value,[`${(u=(o=a==null?void 0:a.componentSchema)==null?void 0:o.componentProps)==null?void 0:u.searchKey}`]:O.value}:{},headers:{...JSON.parse(n.value.headers),Authorization:"Bearer "+h.api.get("Admin-Token"),lang:h.api.get("saas-locale")||"zh-CN",zone:Intl.DateTimeFormat().resolvedOptions().timeZone}});if(n.value&&n.value.dataPath){const $=((x=n.value)==null?void 0:x.dataPath.split(".")).reduce((w,V)=>w[V],d.data),K=(B=n.value)==null?void 0:B.dataPath.split(".");K.pop();const H=K.reduce((w,V)=>w[V],d.data);let L=b($,n.value.dataKey,n.value.dataValue);c.value===1?r.value=L:r.value=r.value.concat(L),p.value=H[(q=(T=a==null?void 0:a.componentSchema)==null?void 0:T.componentProps)==null?void 0:q.pageTotalKey]}else{let S=b(d.data,n.value.dataKey,n.value.dataValue);c.value===1?r.value=S:r.value=r.value.concat(S),p.value=d.data[(E=(z=a==null?void 0:a.componentSchema)==null?void 0:z.componentProps)==null?void 0:E.pageTotalKey]}r.value.length>=p.value&&(f.value=!0)}catch(d){console.error("fetch error:",d)}finally{s.value=!1}}}const n=l.ref();function b(e,t,o){return e&&Object.prototype.toString.call(e)==="[object Array]"?e.map(u=>u.children&&u.children.length?{label:u[t],value:u[o]+"",children:b(u.children,t,o)}:{label:u[t],value:u[o]+""}):[]}async function A(){var t,o;console.log("%c [ ]-171","font-size:13px; background:pink; color:#bf2c9f;",a.sourceDateUrl);let e=await j.axios({url:a.sourceDateUrl,method:"get",params:{id:(o=(t=a==null?void 0:a.componentSchema)==null?void 0:t.componentProps)==null?void 0:o.dynamicId},headers:{Authorization:"Bearer "+h.api.get("Admin-Token"),lang:h.api.get("saas-locale")||"zh-CN",zone:Intl.DateTimeFormat().resolvedOptions().timeZone}});e.data.code===200&&(n.value=e.data.data)}A();function F(e){O.value=e,c.value=1,P(),g()}function U(e){e?(P(),g(),l.nextTick(()=>setTimeout(I,0))):M()}function I(){const e=document.querySelector(`.${D} .el-select-dropdown__wrap`);e?(i.value=e,e.addEventListener("scroll",y)):(m.value=new MutationObserver(()=>{const t=document.querySelector(".paginated-select-dropdown .el-select-dropdown__wrap");t&&(i.value=t,t.addEventListener("scroll",y),m.value.disconnect())}),m.value.observe(document.body,{childList:!0,subtree:!0}))}function M(){var e;i.value&&i.value.removeEventListener("scroll",y),(e=m.value)==null||e.disconnect()}function y(){const e=i.value;if(!e||s.value||f.value)return;e.scrollTop+e.clientHeight>=e.scrollHeight-10&&(c.value++,g())}return(e,t)=>(l.openBlock(),l.createBlock(l.unref(C.ElSelect),{modelValue:v.value,"onUpdate:modelValue":t[0]||(t[0]=o=>v.value=o),filterable:"",remote:"",clearable:"",placeholder:k.placeholder,"remote-method":F,loading:s.value,teleported:!0,onVisibleChange:U,"popper-class":D,style:{width:"100%"}},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.value,o=>(l.openBlock(),l.createBlock(l.unref(C.ElOption),{key:o.value,label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","loading"]))}}),R=J._export_sfc(Z,[["__scopeId","data-v-dc041408"]]);exports.default=R;
|