hflvcomp 0.0.1
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/README.md +5 -0
- package/dist/hflvcomp.es.js +2360 -0
- package/dist/vite.svg +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1,2360 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('@charset "UTF-8";.subpage-container[data-v-a66fa401]{display:flex;align-items:center;margin:0;overflow:hidden}.subpage-container[data-v-3deb553c]{padding:0;display:flex;align-items:center}.picture-container[data-v-f733b313]{overflow:hidden}.svg-container[data-v-ecab498d]{width:100%;height:100%}.svg-container svg[data-v-ecab498d]{width:100%;height:100%}.svg-container[data-v-61179794]{width:100%;height:100%;cursor:pointer}.svg-container svg[data-v-61179794]{width:100%;height:100%}.svg-container[data-v-0a8a6304]{width:100%;height:100%;cursor:pointer}.svg-container svg[data-v-0a8a6304]{width:100%;height:100%}.svg-container[data-v-7dcb2081]{width:100%;height:100%}.svg-container svg[data-v-7dcb2081]{width:100%;height:100%}.svg-container[data-v-cc066efb]{width:100%;height:100%}.svg-container svg[data-v-cc066efb]{width:100%;height:100%}.svg-container[data-v-aec13cc0]{width:100%;height:100%}.svg-container svg[data-v-aec13cc0]{width:100%;height:100%}.svg-container[data-v-cddc7262]{width:100%;height:100%}.svg-container svg[data-v-cddc7262]{width:100%;height:100%}.svg-container[data-v-3afa4979]{width:100%;height:100%;cursor:pointer}.svg-container svg[data-v-3afa4979]{width:100%;height:100%}.svg-container[data-v-0559f0da]{width:100%;height:100%;cursor:pointer}.svg-container svg[data-v-0559f0da]{width:100%;height:100%}.svg-container[data-v-78f636ae]{width:100%;height:100%}.svg-container svg[data-v-78f636ae]{width:100%;height:100%}.svg-container[data-v-82417625]{width:100%;height:100%}.svg-container svg[data-v-82417625]{width:100%;height:100%}.svg-container[data-v-56539202]{width:100%;height:100%}.svg-container svg[data-v-56539202]{width:100%;height:100%}.svg-container[data-v-56539202] .svg-first-color{fill:var(--custom-first-color)!important}.svg-container[data-v-56539202] .svg-second-color{fill:var(--custom-second-color)!important}.svg-container[data-v-56539202] .svg-third-color{fill:var(--custom-third-color)!important}.svg-container[data-v-56539202] .svg-four-color{fill:var(--custom-four-color)!important}.svg-container[data-v-56539202] .svg-five-color{fill:var(--custom-five-color)!important}.canvas-grid-container[data-v-6480756a]{width:100%;height:100%;overflow:hidden}.grid-container[data-v-dced3ee3]{width:100%;height:100%}')),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
+
import { inject as Ue, resolveComponent as De, createElementBlock as M, openBlock as A, normalizeStyle as Ee, createVNode as be, ref as _, computed as p, watch as k, provide as Pe, onBeforeMount as K, onMounted as N, onBeforeUnmount as G, onUnmounted as U, Fragment as Xe, renderList as qe, createBlock as He, KeepAlive as Ye, createCommentVNode as ue, createElementVNode as ne, reactive as Oe, withCtx as Ae, createTextVNode as se, toDisplayString as ge, nextTick as ye } from "vue";
|
|
3
|
+
import { CommonUtils as z, useDataCacheStore as Z, createSmartAccessor as $, CreateCompContext as X, useEventHandler as q } from "hflvloader";
|
|
4
|
+
import { useRouter as Y, useRoute as J } from "vue-router";
|
|
5
|
+
(function() {
|
|
6
|
+
const r = () => {
|
|
7
|
+
console.log("%c 可视化组件库 hflvcomp", "color: #3498db; font-size: 16px; font-weight: bold;"), console.log("%c版本号: 0.0.1", "color: #2ecc71;"), console.log("%c编译日期: 2025/12/11 13:30:22", "color: #3498db;"), console.log("%c版权声明:", "color: #e74c3c; font-weight: bold;"), console.log("%c 1. 版权完全归qbansanguo享有。", "color: #34495e;"), console.log("%c 2. 程序包完整引用,不得以任何形式破解、裁剪,不得隐藏或删除版权信息。", "color: #34495e;"), console.log("%c 3. 保留此版权信息在控制台输出。", "color: #34495e;"), console.log("%c 版权所有 ©2024-2025 qbansanguo 保留对此版权信息的最终解释权.", "color: #f39c12;"), console.log("%c Copyright ©2024-2025 qbansanguo All rights reserved.", "color: #f39c12;");
|
|
8
|
+
};
|
|
9
|
+
if (typeof window < "u") {
|
|
10
|
+
window._copyright_hflvcomp = r;
|
|
11
|
+
try {
|
|
12
|
+
Object.defineProperty(window, _copyright_hflvcomp, {
|
|
13
|
+
value: r,
|
|
14
|
+
writable: !1,
|
|
15
|
+
configurable: !1,
|
|
16
|
+
enumerable: !1
|
|
17
|
+
});
|
|
18
|
+
} catch {
|
|
19
|
+
window._copyright_hflvcomp = r;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
r();
|
|
23
|
+
})();
|
|
24
|
+
function Ce() {
|
|
25
|
+
const r = Ue("hflvcomp-api");
|
|
26
|
+
if (!r)
|
|
27
|
+
throw new Error("组件注册时未提供API,请检查!");
|
|
28
|
+
return r;
|
|
29
|
+
}
|
|
30
|
+
const ae = (r, b) => {
|
|
31
|
+
const n = r.__vccOpts || r;
|
|
32
|
+
for (const [e, c] of b)
|
|
33
|
+
n[e] = c;
|
|
34
|
+
return n;
|
|
35
|
+
}, Je = /* @__PURE__ */ Object.assign({
|
|
36
|
+
name: "Subpage"
|
|
37
|
+
}, {
|
|
38
|
+
__name: "Component",
|
|
39
|
+
props: {
|
|
40
|
+
propValue: {
|
|
41
|
+
type: Object,
|
|
42
|
+
required: !0,
|
|
43
|
+
default: () => ({})
|
|
44
|
+
},
|
|
45
|
+
element: {
|
|
46
|
+
type: Object,
|
|
47
|
+
default: () => ({})
|
|
48
|
+
},
|
|
49
|
+
designStatus: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: !1
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
setup(r, { expose: b }) {
|
|
55
|
+
b();
|
|
56
|
+
const { isNotEmpty: n } = z, e = Ce(), c = r, i = _(null), t = _({}), l = _([]);
|
|
57
|
+
let s = {}, a = [], w = "transparent";
|
|
58
|
+
const g = p(() => c.propValue), o = p(() => c.element), x = p(() => o.value.events || []), I = p(() => o.value.containerParam || {}), R = p(() => ({
|
|
59
|
+
width: `${o.value.style.width}px`,
|
|
60
|
+
height: `${o.value.style.height}px`,
|
|
61
|
+
backgroundColor: w
|
|
62
|
+
})), T = Z(), y = $(T), O = _(null), S = p(() => n(g.value.subpageId) ? g.value.subpageId : n(g.value.subpageIdCK) ? y[g.value.subpageIdCK] : "");
|
|
63
|
+
k(() => S.value, (m) => {
|
|
64
|
+
n(m) && f();
|
|
65
|
+
}), k(() => o.value.style.width, (m) => {
|
|
66
|
+
v();
|
|
67
|
+
}), k(() => o.value.style.height, (m) => {
|
|
68
|
+
v();
|
|
69
|
+
});
|
|
70
|
+
const D = () => {
|
|
71
|
+
s = {}, a = [], t.value = {}, l.value = [], w = "transparent";
|
|
72
|
+
}, f = () => {
|
|
73
|
+
let m = S.value;
|
|
74
|
+
if (n(m)) {
|
|
75
|
+
let d = "DB";
|
|
76
|
+
if (c.designStatus || (d = T.pageSource || "DB", n(g.value.pageSource) && (d = c.pageSource)), d == "DB") {
|
|
77
|
+
let Q = {};
|
|
78
|
+
Q.id = m, e.qryPageConfigData(Q).then(function(ee) {
|
|
79
|
+
let u = JSON.parse(ee.data.pageData);
|
|
80
|
+
u ? (s = u.canvasStyle || {}, a = u.componentData || [], s.passToParentSwitch && s.backgroundColor && (w = s.backgroundColor), v()) : D();
|
|
81
|
+
});
|
|
82
|
+
} else {
|
|
83
|
+
let Q = m + ".json";
|
|
84
|
+
e.getJsonFile(Q, function(ee) {
|
|
85
|
+
if (ee && ee.status == 200) {
|
|
86
|
+
let u = ee.data || {};
|
|
87
|
+
u ? (s = u.canvasStyle || {}, a = u.componentData || [], s.passToParentSwitch && s.backgroundColor && (w = s.backgroundColor), v()) : D();
|
|
88
|
+
} else
|
|
89
|
+
D();
|
|
90
|
+
}, function(ee) {
|
|
91
|
+
D();
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
} else
|
|
95
|
+
D();
|
|
96
|
+
}, v = () => {
|
|
97
|
+
let m = reCalcCanvasSize(o.value.style.width, o.value.style.height, s, a);
|
|
98
|
+
m ? (t.value = m.canvasStyleData || {}, l.value = m.componentData || []) : (t.value = {}, l.value = []);
|
|
99
|
+
};
|
|
100
|
+
Pe("VE-ContainerParam", I);
|
|
101
|
+
const j = Y(), P = J(), L = X(g, o, j, P);
|
|
102
|
+
K(() => {
|
|
103
|
+
O.value = q(x.value, c.designStatus, L), O.value?.beforeMount();
|
|
104
|
+
}), N(() => {
|
|
105
|
+
f(), O.value?.mounted();
|
|
106
|
+
}), G(() => {
|
|
107
|
+
O.value?.beforeUnmount();
|
|
108
|
+
}), U(() => {
|
|
109
|
+
O.value?.unmounted();
|
|
110
|
+
});
|
|
111
|
+
const F = { isNotEmpty: n, api: e, props: c, vePageRef: i, canvasStyle: t, componentData: l, get oldCanvasStyle() {
|
|
112
|
+
return s;
|
|
113
|
+
}, set oldCanvasStyle(m) {
|
|
114
|
+
s = m;
|
|
115
|
+
}, get oldComponentData() {
|
|
116
|
+
return a;
|
|
117
|
+
}, set oldComponentData(m) {
|
|
118
|
+
a = m;
|
|
119
|
+
}, get backgroundColor() {
|
|
120
|
+
return w;
|
|
121
|
+
}, set backgroundColor(m) {
|
|
122
|
+
w = m;
|
|
123
|
+
}, propValue: g, element: o, events: x, containerParam: I, containerStyle: R, dataCache: T, smartData: y, eventHandler: O, pageId: S, clearData: D, loadPageInfo: f, reCalcSizeData: v, router: j, route: P, compContext: L, ref: _, computed: p, onMounted: N, watch: k, provide: Pe, onBeforeMount: K, onBeforeUnmount: G, onUnmounted: U, get useEventHandler() {
|
|
124
|
+
return q;
|
|
125
|
+
}, get useDataCacheStore() {
|
|
126
|
+
return Z;
|
|
127
|
+
}, get createSmartAccessor() {
|
|
128
|
+
return $;
|
|
129
|
+
}, get CreateCompContext() {
|
|
130
|
+
return X;
|
|
131
|
+
}, get useRoute() {
|
|
132
|
+
return J;
|
|
133
|
+
}, get useRouter() {
|
|
134
|
+
return Y;
|
|
135
|
+
}, get CommonUtils() {
|
|
136
|
+
return z;
|
|
137
|
+
}, get useApi() {
|
|
138
|
+
return Ce;
|
|
139
|
+
} };
|
|
140
|
+
return Object.defineProperty(F, "__isScriptSetup", { enumerable: !1, value: !0 }), F;
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
function Qe(r, b, n, e, c, i) {
|
|
144
|
+
const t = De("VEPage");
|
|
145
|
+
return A(), M("div", {
|
|
146
|
+
class: "subpage-container",
|
|
147
|
+
style: Ee(e.containerStyle)
|
|
148
|
+
}, [
|
|
149
|
+
be(t, {
|
|
150
|
+
ref: "vePageRef",
|
|
151
|
+
"canvas-style": e.canvasStyle,
|
|
152
|
+
"component-data": e.componentData
|
|
153
|
+
}, null, 8, ["canvas-style", "component-data"])
|
|
154
|
+
], 4);
|
|
155
|
+
}
|
|
156
|
+
const Ze = /* @__PURE__ */ ae(Je, [["render", Qe], ["__scopeId", "data-v-a66fa401"], ["__file", "Component.vue"]]), $e = /* @__PURE__ */ Object.assign({
|
|
157
|
+
name: "MultiSubpage"
|
|
158
|
+
}, {
|
|
159
|
+
__name: "Component",
|
|
160
|
+
props: {
|
|
161
|
+
propValue: {
|
|
162
|
+
type: Object,
|
|
163
|
+
required: !0,
|
|
164
|
+
default: () => ({})
|
|
165
|
+
},
|
|
166
|
+
element: {
|
|
167
|
+
type: Object,
|
|
168
|
+
default: () => ({})
|
|
169
|
+
},
|
|
170
|
+
designStatus: {
|
|
171
|
+
type: Boolean,
|
|
172
|
+
default: !1
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
setup(r, { expose: b }) {
|
|
176
|
+
b();
|
|
177
|
+
const { isArray: n, isNotEmpty: e, isObject: c } = z, i = r, t = p(() => i.propValue), l = p(() => i.element), s = p(() => l.value.events || []), a = Z(), w = $(a), g = _(null), o = w[t.value.dsCacheKey], x = p(() => t.value.staticData ? t.value.items || [] : n(o.value) ? o.value : []), I = p(() => {
|
|
178
|
+
let f = x.value || [], v = [];
|
|
179
|
+
return f.forEach((j, P) => {
|
|
180
|
+
v[P] = {};
|
|
181
|
+
let L = {};
|
|
182
|
+
L.style = {}, L.style.width = l.value.style.width, L.style.height = l.value.style.height, L.prop = {}, L.prop.subpageId = j.value, v[P].subpageId = j.value, v[P].prop = L.prop, v[P].element = L;
|
|
183
|
+
}), v;
|
|
184
|
+
}), R = _(null), T = w[t.value.activeSubpageIdCK];
|
|
185
|
+
k(() => T.value, (f) => {
|
|
186
|
+
e(t.value.activeSubpageIdCK) && (c(f) || (R.value = f));
|
|
187
|
+
}, { immediate: !0 });
|
|
188
|
+
const y = Y(), O = J(), S = X(t, l, y, O);
|
|
189
|
+
K(() => {
|
|
190
|
+
g.value = q(s.value, i.designStatus, S), g.value?.beforeMount();
|
|
191
|
+
}), N(() => {
|
|
192
|
+
t.value.activeSubpageId && (R.value = t.value.activeSubpageId), g.value?.mounted();
|
|
193
|
+
}), G(() => {
|
|
194
|
+
g.value?.beforeUnmount();
|
|
195
|
+
}), U(() => {
|
|
196
|
+
g.value?.unmounted();
|
|
197
|
+
});
|
|
198
|
+
const D = { isArray: n, isNotEmpty: e, isObject: c, props: i, propValue: t, element: l, events: s, dataCache: a, smartData: w, eventHandler: g, cacheDS: o, options: x, itemData: I, curPageId: R, cacheValue: T, router: y, route: O, compContext: S, ref: _, computed: p, onMounted: N, watch: k, onBeforeMount: K, onBeforeUnmount: G, onUnmounted: U, get useEventHandler() {
|
|
199
|
+
return q;
|
|
200
|
+
}, get useDataCacheStore() {
|
|
201
|
+
return Z;
|
|
202
|
+
}, get createSmartAccessor() {
|
|
203
|
+
return $;
|
|
204
|
+
}, get CreateCompContext() {
|
|
205
|
+
return X;
|
|
206
|
+
}, get CommonUtils() {
|
|
207
|
+
return z;
|
|
208
|
+
}, get useRoute() {
|
|
209
|
+
return J;
|
|
210
|
+
}, get useRouter() {
|
|
211
|
+
return Y;
|
|
212
|
+
} };
|
|
213
|
+
return Object.defineProperty(D, "__isScriptSetup", { enumerable: !1, value: !0 }), D;
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
function et(r, b, n, e, c, i) {
|
|
217
|
+
const t = De("Subpage");
|
|
218
|
+
return A(), M("div", { class: "subpage-container" }, [
|
|
219
|
+
(A(!0), M(Xe, null, qe(e.itemData, (l, s) => (A(), M("div", { key: s }, [
|
|
220
|
+
(A(), He(Ye, { max: 15 }, [
|
|
221
|
+
e.curPageId == l.subpageId ? (A(), He(t, {
|
|
222
|
+
key: s,
|
|
223
|
+
"prop-value": l.prop,
|
|
224
|
+
element: l.element
|
|
225
|
+
}, null, 8, ["prop-value", "element"])) : ue("", !0)
|
|
226
|
+
], 1024))
|
|
227
|
+
]))), 128))
|
|
228
|
+
]);
|
|
229
|
+
}
|
|
230
|
+
const tt = /* @__PURE__ */ ae($e, [["render", et], ["__scopeId", "data-v-3deb553c"], ["__file", "Component.vue"]]);
|
|
231
|
+
function Ve(r) {
|
|
232
|
+
var b = typeof r;
|
|
233
|
+
return r != null && (b == "object" || b == "function");
|
|
234
|
+
}
|
|
235
|
+
var lt = typeof global == "object" && global && global.Object === Object && global, ot = typeof self == "object" && self && self.Object === Object && self, Ne = lt || ot || Function("return this")(), xe = function() {
|
|
236
|
+
return Ne.Date.now();
|
|
237
|
+
}, rt = /\s/;
|
|
238
|
+
function nt(r) {
|
|
239
|
+
for (var b = r.length; b-- && rt.test(r.charAt(b)); )
|
|
240
|
+
;
|
|
241
|
+
return b;
|
|
242
|
+
}
|
|
243
|
+
var at = /^\s+/;
|
|
244
|
+
function st(r) {
|
|
245
|
+
return r && r.slice(0, nt(r) + 1).replace(at, "");
|
|
246
|
+
}
|
|
247
|
+
var _e = Ne.Symbol, Ge = Object.prototype, ut = Ge.hasOwnProperty, it = Ge.toString, me = _e ? _e.toStringTag : void 0;
|
|
248
|
+
function ct(r) {
|
|
249
|
+
var b = ut.call(r, me), n = r[me];
|
|
250
|
+
try {
|
|
251
|
+
r[me] = void 0;
|
|
252
|
+
var e = !0;
|
|
253
|
+
} catch {
|
|
254
|
+
}
|
|
255
|
+
var c = it.call(r);
|
|
256
|
+
return e && (b ? r[me] = n : delete r[me]), c;
|
|
257
|
+
}
|
|
258
|
+
var dt = Object.prototype, ft = dt.toString;
|
|
259
|
+
function pt(r) {
|
|
260
|
+
return ft.call(r);
|
|
261
|
+
}
|
|
262
|
+
var vt = "[object Null]", ht = "[object Undefined]", Be = _e ? _e.toStringTag : void 0;
|
|
263
|
+
function gt(r) {
|
|
264
|
+
return r == null ? r === void 0 ? ht : vt : Be && Be in Object(r) ? ct(r) : pt(r);
|
|
265
|
+
}
|
|
266
|
+
function mt(r) {
|
|
267
|
+
return r != null && typeof r == "object";
|
|
268
|
+
}
|
|
269
|
+
var yt = "[object Symbol]";
|
|
270
|
+
function Ct(r) {
|
|
271
|
+
return typeof r == "symbol" || mt(r) && gt(r) == yt;
|
|
272
|
+
}
|
|
273
|
+
var Me = NaN, _t = /^[-+]0x[0-9a-f]+$/i, wt = /^0b[01]+$/i, bt = /^0o[0-7]+$/i, St = parseInt;
|
|
274
|
+
function Fe(r) {
|
|
275
|
+
if (typeof r == "number")
|
|
276
|
+
return r;
|
|
277
|
+
if (Ct(r))
|
|
278
|
+
return Me;
|
|
279
|
+
if (Ve(r)) {
|
|
280
|
+
var b = typeof r.valueOf == "function" ? r.valueOf() : r;
|
|
281
|
+
r = Ve(b) ? b + "" : b;
|
|
282
|
+
}
|
|
283
|
+
if (typeof r != "string")
|
|
284
|
+
return r === 0 ? r : +r;
|
|
285
|
+
r = st(r);
|
|
286
|
+
var n = wt.test(r);
|
|
287
|
+
return n || bt.test(r) ? St(r.slice(2), n ? 2 : 8) : _t.test(r) ? Me : +r;
|
|
288
|
+
}
|
|
289
|
+
var xt = "Expected a function", Vt = Math.max, kt = Math.min;
|
|
290
|
+
function we(r, b, n) {
|
|
291
|
+
var e, c, i, t, l, s, a = 0, w = !1, g = !1, o = !0;
|
|
292
|
+
if (typeof r != "function")
|
|
293
|
+
throw new TypeError(xt);
|
|
294
|
+
b = Fe(b) || 0, Ve(n) && (w = !!n.leading, g = "maxWait" in n, i = g ? Vt(Fe(n.maxWait) || 0, b) : i, o = "trailing" in n ? !!n.trailing : o);
|
|
295
|
+
function x(v) {
|
|
296
|
+
var j = e, P = c;
|
|
297
|
+
return e = c = void 0, a = v, t = r.apply(P, j), t;
|
|
298
|
+
}
|
|
299
|
+
function I(v) {
|
|
300
|
+
return a = v, l = setTimeout(y, b), w ? x(v) : t;
|
|
301
|
+
}
|
|
302
|
+
function R(v) {
|
|
303
|
+
var j = v - s, P = v - a, L = b - j;
|
|
304
|
+
return g ? kt(L, i - P) : L;
|
|
305
|
+
}
|
|
306
|
+
function T(v) {
|
|
307
|
+
var j = v - s, P = v - a;
|
|
308
|
+
return s === void 0 || j >= b || j < 0 || g && P >= i;
|
|
309
|
+
}
|
|
310
|
+
function y() {
|
|
311
|
+
var v = xe();
|
|
312
|
+
if (T(v))
|
|
313
|
+
return O(v);
|
|
314
|
+
l = setTimeout(y, R(v));
|
|
315
|
+
}
|
|
316
|
+
function O(v) {
|
|
317
|
+
return l = void 0, o && e ? x(v) : (e = c = void 0, t);
|
|
318
|
+
}
|
|
319
|
+
function S() {
|
|
320
|
+
l !== void 0 && clearTimeout(l), a = 0, e = s = c = l = void 0;
|
|
321
|
+
}
|
|
322
|
+
function D() {
|
|
323
|
+
return l === void 0 ? t : O(xe());
|
|
324
|
+
}
|
|
325
|
+
function f() {
|
|
326
|
+
var v = xe(), j = T(v);
|
|
327
|
+
if (e = arguments, c = this, s = v, j) {
|
|
328
|
+
if (l === void 0)
|
|
329
|
+
return I(s);
|
|
330
|
+
if (g)
|
|
331
|
+
return clearTimeout(l), l = setTimeout(y, b), x(s);
|
|
332
|
+
}
|
|
333
|
+
return l === void 0 && (l = setTimeout(y, b)), t;
|
|
334
|
+
}
|
|
335
|
+
return f.cancel = S, f.flush = D, f;
|
|
336
|
+
}
|
|
337
|
+
const Dt = /* @__PURE__ */ Object.assign({
|
|
338
|
+
name: "CanvasPic"
|
|
339
|
+
}, {
|
|
340
|
+
__name: "Component",
|
|
341
|
+
props: {
|
|
342
|
+
propValue: {
|
|
343
|
+
type: Object,
|
|
344
|
+
required: !0,
|
|
345
|
+
default: () => {
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
element: {
|
|
349
|
+
type: Object,
|
|
350
|
+
default: () => {
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
designStatus: {
|
|
354
|
+
type: Boolean,
|
|
355
|
+
default: !1
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
setup(r, { expose: b }) {
|
|
359
|
+
b();
|
|
360
|
+
const { isNotEmpty: n } = z, e = r, c = Z(), i = $(c), t = _(null), l = p(() => e.propValue || {}), s = p(() => e.element || {}), a = p(() => s.value.events || []), w = _(!0), g = _(null);
|
|
361
|
+
let o, x = null, I = !0, R = !1;
|
|
362
|
+
const T = i[l.value.urlCK], y = p(() => n(l.value.url) ? l.value.url : n(l.value.urlCK) && T.value || "");
|
|
363
|
+
k(
|
|
364
|
+
() => s.value?.style?.display,
|
|
365
|
+
(m) => {
|
|
366
|
+
m ? w.value = !1 : w.value = !0;
|
|
367
|
+
}
|
|
368
|
+
), k(
|
|
369
|
+
() => l.value.flipVertical,
|
|
370
|
+
() => S()
|
|
371
|
+
), k(
|
|
372
|
+
() => l.value.flipHorizontal,
|
|
373
|
+
() => S()
|
|
374
|
+
), k(
|
|
375
|
+
() => y.value,
|
|
376
|
+
(m) => {
|
|
377
|
+
I = !0, o = null, R = !1, D();
|
|
378
|
+
}
|
|
379
|
+
);
|
|
380
|
+
const O = () => {
|
|
381
|
+
const { width: m, height: d } = s.value.style;
|
|
382
|
+
g.value.width = m, g.value.height = d, I && y.value ? (I = !1, o = document.createElement("img"), o.onload = () => {
|
|
383
|
+
R = !0, x.drawImage(o, 0, 0, m, d), S();
|
|
384
|
+
}, o.src = y.value) : S();
|
|
385
|
+
}, S = () => {
|
|
386
|
+
const m = l.value.flipVertical, d = l.value.flipHorizontal, { width: Q, height: ee } = s.value.style, u = d ? -1 : 1, h = m ? -1 : 1;
|
|
387
|
+
x.clearRect(0, 0, Q, ee), R && o && (x.translate(Q / 2 - Q * u / 2, ee / 2 - ee * h / 2), x.scale(u, h), x.drawImage(o, 0, 0, Q, ee), x.setTransform(1, 0, 0, 1, 0, 0));
|
|
388
|
+
}, D = we(O, 500);
|
|
389
|
+
k([() => s.value?.style?.height, () => s.value?.style?.width], ([m, d]) => {
|
|
390
|
+
x && (I = !0, o = null, R = !1, D());
|
|
391
|
+
}, { immediate: !0 });
|
|
392
|
+
const f = (m) => {
|
|
393
|
+
t.value?.handleClick(m);
|
|
394
|
+
}, v = (m) => {
|
|
395
|
+
t.value?.handleDblClick(m);
|
|
396
|
+
}, j = Y(), P = J(), L = X(l, s, j, P);
|
|
397
|
+
K(() => {
|
|
398
|
+
t.value = q(a.value, e.designStatus, L), t.value?.beforeMount();
|
|
399
|
+
}), N(() => {
|
|
400
|
+
x = g.value?.getContext("2d"), D(), t.value?.mounted();
|
|
401
|
+
}), G(() => {
|
|
402
|
+
t.value?.beforeUnmount();
|
|
403
|
+
}), U(() => {
|
|
404
|
+
t.value?.unmounted();
|
|
405
|
+
});
|
|
406
|
+
const F = { isNotEmpty: n, props: e, dataCache: c, smartData: i, eventHandler: t, propValue: l, element: s, events: a, isVisible: w, canvas: g, get img() {
|
|
407
|
+
return o;
|
|
408
|
+
}, set img(m) {
|
|
409
|
+
o = m;
|
|
410
|
+
}, get ctx() {
|
|
411
|
+
return x;
|
|
412
|
+
}, set ctx(m) {
|
|
413
|
+
x = m;
|
|
414
|
+
}, get isFirst() {
|
|
415
|
+
return I;
|
|
416
|
+
}, set isFirst(m) {
|
|
417
|
+
I = m;
|
|
418
|
+
}, get loadSuccess() {
|
|
419
|
+
return R;
|
|
420
|
+
}, set loadSuccess(m) {
|
|
421
|
+
R = m;
|
|
422
|
+
}, urlData: T, url: y, drawImage: O, mirrorFlip: S, debouncedDraw: D, clickHandler: f, dblclickHandler: v, router: j, route: P, compContext: L, computed: p, onMounted: N, ref: _, watch: k, onBeforeMount: K, onBeforeUnmount: G, onUnmounted: U, get useEventHandler() {
|
|
423
|
+
return q;
|
|
424
|
+
}, get useDataCacheStore() {
|
|
425
|
+
return Z;
|
|
426
|
+
}, get createSmartAccessor() {
|
|
427
|
+
return $;
|
|
428
|
+
}, get CreateCompContext() {
|
|
429
|
+
return X;
|
|
430
|
+
}, get CommonUtils() {
|
|
431
|
+
return z;
|
|
432
|
+
}, get useRoute() {
|
|
433
|
+
return J;
|
|
434
|
+
}, get useRouter() {
|
|
435
|
+
return Y;
|
|
436
|
+
}, get debounce() {
|
|
437
|
+
return we;
|
|
438
|
+
} };
|
|
439
|
+
return Object.defineProperty(F, "__isScriptSetup", { enumerable: !1, value: !0 }), F;
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
function Ot(r, b, n, e, c, i) {
|
|
443
|
+
return e.isVisible ? (A(), M("div", {
|
|
444
|
+
key: 0,
|
|
445
|
+
class: "picture-container",
|
|
446
|
+
onClick: e.clickHandler,
|
|
447
|
+
onDblclick: e.dblclickHandler
|
|
448
|
+
}, [
|
|
449
|
+
ne("canvas", { ref: "canvas" }, null, 512)
|
|
450
|
+
], 32)) : ue("", !0);
|
|
451
|
+
}
|
|
452
|
+
const jt = /* @__PURE__ */ ae(Dt, [["render", Ot], ["__scopeId", "data-v-f733b313"], ["__file", "Component.vue"]]);
|
|
453
|
+
function de(r, b, n, e) {
|
|
454
|
+
const c = Oe({
|
|
455
|
+
dataColor: null,
|
|
456
|
+
// 数据颜色
|
|
457
|
+
backgroundColor: null,
|
|
458
|
+
// 背景颜色
|
|
459
|
+
lineColor: null,
|
|
460
|
+
// 线颜色
|
|
461
|
+
fillColor: null
|
|
462
|
+
// 填充颜色
|
|
463
|
+
}), i = b[r.value.colorCK], t = (s, a, w) => e.hasOwnPathInObject(s, a) ? e.getValueByPath(s, a) : w, l = (s, a) => e.isNotEmpty(a) && n ? n[a] ? n[a][s] : null : s;
|
|
464
|
+
return k(() => i?.value, (s) => {
|
|
465
|
+
if (e.isObject(s) && e.isNotEmpty(r.value.colorCK)) {
|
|
466
|
+
if (!r.value.dycFlag)
|
|
467
|
+
return;
|
|
468
|
+
let a;
|
|
469
|
+
e.isNotEmpty(r.value.fColorKey) && (a = t(s, r.value.fColorKey, null), c.dataColor = l(a, r.value.fColorRule)), e.isNotEmpty(r.value.bgColorKey) && (a = t(s, r.value.bgColorKey, null), c.backgroundColor = l(a, r.value.bgColorRule)), e.isNotEmpty(r.value.lineColorKey) && (a = t(s, r.value.lineColorKey, null), c.lineColor = l(a, r.value.lineColorRule)), e.isNotEmpty(r.value.fillColorKey) && (a = t(s, r.value.fillColorKey, null), c.fillColor = l(a, r.value.fillColorRule));
|
|
470
|
+
}
|
|
471
|
+
}, { immediate: !0 }), { dynamicColor: c };
|
|
472
|
+
}
|
|
473
|
+
const Lt = /* @__PURE__ */ Object.assign({
|
|
474
|
+
name: "SVGCircle"
|
|
475
|
+
}, {
|
|
476
|
+
__name: "Component",
|
|
477
|
+
props: {
|
|
478
|
+
propValue: {
|
|
479
|
+
type: Object,
|
|
480
|
+
required: !0,
|
|
481
|
+
default: () => {
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
element: {
|
|
485
|
+
type: Object,
|
|
486
|
+
default: () => {
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
designStatus: {
|
|
490
|
+
type: Boolean,
|
|
491
|
+
default: !1
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
setup(r, { expose: b }) {
|
|
495
|
+
b();
|
|
496
|
+
const n = r, e = Z(), c = $(e), i = _(null), t = p(() => n.propValue || {}), l = p(() => n.element || {}), s = p(() => l.value.events || []), a = Y(), w = J(), g = X(t, l, a, w);
|
|
497
|
+
K(() => {
|
|
498
|
+
i.value = q(s.value, n.designStatus, g), i.value?.beforeMount();
|
|
499
|
+
}), N(() => {
|
|
500
|
+
O(), i.value?.mounted();
|
|
501
|
+
}), G(() => {
|
|
502
|
+
i.value?.beforeUnmount();
|
|
503
|
+
}), U(() => {
|
|
504
|
+
i.value?.unmounted();
|
|
505
|
+
});
|
|
506
|
+
const { dynamicColor: o } = de(t, c, e.rules, z), x = p(() => o.fillColor ? o.fillColor : t.value.fillColor ? t.value.fillColor : "none"), I = p(() => o.lineColor ? o.lineColor : t.value.strokeColor ? t.value.strokeColor : "none"), R = _(0), T = _(0), y = _(0);
|
|
507
|
+
k(() => l.value.style.width, (f) => {
|
|
508
|
+
O();
|
|
509
|
+
}), k(() => l.value.style.height, (f) => {
|
|
510
|
+
O();
|
|
511
|
+
});
|
|
512
|
+
const O = () => {
|
|
513
|
+
const { width: f, height: v } = l.value.style;
|
|
514
|
+
S(f, v);
|
|
515
|
+
}, S = (f, v) => {
|
|
516
|
+
R.value = 0.5 * f, T.value = 0.5 * v, y.value = 0.45 * v;
|
|
517
|
+
}, D = { props: n, dataCache: e, smartData: c, eventHandler: i, propValue: t, element: l, events: s, router: a, route: w, compContext: g, dynamicColor: o, showFillColor: x, showLineColor: I, cx: R, cy: T, cr: y, draw: O, drawChart: S, get useEventHandler() {
|
|
518
|
+
return q;
|
|
519
|
+
}, get useDataCacheStore() {
|
|
520
|
+
return Z;
|
|
521
|
+
}, get createSmartAccessor() {
|
|
522
|
+
return $;
|
|
523
|
+
}, get CreateCompContext() {
|
|
524
|
+
return X;
|
|
525
|
+
}, ref: _, computed: p, watch: k, onMounted: N, onBeforeMount: K, onBeforeUnmount: G, onUnmounted: U, get useRoute() {
|
|
526
|
+
return J;
|
|
527
|
+
}, get useRouter() {
|
|
528
|
+
return Y;
|
|
529
|
+
}, get useDynamicColor() {
|
|
530
|
+
return de;
|
|
531
|
+
}, get CommonUtils() {
|
|
532
|
+
return z;
|
|
533
|
+
} };
|
|
534
|
+
return Object.defineProperty(D, "__isScriptSetup", { enumerable: !1, value: !0 }), D;
|
|
535
|
+
}
|
|
536
|
+
});
|
|
537
|
+
function Tt(r, b, n, e, c, i) {
|
|
538
|
+
return A(), M("div", { class: "svg-container" }, [
|
|
539
|
+
(A(), M("svg", {
|
|
540
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
541
|
+
width: e.element.style.width,
|
|
542
|
+
height: e.element.style.height
|
|
543
|
+
}, [
|
|
544
|
+
ne("circle", {
|
|
545
|
+
cx: e.cx,
|
|
546
|
+
cy: e.cy,
|
|
547
|
+
r: e.cr,
|
|
548
|
+
fill: e.showFillColor,
|
|
549
|
+
stroke: e.showLineColor,
|
|
550
|
+
"stroke-width": e.propValue.strokeWidth
|
|
551
|
+
}, null, 8, ["cx", "cy", "r", "fill", "stroke", "stroke-width"])
|
|
552
|
+
], 8, ["width", "height"]))
|
|
553
|
+
]);
|
|
554
|
+
}
|
|
555
|
+
const Wt = /* @__PURE__ */ ae(Lt, [["render", Tt], ["__scopeId", "data-v-ecab498d"], ["__file", "Component.vue"]]), It = /* @__PURE__ */ Object.assign({
|
|
556
|
+
name: "SVGDataText"
|
|
557
|
+
}, {
|
|
558
|
+
__name: "Component",
|
|
559
|
+
props: {
|
|
560
|
+
propValue: {
|
|
561
|
+
type: Object,
|
|
562
|
+
required: !0,
|
|
563
|
+
default: () => {
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
element: {
|
|
567
|
+
type: Object,
|
|
568
|
+
default: () => {
|
|
569
|
+
}
|
|
570
|
+
},
|
|
571
|
+
designStatus: {
|
|
572
|
+
type: Boolean,
|
|
573
|
+
default: !1
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
setup(r, { expose: b }) {
|
|
577
|
+
b();
|
|
578
|
+
const {
|
|
579
|
+
formatDate: n,
|
|
580
|
+
getDate: e,
|
|
581
|
+
getWeek: c,
|
|
582
|
+
isNotEmpty: i,
|
|
583
|
+
isNumber: t,
|
|
584
|
+
isObject: l,
|
|
585
|
+
isValid: s,
|
|
586
|
+
hasOwnPathInObject: a,
|
|
587
|
+
getValueByPath: w
|
|
588
|
+
} = z, g = r, o = p(() => g.propValue || {}), x = p(() => g.element || {}), I = p(() => x.value.events || []), R = Z(), T = $(R), y = _(null), O = _(0), S = _(0), D = _(""), f = _(""), v = _(!1), j = _("");
|
|
589
|
+
let P = null, L = null;
|
|
590
|
+
const F = _("");
|
|
591
|
+
let m = null;
|
|
592
|
+
const d = T[o.value.dataCK], Q = T[o.value.timeCK], ee = (B, le, ie) => a(B, le) ? w(B, le) : ie;
|
|
593
|
+
function u(B) {
|
|
594
|
+
l(B) ? (P = ee(B, o.value.valueKey, null), L = ee(B, o.value.timeKey, null)) : P = B;
|
|
595
|
+
}
|
|
596
|
+
function h(B) {
|
|
597
|
+
u(B), j.value = je(P);
|
|
598
|
+
}
|
|
599
|
+
k(() => d.value, (B) => {
|
|
600
|
+
s(B) && h(B);
|
|
601
|
+
}), k(() => Q.value, (B) => {
|
|
602
|
+
i(o.value.timeCK) && s(B) && (i(o.value.timeKey) ? l(B) && (L = ee(B, o.value.timeKey, null)) : L = B);
|
|
603
|
+
});
|
|
604
|
+
const { dynamicColor: C } = useDynamicColor(o, T, R.rules, z), H = p(() => C.dataColor ? C.dataColor : o.value.fontColor ? o.value.fontColor : "none"), W = p(() => C.backgroundColor ? C.backgroundColor : o.value.fillColor ? o.value.fillColor : "none"), E = (B) => {
|
|
605
|
+
y.value?.setParam(B);
|
|
606
|
+
}, V = (B) => {
|
|
607
|
+
y.value?.handleDblClick(B);
|
|
608
|
+
};
|
|
609
|
+
k(() => x.value.style.width, (B) => {
|
|
610
|
+
oe();
|
|
611
|
+
}), k(() => x.value.style.height, (B) => {
|
|
612
|
+
oe();
|
|
613
|
+
}), k(() => o.value.horizontalAlign, (B) => {
|
|
614
|
+
oe();
|
|
615
|
+
}), k(() => o.value.offsetX, (B) => {
|
|
616
|
+
oe();
|
|
617
|
+
});
|
|
618
|
+
const te = p(() => g.designStatus ? !0 : o.value.showTooltip ? !v.value : !0), fe = p(() => o.value.tooltipPlacement || "bottom-start"), ve = p(() => o.value.tooltipEffect || "dark"), he = (B) => {
|
|
619
|
+
g.designStatus || (pe(), i(F.value) ? v.value = !0 : v.value = !1);
|
|
620
|
+
}, pe = () => {
|
|
621
|
+
if (F.value = "", o.value.showTooltip && L && t(L)) {
|
|
622
|
+
let B = e(L), le = "";
|
|
623
|
+
if (B) {
|
|
624
|
+
le = n(B, "yyyy-MM-dd HH:mm:ss");
|
|
625
|
+
let ie = "数值:" + j.value, ce = "时间:" + le;
|
|
626
|
+
F.value = ie + "<br/>" + ce;
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
}, oe = () => {
|
|
630
|
+
const { width: B, height: le } = g.element.style;
|
|
631
|
+
re(B, le);
|
|
632
|
+
}, re = (B, le) => {
|
|
633
|
+
let ie = g.propValue.horizontalAlign || "left", ce = g.propValue.offsetX || 0;
|
|
634
|
+
ie == "center" ? (f.value = "middle", O.value = B * 0.5) : ie == "right" ? (O.value = B - ce, f.value = "end") : (O.value = 0 + ce, f.value = "start"), D.value = "central", S.value = le * 0.5;
|
|
635
|
+
}, je = (B) => {
|
|
636
|
+
let le = B;
|
|
637
|
+
if (t(B)) {
|
|
638
|
+
let ie = o.value.fractionDigits || 0, ce = o.value.factor;
|
|
639
|
+
t(ce) && (ce = Number(ce), B = Number(B) * ce), le = Le(Number(B), ie);
|
|
640
|
+
} else
|
|
641
|
+
le + "" == "undefined" && (le = "");
|
|
642
|
+
return i(o.value.unit) && (le = le + o.value.unit), le;
|
|
643
|
+
}, Le = (B, le) => {
|
|
644
|
+
let ie = B;
|
|
645
|
+
if (B) {
|
|
646
|
+
const ce = o.value.valueType;
|
|
647
|
+
if (ce == 2 && Number(B))
|
|
648
|
+
le && Number(le) ? le = parseInt(le) : le = 0, ie = B.toFixed(le);
|
|
649
|
+
else if (ce == 3) {
|
|
650
|
+
let Se = e(B);
|
|
651
|
+
const Ke = o.value.dateformat || "yyyy-MM-dd";
|
|
652
|
+
Se && (i(o.value.weekMode) ? ie = c(Se, t(o.value.weekMode) ? Number(o.value.weekMode) : 0) : ie = n(Se, Ke));
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
return ie;
|
|
656
|
+
}, ze = () => {
|
|
657
|
+
}, Te = Y(), We = J(), Ie = X(o, x, Te, We);
|
|
658
|
+
K(() => {
|
|
659
|
+
y.value = q(I.value, g.designStatus, Ie), y.value?.beforeMount();
|
|
660
|
+
}), N(() => {
|
|
661
|
+
oe(), m = setInterval(() => {
|
|
662
|
+
s(d.value) && h(d.value);
|
|
663
|
+
}, 1e3), y.value?.mounted();
|
|
664
|
+
}), G(() => {
|
|
665
|
+
y.value?.beforeUnmount();
|
|
666
|
+
}), U(() => {
|
|
667
|
+
y.value?.unmounted();
|
|
668
|
+
});
|
|
669
|
+
const Re = { formatDate: n, getDate: e, getWeek: c, isNotEmpty: i, isNumber: t, isObject: l, isValid: s, hasOwnPathInObject: a, getValueByPath: w, props: g, propValue: o, element: x, events: I, dataCache: R, smartData: T, eventHandler: y, textX: O, textY: S, textBaseLine: D, textAnchor: f, hasTooltipContent: v, showDataValue: j, get dataValue() {
|
|
670
|
+
return P;
|
|
671
|
+
}, set dataValue(B) {
|
|
672
|
+
P = B;
|
|
673
|
+
}, get dataTime() {
|
|
674
|
+
return L;
|
|
675
|
+
}, set dataTime(B) {
|
|
676
|
+
L = B;
|
|
677
|
+
}, tooltipContent: F, get timer() {
|
|
678
|
+
return m;
|
|
679
|
+
}, set timer(B) {
|
|
680
|
+
m = B;
|
|
681
|
+
}, bsData: d, timeData: Q, _getValueFromObj: ee, parseBsData: u, dealBsData: h, dynamicColor: C, showFontColor: H, showBackgroundColor: W, handleClick: E, handleDblClick: V, disableToolTip: te, tooltipPlacement: fe, tooltipEffect: ve, showTooltip: he, loadTipInfo: pe, draw: oe, drawChart: re, showValue: je, dataFormatter: Le, clearInterval: ze, router: Te, route: We, compContext: Ie, watch: k, onMounted: N, computed: p, onBeforeUnmount: G, ref: _, onBeforeMount: K, onUnmounted: U, reactive: Oe, get useRoute() {
|
|
682
|
+
return J;
|
|
683
|
+
}, get useRouter() {
|
|
684
|
+
return Y;
|
|
685
|
+
}, get useEventHandler() {
|
|
686
|
+
return q;
|
|
687
|
+
}, get useDataCacheStore() {
|
|
688
|
+
return Z;
|
|
689
|
+
}, get createSmartAccessor() {
|
|
690
|
+
return $;
|
|
691
|
+
}, get CreateCompContext() {
|
|
692
|
+
return X;
|
|
693
|
+
}, get CommonUtils() {
|
|
694
|
+
return z;
|
|
695
|
+
} };
|
|
696
|
+
return Object.defineProperty(Re, "__isScriptSetup", { enumerable: !1, value: !0 }), Re;
|
|
697
|
+
}
|
|
698
|
+
});
|
|
699
|
+
function Rt(r, b, n, e, c, i) {
|
|
700
|
+
const t = De("el-tooltip");
|
|
701
|
+
return A(), M("div", {
|
|
702
|
+
class: "svg-container",
|
|
703
|
+
onClick: e.handleClick,
|
|
704
|
+
onDblclick: e.handleDblClick,
|
|
705
|
+
onMouseenter: e.showTooltip
|
|
706
|
+
}, [
|
|
707
|
+
be(t, {
|
|
708
|
+
class: "item",
|
|
709
|
+
placement: e.tooltipPlacement,
|
|
710
|
+
disabled: e.disableToolTip,
|
|
711
|
+
effect: e.tooltipEffect
|
|
712
|
+
}, {
|
|
713
|
+
content: Ae(() => [
|
|
714
|
+
ne("div", { innerHTML: e.tooltipContent }, null, 8, ["innerHTML"])
|
|
715
|
+
]),
|
|
716
|
+
default: Ae(() => [
|
|
717
|
+
(A(), M("svg", {
|
|
718
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
719
|
+
width: e.element.style.width,
|
|
720
|
+
height: e.element.style.height
|
|
721
|
+
}, [
|
|
722
|
+
e.propValue.hasBackground ? (A(), M("rect", {
|
|
723
|
+
key: 0,
|
|
724
|
+
x: 0,
|
|
725
|
+
y: 0,
|
|
726
|
+
width: e.element.style.width,
|
|
727
|
+
height: e.element.style.height,
|
|
728
|
+
fill: e.showBackgroundColor,
|
|
729
|
+
stroke: e.propValue.strokeColor,
|
|
730
|
+
"stroke-width": e.propValue.strokeWidth
|
|
731
|
+
}, null, 8, ["width", "height", "fill", "stroke", "stroke-width"])) : ue("", !0),
|
|
732
|
+
se(),
|
|
733
|
+
ne("text", {
|
|
734
|
+
x: e.textX,
|
|
735
|
+
y: e.textY,
|
|
736
|
+
dx: e.propValue.dx,
|
|
737
|
+
fill: e.showFontColor,
|
|
738
|
+
"dominant-baseline": e.textBaseLine,
|
|
739
|
+
"text-anchor": e.textAnchor,
|
|
740
|
+
"font-family": e.propValue.fontFamily,
|
|
741
|
+
"font-size": e.propValue.fontSize,
|
|
742
|
+
"font-weight": e.propValue.fontWeight
|
|
743
|
+
}, ge(e.showDataValue), 9, ["x", "y", "dx", "fill", "dominant-baseline", "text-anchor", "font-family", "font-size", "font-weight"])
|
|
744
|
+
], 8, ["width", "height"]))
|
|
745
|
+
]),
|
|
746
|
+
_: 1
|
|
747
|
+
}, 8, ["placement", "disabled", "effect"])
|
|
748
|
+
], 32);
|
|
749
|
+
}
|
|
750
|
+
const Pt = /* @__PURE__ */ ae(It, [["render", Rt], ["__scopeId", "data-v-61179794"], ["__file", "Component.vue"]]), Ht = /* @__PURE__ */ Object.assign({
|
|
751
|
+
name: "SVGDateText"
|
|
752
|
+
}, {
|
|
753
|
+
__name: "Component",
|
|
754
|
+
props: {
|
|
755
|
+
propValue: {
|
|
756
|
+
type: Object,
|
|
757
|
+
required: !0,
|
|
758
|
+
default: () => {
|
|
759
|
+
}
|
|
760
|
+
},
|
|
761
|
+
element: {
|
|
762
|
+
type: Object,
|
|
763
|
+
default: () => {
|
|
764
|
+
}
|
|
765
|
+
},
|
|
766
|
+
designStatus: {
|
|
767
|
+
type: Boolean,
|
|
768
|
+
default: !1
|
|
769
|
+
}
|
|
770
|
+
},
|
|
771
|
+
setup(r, { expose: b }) {
|
|
772
|
+
b();
|
|
773
|
+
const {
|
|
774
|
+
formatDate: n,
|
|
775
|
+
getDate: e,
|
|
776
|
+
getWeek: c,
|
|
777
|
+
isNotEmpty: i,
|
|
778
|
+
isNumber: t
|
|
779
|
+
} = z, l = r, s = p(() => l.propValue || {}), a = p(() => l.element || {}), w = p(() => a.value.events || []), g = _(null), o = _(0), x = _(0), I = _(""), R = _(""), T = _(!1), y = _("");
|
|
780
|
+
let O = null, S = null;
|
|
781
|
+
const D = _("");
|
|
782
|
+
let f = null;
|
|
783
|
+
k(() => a.value.style.width, (C) => {
|
|
784
|
+
v();
|
|
785
|
+
}), k(() => a.value.style.height, (C) => {
|
|
786
|
+
v();
|
|
787
|
+
}), k(() => s.value.horizontalAlign, (C) => {
|
|
788
|
+
v();
|
|
789
|
+
}), k(() => s.value.offsetX, (C) => {
|
|
790
|
+
v();
|
|
791
|
+
});
|
|
792
|
+
const v = () => {
|
|
793
|
+
const { width: C, height: H } = l.element.style;
|
|
794
|
+
j(C, H);
|
|
795
|
+
}, j = (C, H) => {
|
|
796
|
+
let W = l.propValue.horizontalAlign || "left", E = l.propValue.offsetX || 0;
|
|
797
|
+
W == "center" ? (R.value = "middle", o.value = C * 0.5) : W == "right" ? (o.value = C - E, R.value = "end") : (o.value = 0 + E, R.value = "start"), I.value = "central", x.value = H * 0.5;
|
|
798
|
+
}, P = (C) => {
|
|
799
|
+
let H = C;
|
|
800
|
+
return t(C) ? H = L(Number(C)) : H + "" == "undefined" && (H = ""), H;
|
|
801
|
+
}, L = (C) => {
|
|
802
|
+
let H = C;
|
|
803
|
+
if (C) {
|
|
804
|
+
let W = e(C);
|
|
805
|
+
const E = s.value.dateformat || "yyyy-MM-dd";
|
|
806
|
+
W && (i(s.value.weekMode) ? H = c(W, t(s.value.weekMode) ? Number(s.value.weekMode) : 0) : H = n(W, E));
|
|
807
|
+
}
|
|
808
|
+
return H;
|
|
809
|
+
}, F = () => {
|
|
810
|
+
}, m = (C) => {
|
|
811
|
+
g.value?.handleClick(C);
|
|
812
|
+
}, d = (C) => {
|
|
813
|
+
g.value?.handleDblClick(C);
|
|
814
|
+
}, Q = Y(), ee = J(), u = X(s, a, Q, ee);
|
|
815
|
+
K(() => {
|
|
816
|
+
g.value = q(w.value, l.designStatus, u), g.value?.beforeMount();
|
|
817
|
+
}), N(() => {
|
|
818
|
+
v(), f = setInterval(() => {
|
|
819
|
+
let C = (/* @__PURE__ */ new Date()).getTime();
|
|
820
|
+
y.value = P(C);
|
|
821
|
+
}, 500), g.value?.mounted();
|
|
822
|
+
}), G(() => {
|
|
823
|
+
g.value?.beforeUnmount();
|
|
824
|
+
}), U(() => {
|
|
825
|
+
g.value?.unmounted();
|
|
826
|
+
});
|
|
827
|
+
const h = { formatDate: n, getDate: e, getWeek: c, isNotEmpty: i, isNumber: t, props: l, propValue: s, element: a, events: w, eventHandler: g, textX: o, textY: x, textBaseLine: I, textAnchor: R, hasTooltipContent: T, showDataValue: y, get dataValue() {
|
|
828
|
+
return O;
|
|
829
|
+
}, set dataValue(C) {
|
|
830
|
+
O = C;
|
|
831
|
+
}, get dataTime() {
|
|
832
|
+
return S;
|
|
833
|
+
}, set dataTime(C) {
|
|
834
|
+
S = C;
|
|
835
|
+
}, tooltipContent: D, get timer() {
|
|
836
|
+
return f;
|
|
837
|
+
}, set timer(C) {
|
|
838
|
+
f = C;
|
|
839
|
+
}, draw: v, drawChart: j, showValue: P, dataFormatter: L, clearInterval: F, handleClick: m, handleDblClick: d, router: Q, route: ee, compContext: u, watch: k, onMounted: N, computed: p, onBeforeUnmount: G, ref: _, onBeforeMount: K, onUnmounted: U, get useEventHandler() {
|
|
840
|
+
return q;
|
|
841
|
+
}, get useDataCacheStore() {
|
|
842
|
+
return Z;
|
|
843
|
+
}, get createSmartAccessor() {
|
|
844
|
+
return $;
|
|
845
|
+
}, get CreateCompContext() {
|
|
846
|
+
return X;
|
|
847
|
+
}, get useRoute() {
|
|
848
|
+
return J;
|
|
849
|
+
}, get useRouter() {
|
|
850
|
+
return Y;
|
|
851
|
+
}, get CommonUtils() {
|
|
852
|
+
return z;
|
|
853
|
+
} };
|
|
854
|
+
return Object.defineProperty(h, "__isScriptSetup", { enumerable: !1, value: !0 }), h;
|
|
855
|
+
}
|
|
856
|
+
});
|
|
857
|
+
function At(r, b, n, e, c, i) {
|
|
858
|
+
return A(), M("div", {
|
|
859
|
+
class: "svg-container",
|
|
860
|
+
onClick: e.handleClick,
|
|
861
|
+
onDblclick: e.handleDblClick
|
|
862
|
+
}, [
|
|
863
|
+
(A(), M("svg", { xmlns: "http://www.w3.org/2000/svg" }, [
|
|
864
|
+
e.propValue.hasBackground ? (A(), M("rect", {
|
|
865
|
+
key: 0,
|
|
866
|
+
x: 1,
|
|
867
|
+
y: 1,
|
|
868
|
+
width: e.element.style.width - 2,
|
|
869
|
+
height: e.element.style.height - 2,
|
|
870
|
+
fill: e.propValue.fillColor ? e.propValue.fillColor : "none",
|
|
871
|
+
stroke: e.propValue.strokeColor,
|
|
872
|
+
"stroke-width": e.propValue.strokeWidth
|
|
873
|
+
}, null, 8, ["width", "height", "fill", "stroke", "stroke-width"])) : ue("", !0),
|
|
874
|
+
se(),
|
|
875
|
+
ne("text", {
|
|
876
|
+
x: e.textX,
|
|
877
|
+
y: e.textY,
|
|
878
|
+
dx: e.propValue.dx,
|
|
879
|
+
fill: e.propValue.fontColor ? e.propValue.fontColor : "none",
|
|
880
|
+
"dominant-baseline": e.textBaseLine,
|
|
881
|
+
"text-anchor": e.textAnchor,
|
|
882
|
+
"font-family": e.propValue.fontFamily,
|
|
883
|
+
"font-size": e.propValue.fontSize,
|
|
884
|
+
"font-weight": e.propValue.fontWeight
|
|
885
|
+
}, ge(e.showDataValue), 9, ["x", "y", "dx", "fill", "dominant-baseline", "text-anchor", "font-family", "font-size", "font-weight"])
|
|
886
|
+
]))
|
|
887
|
+
], 32);
|
|
888
|
+
}
|
|
889
|
+
const Bt = /* @__PURE__ */ ae(Ht, [["render", At], ["__scopeId", "data-v-0a8a6304"], ["__file", "Component.vue"]]), Mt = /* @__PURE__ */ Object.assign({
|
|
890
|
+
name: "SVGHLine"
|
|
891
|
+
}, {
|
|
892
|
+
__name: "Component",
|
|
893
|
+
props: {
|
|
894
|
+
propValue: {
|
|
895
|
+
type: Object,
|
|
896
|
+
required: !0,
|
|
897
|
+
default: () => {
|
|
898
|
+
}
|
|
899
|
+
},
|
|
900
|
+
element: {
|
|
901
|
+
type: Object,
|
|
902
|
+
default: () => {
|
|
903
|
+
}
|
|
904
|
+
},
|
|
905
|
+
designStatus: {
|
|
906
|
+
type: Boolean,
|
|
907
|
+
default: !1
|
|
908
|
+
}
|
|
909
|
+
},
|
|
910
|
+
setup(r, { expose: b }) {
|
|
911
|
+
b();
|
|
912
|
+
const n = r, e = Z(), c = $(e), i = _(null), t = p(() => n.propValue || {}), l = p(() => n.element || {}), s = p(() => l.value.events || []), a = Y(), w = J(), g = X(t, l, a, w);
|
|
913
|
+
K(() => {
|
|
914
|
+
i.value = q(s.value, n.designStatus, g), i.value?.beforeMount();
|
|
915
|
+
}), N(() => {
|
|
916
|
+
T(), i.value?.mounted();
|
|
917
|
+
}), G(() => {
|
|
918
|
+
i.value?.beforeUnmount();
|
|
919
|
+
}), U(() => {
|
|
920
|
+
i.value?.unmounted();
|
|
921
|
+
});
|
|
922
|
+
const { dynamicColor: o } = de(t, c, e.rules, z), x = p(() => o.lineColor ? o.lineColor : t.value.strokeColor ? t.value.strokeColor : "none"), I = _([]), R = _([]);
|
|
923
|
+
k(() => l.value.style.width, (S) => {
|
|
924
|
+
T();
|
|
925
|
+
}), k(() => l.value.style.height, (S) => {
|
|
926
|
+
T();
|
|
927
|
+
});
|
|
928
|
+
const T = () => {
|
|
929
|
+
const { width: S, height: D } = l.value.style;
|
|
930
|
+
y(S, D);
|
|
931
|
+
}, y = (S, D) => {
|
|
932
|
+
const f = [0, 0.5], v = [1, 0.5];
|
|
933
|
+
I.value = [S * f[0], D * f[1]], R.value = [S * v[0], D * v[1]];
|
|
934
|
+
}, O = { props: n, dataCache: e, smartData: c, eventHandler: i, propValue: t, element: l, events: s, router: a, route: w, compContext: g, dynamicColor: o, showLineColor: x, LineL1P1: I, LineL1P2: R, draw: T, drawChart: y, get useEventHandler() {
|
|
935
|
+
return q;
|
|
936
|
+
}, get useDataCacheStore() {
|
|
937
|
+
return Z;
|
|
938
|
+
}, get createSmartAccessor() {
|
|
939
|
+
return $;
|
|
940
|
+
}, get CreateCompContext() {
|
|
941
|
+
return X;
|
|
942
|
+
}, ref: _, computed: p, watch: k, onMounted: N, onBeforeMount: K, onBeforeUnmount: G, onUnmounted: U, get useRoute() {
|
|
943
|
+
return J;
|
|
944
|
+
}, get useRouter() {
|
|
945
|
+
return Y;
|
|
946
|
+
}, get CommonUtils() {
|
|
947
|
+
return z;
|
|
948
|
+
}, get useDynamicColor() {
|
|
949
|
+
return de;
|
|
950
|
+
} };
|
|
951
|
+
return Object.defineProperty(O, "__isScriptSetup", { enumerable: !1, value: !0 }), O;
|
|
952
|
+
}
|
|
953
|
+
});
|
|
954
|
+
function Ft(r, b, n, e, c, i) {
|
|
955
|
+
return A(), M("div", { class: "svg-container" }, [
|
|
956
|
+
(A(), M("svg", {
|
|
957
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
958
|
+
width: e.element.style.width,
|
|
959
|
+
height: e.element.style.height
|
|
960
|
+
}, [
|
|
961
|
+
ne("line", {
|
|
962
|
+
x1: e.LineL1P1[0],
|
|
963
|
+
y1: e.LineL1P1[1],
|
|
964
|
+
x2: e.LineL1P2[0],
|
|
965
|
+
y2: e.LineL1P2[1],
|
|
966
|
+
stroke: e.showLineColor,
|
|
967
|
+
"stroke-width": e.propValue.strokeWidth,
|
|
968
|
+
"stroke-dasharray": e.propValue.strokeDasharray
|
|
969
|
+
}, [
|
|
970
|
+
e.propValue.animate ? (A(), M("animate", {
|
|
971
|
+
key: 0,
|
|
972
|
+
attributeName: "stroke-dashoffset",
|
|
973
|
+
from: e.propValue.animateFrom,
|
|
974
|
+
to: e.propValue.animateTo,
|
|
975
|
+
dur: e.propValue.animateDur + "s",
|
|
976
|
+
repeatCount: "indefinite"
|
|
977
|
+
}, null, 8, ["from", "to", "dur"])) : ue("", !0)
|
|
978
|
+
], 8, ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"])
|
|
979
|
+
], 8, ["width", "height"]))
|
|
980
|
+
]);
|
|
981
|
+
}
|
|
982
|
+
const Et = /* @__PURE__ */ ae(Mt, [["render", Ft], ["__scopeId", "data-v-7dcb2081"], ["__file", "Component.vue"]]), Nt = /* @__PURE__ */ Object.assign({
|
|
983
|
+
name: "SVGRectangle"
|
|
984
|
+
}, {
|
|
985
|
+
__name: "Component",
|
|
986
|
+
props: {
|
|
987
|
+
propValue: {
|
|
988
|
+
type: Object,
|
|
989
|
+
required: !0,
|
|
990
|
+
default: () => {
|
|
991
|
+
}
|
|
992
|
+
},
|
|
993
|
+
element: {
|
|
994
|
+
type: Object,
|
|
995
|
+
default: () => {
|
|
996
|
+
}
|
|
997
|
+
},
|
|
998
|
+
designStatus: {
|
|
999
|
+
type: Boolean,
|
|
1000
|
+
default: !1
|
|
1001
|
+
}
|
|
1002
|
+
},
|
|
1003
|
+
setup(r, { expose: b }) {
|
|
1004
|
+
b();
|
|
1005
|
+
const { generateSecureUUID: n } = z, e = r, c = Z(), i = $(c), t = _(null), l = p(() => e.propValue || {}), s = p(() => e.element || {}), a = p(() => s.value.events || []), w = Y(), g = J(), o = X(l, s, w, g);
|
|
1006
|
+
K(() => {
|
|
1007
|
+
t.value = q(a.value, e.designStatus, o), t.value?.beforeMount(), P.value = n();
|
|
1008
|
+
}), N(() => {
|
|
1009
|
+
v(), t.value?.mounted();
|
|
1010
|
+
}), G(() => {
|
|
1011
|
+
t.value?.beforeUnmount();
|
|
1012
|
+
}), U(() => {
|
|
1013
|
+
t.value?.unmounted();
|
|
1014
|
+
});
|
|
1015
|
+
const { dynamicColor: x } = useDynamicColor(l, i, c.rules, z), I = p(() => x.fillColor ? x.fillColor : l.value.fillColor ? l.value.fillColor : "none"), R = p(() => x.lineColor ? x.lineColor : l.value.strokeColor ? l.value.strokeColor : "none"), T = _(0), y = _(0), O = _(1), S = _(1), D = _(0), f = _(0);
|
|
1016
|
+
k(() => s.value.style.width, (m) => {
|
|
1017
|
+
v();
|
|
1018
|
+
}), k(() => s.value.style.height, (m) => {
|
|
1019
|
+
v();
|
|
1020
|
+
});
|
|
1021
|
+
const v = () => {
|
|
1022
|
+
const { width: m, height: d } = s.value.style;
|
|
1023
|
+
j(m, d);
|
|
1024
|
+
}, j = (m, d) => {
|
|
1025
|
+
let C = l.value.strokeWidth, H = C / 2;
|
|
1026
|
+
T.value = 0 * m + H, y.value = 0 * d + H, O.value = d * 1 - C, S.value = m * 1 - C;
|
|
1027
|
+
}, P = _(""), L = p(() => l.value.hasGradient ? `url(#${P.value})` : I.value), F = { generateSecureUUID: n, props: e, dataCache: c, smartData: i, eventHandler: t, propValue: l, element: s, events: a, router: w, route: g, compContext: o, dynamicColor: x, showFillColor: I, showLineColor: R, rlux: T, rluy: y, rhight: O, rwidth: S, rrx: D, rry: f, draw: v, drawChart: j, gradientId: P, fillStyle: L, get useEventHandler() {
|
|
1028
|
+
return q;
|
|
1029
|
+
}, get useDataCacheStore() {
|
|
1030
|
+
return Z;
|
|
1031
|
+
}, get createSmartAccessor() {
|
|
1032
|
+
return $;
|
|
1033
|
+
}, get CreateCompContext() {
|
|
1034
|
+
return X;
|
|
1035
|
+
}, ref: _, computed: p, watch: k, onMounted: N, onBeforeMount: K, onBeforeUnmount: G, onUnmounted: U, get CommonUtils() {
|
|
1036
|
+
return z;
|
|
1037
|
+
}, get useRoute() {
|
|
1038
|
+
return J;
|
|
1039
|
+
}, get useRouter() {
|
|
1040
|
+
return Y;
|
|
1041
|
+
} };
|
|
1042
|
+
return Object.defineProperty(F, "__isScriptSetup", { enumerable: !1, value: !0 }), F;
|
|
1043
|
+
}
|
|
1044
|
+
});
|
|
1045
|
+
function Gt(r, b, n, e, c, i) {
|
|
1046
|
+
return A(), M("div", { class: "svg-container" }, [
|
|
1047
|
+
(A(), M("svg", {
|
|
1048
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1049
|
+
width: e.element.style.width,
|
|
1050
|
+
height: e.element.style.height
|
|
1051
|
+
}, [
|
|
1052
|
+
ue(" 根据条件判断是否渲染渐变定义 "),
|
|
1053
|
+
se(),
|
|
1054
|
+
e.propValue.hasGradient ? (A(), M("defs", { key: 0 }, [
|
|
1055
|
+
ue(" 这里根据渐变类型动态渲染线性或径向渐变 "),
|
|
1056
|
+
se(),
|
|
1057
|
+
e.propValue.gradientType === "linear" ? (A(), M("linearGradient", {
|
|
1058
|
+
key: 0,
|
|
1059
|
+
id: e.gradientId,
|
|
1060
|
+
x1: e.propValue.gradientX1 + "%",
|
|
1061
|
+
x2: e.propValue.gradientX2 + "%",
|
|
1062
|
+
y1: e.propValue.gradientY1 + "%",
|
|
1063
|
+
y2: e.propValue.gradientY2 + "%"
|
|
1064
|
+
}, [
|
|
1065
|
+
(A(), M("stop", {
|
|
1066
|
+
key: 1,
|
|
1067
|
+
offset: e.propValue.gradientStopsOffset + "%",
|
|
1068
|
+
"stop-color": e.propValue.gradientStopsColor
|
|
1069
|
+
}, null, 8, ["offset", "stop-color"])),
|
|
1070
|
+
se(),
|
|
1071
|
+
(A(), M("stop", {
|
|
1072
|
+
key: 2,
|
|
1073
|
+
offset: e.propValue.gradientStopsOffset2 + "%",
|
|
1074
|
+
"stop-color": e.propValue.gradientStopsColor2
|
|
1075
|
+
}, null, 8, ["offset", "stop-color"]))
|
|
1076
|
+
], 8, ["id", "x1", "x2", "y1", "y2"])) : (A(), M("radialGradient", {
|
|
1077
|
+
key: 1,
|
|
1078
|
+
id: e.gradientId,
|
|
1079
|
+
cx: e.propValue.gradientCx + "%",
|
|
1080
|
+
cy: e.propValue.gradientCy + "%",
|
|
1081
|
+
r: e.propValue.gradientR + "%",
|
|
1082
|
+
fx: e.propValue.gradientFx + "%",
|
|
1083
|
+
fy: e.propValue.gradientFy + "%"
|
|
1084
|
+
}, [
|
|
1085
|
+
(A(), M("stop", {
|
|
1086
|
+
key: 1,
|
|
1087
|
+
offset: e.propValue.gradientStopsOffset + "%",
|
|
1088
|
+
"stop-color": e.propValue.gradientStopsColor
|
|
1089
|
+
}, null, 8, ["offset", "stop-color"])),
|
|
1090
|
+
se(),
|
|
1091
|
+
(A(), M("stop", {
|
|
1092
|
+
key: 2,
|
|
1093
|
+
offset: e.propValue.gradientStopsOffset2 + "%",
|
|
1094
|
+
"stop-color": e.propValue.gradientStopsColor2
|
|
1095
|
+
}, null, 8, ["offset", "stop-color"]))
|
|
1096
|
+
], 8, ["id", "cx", "cy", "r", "fx", "fy"]))
|
|
1097
|
+
])) : ue("", !0),
|
|
1098
|
+
se(),
|
|
1099
|
+
ne("rect", {
|
|
1100
|
+
x: e.rlux,
|
|
1101
|
+
y: e.rluy,
|
|
1102
|
+
height: e.rhight,
|
|
1103
|
+
width: e.rwidth,
|
|
1104
|
+
rx: e.propValue.rx,
|
|
1105
|
+
ry: e.propValue.ry,
|
|
1106
|
+
fill: e.fillStyle,
|
|
1107
|
+
"fill-opacity": e.propValue.fillOpacity,
|
|
1108
|
+
stroke: e.showLineColor,
|
|
1109
|
+
"stroke-opacity": e.propValue.strokeOpacity,
|
|
1110
|
+
"stroke-width": e.propValue.strokeWidth,
|
|
1111
|
+
"stroke-dasharray": e.propValue.strokeDasharray
|
|
1112
|
+
}, null, 8, ["x", "y", "height", "width", "rx", "ry", "fill", "fill-opacity", "stroke", "stroke-opacity", "stroke-width", "stroke-dasharray"])
|
|
1113
|
+
], 8, ["width", "height"]))
|
|
1114
|
+
]);
|
|
1115
|
+
}
|
|
1116
|
+
const zt = /* @__PURE__ */ ae(Nt, [["render", Gt], ["__scopeId", "data-v-cc066efb"], ["__file", "Component.vue"]]), Kt = /* @__PURE__ */ Object.assign({
|
|
1117
|
+
name: "SVGTriangle"
|
|
1118
|
+
}, {
|
|
1119
|
+
__name: "Component",
|
|
1120
|
+
props: {
|
|
1121
|
+
propValue: {
|
|
1122
|
+
type: Object,
|
|
1123
|
+
required: !0,
|
|
1124
|
+
default: () => {
|
|
1125
|
+
}
|
|
1126
|
+
},
|
|
1127
|
+
element: {
|
|
1128
|
+
type: Object,
|
|
1129
|
+
default: () => {
|
|
1130
|
+
}
|
|
1131
|
+
},
|
|
1132
|
+
designStatus: {
|
|
1133
|
+
type: Boolean,
|
|
1134
|
+
default: !1
|
|
1135
|
+
}
|
|
1136
|
+
},
|
|
1137
|
+
setup(r, { expose: b }) {
|
|
1138
|
+
b();
|
|
1139
|
+
const n = r, e = Z(), c = $(e), i = _(null), t = p(() => n.propValue || {}), l = p(() => n.element || {}), s = p(() => l.value.events || []), a = Y(), w = J(), g = X(t, l, a, w);
|
|
1140
|
+
K(() => {
|
|
1141
|
+
i.value = q(s.value, n.designStatus, g), i.value?.beforeMount();
|
|
1142
|
+
}), N(() => {
|
|
1143
|
+
T(), i.value?.mounted();
|
|
1144
|
+
}), G(() => {
|
|
1145
|
+
i.value?.beforeUnmount();
|
|
1146
|
+
}), U(() => {
|
|
1147
|
+
i.value?.unmounted();
|
|
1148
|
+
});
|
|
1149
|
+
const { dynamicColor: o } = de(t, c, e.rules, z), x = p(() => o.fillColor ? o.fillColor : t.value.fillColor ? t.value.fillColor : "none"), I = p(() => o.lineColor ? o.lineColor : t.value.strokeColor ? t.value.strokeColor : "none"), R = _([]);
|
|
1150
|
+
k(() => l.value.style.width, (S) => {
|
|
1151
|
+
T();
|
|
1152
|
+
}), k(() => l.value.style.height, (S) => {
|
|
1153
|
+
T();
|
|
1154
|
+
});
|
|
1155
|
+
const T = () => {
|
|
1156
|
+
const { width: S, height: D } = l.value.style;
|
|
1157
|
+
y(S, D);
|
|
1158
|
+
}, y = (S, D) => {
|
|
1159
|
+
const f = [];
|
|
1160
|
+
let v = 0, j = t.value.strokeWidth;
|
|
1161
|
+
f[v++] = "M", f[v++] = 0.5 * S, f[v++] = 0 + j, f[v++] = "L", f[v++] = 0 + j, f[v++] = D - j, f[v++] = "L", f[v++] = S - j, f[v++] = D - j, f[v++] = "Z", R.value = f.join(" ");
|
|
1162
|
+
}, O = { props: n, dataCache: e, smartData: c, eventHandler: i, propValue: t, element: l, events: s, router: a, route: w, compContext: g, dynamicColor: o, showFillColor: x, showLineColor: I, pathData: R, draw: T, drawChart: y, get useEventHandler() {
|
|
1163
|
+
return q;
|
|
1164
|
+
}, get useDataCacheStore() {
|
|
1165
|
+
return Z;
|
|
1166
|
+
}, get createSmartAccessor() {
|
|
1167
|
+
return $;
|
|
1168
|
+
}, get CreateCompContext() {
|
|
1169
|
+
return X;
|
|
1170
|
+
}, ref: _, computed: p, onMounted: N, onBeforeMount: K, onBeforeUnmount: G, onUnmounted: U, watch: k, get useRoute() {
|
|
1171
|
+
return J;
|
|
1172
|
+
}, get useRouter() {
|
|
1173
|
+
return Y;
|
|
1174
|
+
}, get CommonUtils() {
|
|
1175
|
+
return z;
|
|
1176
|
+
}, get useDynamicColor() {
|
|
1177
|
+
return de;
|
|
1178
|
+
} };
|
|
1179
|
+
return Object.defineProperty(O, "__isScriptSetup", { enumerable: !1, value: !0 }), O;
|
|
1180
|
+
}
|
|
1181
|
+
});
|
|
1182
|
+
function Ut(r, b, n, e, c, i) {
|
|
1183
|
+
return A(), M("div", { class: "svg-container" }, [
|
|
1184
|
+
(A(), M("svg", {
|
|
1185
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1186
|
+
width: e.element.style.width,
|
|
1187
|
+
height: e.element.style.height
|
|
1188
|
+
}, [
|
|
1189
|
+
ne("path", {
|
|
1190
|
+
d: e.pathData,
|
|
1191
|
+
stroke: e.showLineColor,
|
|
1192
|
+
"stroke-width": e.propValue.strokeWidth,
|
|
1193
|
+
fill: e.showFillColor
|
|
1194
|
+
}, null, 8, ["d", "stroke", "stroke-width", "fill"])
|
|
1195
|
+
], 8, ["width", "height"]))
|
|
1196
|
+
]);
|
|
1197
|
+
}
|
|
1198
|
+
const Xt = /* @__PURE__ */ ae(Kt, [["render", Ut], ["__scopeId", "data-v-aec13cc0"], ["__file", "Component.vue"]]), qt = /* @__PURE__ */ Object.assign({
|
|
1199
|
+
name: "SVGVLine"
|
|
1200
|
+
}, {
|
|
1201
|
+
__name: "Component",
|
|
1202
|
+
props: {
|
|
1203
|
+
propValue: {
|
|
1204
|
+
type: Object,
|
|
1205
|
+
required: !0,
|
|
1206
|
+
default: () => {
|
|
1207
|
+
}
|
|
1208
|
+
},
|
|
1209
|
+
element: {
|
|
1210
|
+
type: Object,
|
|
1211
|
+
default: () => {
|
|
1212
|
+
}
|
|
1213
|
+
},
|
|
1214
|
+
designStatus: {
|
|
1215
|
+
type: Boolean,
|
|
1216
|
+
default: !1
|
|
1217
|
+
}
|
|
1218
|
+
},
|
|
1219
|
+
setup(r, { expose: b }) {
|
|
1220
|
+
b();
|
|
1221
|
+
const n = r, e = Z(), c = $(e), i = _(null), t = p(() => n.propValue || {}), l = p(() => n.element || {}), s = p(() => l.value.events || []), a = Y(), w = J(), g = X(t, l, a, w);
|
|
1222
|
+
K(() => {
|
|
1223
|
+
i.value = q(s.value, n.designStatus, g), i.value?.beforeMount();
|
|
1224
|
+
}), N(() => {
|
|
1225
|
+
T(), i.value?.mounted();
|
|
1226
|
+
}), G(() => {
|
|
1227
|
+
i.value?.beforeUnmount();
|
|
1228
|
+
}), U(() => {
|
|
1229
|
+
i.value?.unmounted();
|
|
1230
|
+
});
|
|
1231
|
+
const { dynamicColor: o } = de(t, c, e.rules, z), x = p(() => o.lineColor ? o.lineColor : t.value.strokeColor ? t.value.strokeColor : "none"), I = _([]), R = _([]);
|
|
1232
|
+
k(() => l.value.style.width, (S) => {
|
|
1233
|
+
T();
|
|
1234
|
+
}), k(() => l.value.style.height, (S) => {
|
|
1235
|
+
T();
|
|
1236
|
+
});
|
|
1237
|
+
const T = () => {
|
|
1238
|
+
const { width: S, height: D } = l.value.style;
|
|
1239
|
+
y(S, D);
|
|
1240
|
+
}, y = (S, D) => {
|
|
1241
|
+
const f = [0.5, 0], v = [0.5, 1];
|
|
1242
|
+
I.value = [S * f[0], D * f[1]], R.value = [S * v[0], D * v[1]];
|
|
1243
|
+
}, O = { props: n, dataCache: e, smartData: c, eventHandler: i, propValue: t, element: l, events: s, router: a, route: w, compContext: g, dynamicColor: o, showLineColor: x, LineL1P1: I, LineL1P2: R, draw: T, drawChart: y, get useEventHandler() {
|
|
1244
|
+
return q;
|
|
1245
|
+
}, get useDataCacheStore() {
|
|
1246
|
+
return Z;
|
|
1247
|
+
}, get createSmartAccessor() {
|
|
1248
|
+
return $;
|
|
1249
|
+
}, get CreateCompContext() {
|
|
1250
|
+
return X;
|
|
1251
|
+
}, ref: _, computed: p, watch: k, onMounted: N, onBeforeMount: K, onBeforeUnmount: G, onUnmounted: U, get useRoute() {
|
|
1252
|
+
return J;
|
|
1253
|
+
}, get useRouter() {
|
|
1254
|
+
return Y;
|
|
1255
|
+
}, get CommonUtils() {
|
|
1256
|
+
return z;
|
|
1257
|
+
}, get useDynamicColor() {
|
|
1258
|
+
return de;
|
|
1259
|
+
} };
|
|
1260
|
+
return Object.defineProperty(O, "__isScriptSetup", { enumerable: !1, value: !0 }), O;
|
|
1261
|
+
}
|
|
1262
|
+
});
|
|
1263
|
+
function Yt(r, b, n, e, c, i) {
|
|
1264
|
+
return A(), M("div", { class: "svg-container" }, [
|
|
1265
|
+
(A(), M("svg", {
|
|
1266
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1267
|
+
width: e.element.style.width,
|
|
1268
|
+
height: e.element.style.height
|
|
1269
|
+
}, [
|
|
1270
|
+
ne("line", {
|
|
1271
|
+
x1: e.LineL1P1[0],
|
|
1272
|
+
y1: e.LineL1P1[1],
|
|
1273
|
+
x2: e.LineL1P2[0],
|
|
1274
|
+
y2: e.LineL1P2[1],
|
|
1275
|
+
stroke: e.showLineColor,
|
|
1276
|
+
"stroke-width": e.propValue.strokeWidth,
|
|
1277
|
+
"stroke-dasharray": e.propValue.strokeDasharray
|
|
1278
|
+
}, [
|
|
1279
|
+
e.propValue.animate ? (A(), M("animate", {
|
|
1280
|
+
key: 0,
|
|
1281
|
+
attributeName: "stroke-dashoffset",
|
|
1282
|
+
from: e.propValue.animateFrom,
|
|
1283
|
+
to: e.propValue.animateTo,
|
|
1284
|
+
dur: e.propValue.animateDur + "s",
|
|
1285
|
+
repeatCount: "indefinite"
|
|
1286
|
+
}, null, 8, ["from", "to", "dur"])) : ue("", !0)
|
|
1287
|
+
], 8, ["x1", "y1", "x2", "y2", "stroke", "stroke-width", "stroke-dasharray"])
|
|
1288
|
+
], 8, ["width", "height"]))
|
|
1289
|
+
]);
|
|
1290
|
+
}
|
|
1291
|
+
const Jt = /* @__PURE__ */ ae(qt, [["render", Yt], ["__scopeId", "data-v-cddc7262"], ["__file", "Component.vue"]]), Qt = /* @__PURE__ */ Object.assign({
|
|
1292
|
+
name: "SVGWenBen"
|
|
1293
|
+
}, {
|
|
1294
|
+
__name: "Component",
|
|
1295
|
+
props: {
|
|
1296
|
+
propValue: {
|
|
1297
|
+
type: Object,
|
|
1298
|
+
required: !0,
|
|
1299
|
+
default: () => {
|
|
1300
|
+
}
|
|
1301
|
+
},
|
|
1302
|
+
element: {
|
|
1303
|
+
type: Object,
|
|
1304
|
+
default: () => {
|
|
1305
|
+
}
|
|
1306
|
+
},
|
|
1307
|
+
designStatus: {
|
|
1308
|
+
type: Boolean,
|
|
1309
|
+
default: !1
|
|
1310
|
+
}
|
|
1311
|
+
},
|
|
1312
|
+
setup(r, { expose: b }) {
|
|
1313
|
+
const n = r, e = _(null), c = p(() => n.propValue || {}), i = p(() => n.element || {}), t = p(() => i.value.events || []), l = _(0), s = _(0), a = _(""), w = _(""), g = (S) => {
|
|
1314
|
+
e.value?.handleClick(S);
|
|
1315
|
+
}, o = (S) => {
|
|
1316
|
+
e.value?.handleDblClick(S);
|
|
1317
|
+
};
|
|
1318
|
+
k(() => i.value.style.width, (S) => {
|
|
1319
|
+
x();
|
|
1320
|
+
}), k(() => i.value.style.height, (S) => {
|
|
1321
|
+
x();
|
|
1322
|
+
}), k(() => c.value.horizontalAlign, (S) => {
|
|
1323
|
+
x();
|
|
1324
|
+
}), k(() => c.value.offsetX, (S) => {
|
|
1325
|
+
x();
|
|
1326
|
+
});
|
|
1327
|
+
const x = () => {
|
|
1328
|
+
const { width: S, height: D } = n.element.style;
|
|
1329
|
+
I(S, D);
|
|
1330
|
+
}, I = (S, D) => {
|
|
1331
|
+
let f = n.propValue.horizontalAlign || "left", v = n.propValue.offsetX || 0;
|
|
1332
|
+
f == "center" ? (w.value = "middle", l.value = S * 0.5) : f == "right" ? (l.value = S - v, w.value = "end") : (l.value = 0 + v, w.value = "start"), a.value = "central", s.value = D * 0.5;
|
|
1333
|
+
}, R = Y(), T = J(), y = X(c, i, R, T);
|
|
1334
|
+
K(() => {
|
|
1335
|
+
e.value = q(t.value, n.designStatus, y), e.value?.beforeMount();
|
|
1336
|
+
}), N(() => {
|
|
1337
|
+
x(), e.value?.mounted();
|
|
1338
|
+
}), G(() => {
|
|
1339
|
+
e.value?.beforeUnmount();
|
|
1340
|
+
}), U(() => {
|
|
1341
|
+
e.value?.unmounted();
|
|
1342
|
+
}), b({
|
|
1343
|
+
handleClick: g
|
|
1344
|
+
});
|
|
1345
|
+
const O = { props: n, eventHandler: e, propValue: c, element: i, events: t, textX: l, textY: s, textBaseLine: a, textAnchor: w, handleClick: g, handleDblClick: o, draw: x, drawChart: I, router: R, route: T, compContext: y, get useEventHandler() {
|
|
1346
|
+
return q;
|
|
1347
|
+
}, get useDataCacheStore() {
|
|
1348
|
+
return Z;
|
|
1349
|
+
}, get createSmartAccessor() {
|
|
1350
|
+
return $;
|
|
1351
|
+
}, get CreateCompContext() {
|
|
1352
|
+
return X;
|
|
1353
|
+
}, watch: k, onMounted: N, computed: p, ref: _, onBeforeMount: K, onBeforeUnmount: G, onUnmounted: U, get useRoute() {
|
|
1354
|
+
return J;
|
|
1355
|
+
}, get useRouter() {
|
|
1356
|
+
return Y;
|
|
1357
|
+
} };
|
|
1358
|
+
return Object.defineProperty(O, "__isScriptSetup", { enumerable: !1, value: !0 }), O;
|
|
1359
|
+
}
|
|
1360
|
+
});
|
|
1361
|
+
function Zt(r, b, n, e, c, i) {
|
|
1362
|
+
return A(), M("div", {
|
|
1363
|
+
class: "svg-container",
|
|
1364
|
+
onClick: e.handleClick,
|
|
1365
|
+
onDblclick: e.handleDblClick
|
|
1366
|
+
}, [
|
|
1367
|
+
(A(), M("svg", {
|
|
1368
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1369
|
+
width: e.element.style.width,
|
|
1370
|
+
height: e.element.style.height
|
|
1371
|
+
}, [
|
|
1372
|
+
e.propValue.hasBackground ? (A(), M("rect", {
|
|
1373
|
+
key: 0,
|
|
1374
|
+
x: 1,
|
|
1375
|
+
y: 1,
|
|
1376
|
+
width: e.element.style.width - 2,
|
|
1377
|
+
height: e.element.style.height - 2,
|
|
1378
|
+
rx: e.propValue.rx,
|
|
1379
|
+
ry: e.propValue.ry,
|
|
1380
|
+
fill: e.propValue.fillColor ? e.propValue.fillColor : "none",
|
|
1381
|
+
stroke: e.propValue.strokeColor,
|
|
1382
|
+
"fill-opacity": e.propValue.fillOpacity,
|
|
1383
|
+
"stroke-opacity": e.propValue.strokeOpacity,
|
|
1384
|
+
"stroke-width": e.propValue.strokeWidth
|
|
1385
|
+
}, null, 8, ["width", "height", "rx", "ry", "fill", "stroke", "fill-opacity", "stroke-opacity", "stroke-width"])) : ue("", !0),
|
|
1386
|
+
se(),
|
|
1387
|
+
ne("text", {
|
|
1388
|
+
x: e.textX,
|
|
1389
|
+
y: e.textY,
|
|
1390
|
+
dx: e.propValue.dx,
|
|
1391
|
+
fill: e.propValue.fontColor ? e.propValue.fontColor : "none",
|
|
1392
|
+
"dominant-baseline": e.textBaseLine,
|
|
1393
|
+
"text-anchor": e.textAnchor,
|
|
1394
|
+
"font-family": e.propValue.fontFamily,
|
|
1395
|
+
"font-size": e.propValue.fontSize,
|
|
1396
|
+
"font-weight": e.propValue.fontWeight
|
|
1397
|
+
}, ge(e.propValue.text), 9, ["x", "y", "dx", "fill", "dominant-baseline", "text-anchor", "font-family", "font-size", "font-weight"])
|
|
1398
|
+
], 8, ["width", "height"]))
|
|
1399
|
+
], 32);
|
|
1400
|
+
}
|
|
1401
|
+
const $t = /* @__PURE__ */ ae(Qt, [["render", Zt], ["__scopeId", "data-v-3afa4979"], ["__file", "Component.vue"]]), el = /* @__PURE__ */ Object.assign({
|
|
1402
|
+
name: "SVGWenBen2"
|
|
1403
|
+
}, {
|
|
1404
|
+
__name: "Component",
|
|
1405
|
+
props: {
|
|
1406
|
+
propValue: {
|
|
1407
|
+
type: Object,
|
|
1408
|
+
required: !0,
|
|
1409
|
+
default: () => {
|
|
1410
|
+
}
|
|
1411
|
+
},
|
|
1412
|
+
element: {
|
|
1413
|
+
type: Object,
|
|
1414
|
+
default: () => {
|
|
1415
|
+
}
|
|
1416
|
+
},
|
|
1417
|
+
designStatus: {
|
|
1418
|
+
type: Boolean,
|
|
1419
|
+
default: !0
|
|
1420
|
+
}
|
|
1421
|
+
},
|
|
1422
|
+
setup(r, { expose: b }) {
|
|
1423
|
+
b();
|
|
1424
|
+
const { isNotEmpty: n } = z, e = r, c = p(() => e.propValue || {}), i = p(() => e.element || {}), t = p(() => i.value.events || []), l = _(null), s = p(() => {
|
|
1425
|
+
const { width: f, height: v } = i.value.style;
|
|
1426
|
+
let j = f / 2, P = v / 2;
|
|
1427
|
+
return n(c.value.translateX) || n(c.value.translateY) ? n(c.value.translateX) && n(c.value.translateY) ? `rotate(90,${j},${P}) translate(${c.value.translateX}, ${c.value.translateY})` : n(c.value.translateX) ? `rotate(90,${j},${P}) translate(${c.value.translateX}, 0)` : `rotate(90,${j},${P}) translate(0, ${c.value.translateY})` : `rotate(90,${j},${P})`;
|
|
1428
|
+
}), a = _(0), w = _(0), g = _(""), o = _(""), x = (f) => {
|
|
1429
|
+
l.value?.handleClick(f);
|
|
1430
|
+
}, I = (f) => {
|
|
1431
|
+
l.value?.handleDblClick(f);
|
|
1432
|
+
};
|
|
1433
|
+
k(() => i.value.style.width, (f) => {
|
|
1434
|
+
R();
|
|
1435
|
+
}), k(() => i.value.style.height, (f) => {
|
|
1436
|
+
R();
|
|
1437
|
+
}), k(() => c.value.horizontalAlign, (f) => {
|
|
1438
|
+
R();
|
|
1439
|
+
}), k(() => c.value.offsetX, (f) => {
|
|
1440
|
+
R();
|
|
1441
|
+
});
|
|
1442
|
+
const R = () => {
|
|
1443
|
+
const { width: f, height: v } = e.element.style;
|
|
1444
|
+
T(f, v);
|
|
1445
|
+
}, T = (f, v) => {
|
|
1446
|
+
let j = e.propValue.horizontalAlign || "left", P = e.propValue.offsetX || 0;
|
|
1447
|
+
j == "center" ? (o.value = "middle", a.value = f * 0.5) : j == "right" ? (a.value = f - P, o.value = "end") : (a.value = 0 + P, o.value = "start"), g.value = "central", w.value = v * 0.5;
|
|
1448
|
+
}, y = Y(), O = J(), S = X(c, i, y, O);
|
|
1449
|
+
K(() => {
|
|
1450
|
+
l.value = q(t.value, e.designStatus, S), l.value?.beforeMount();
|
|
1451
|
+
}), N(() => {
|
|
1452
|
+
R(), l.value?.mounted();
|
|
1453
|
+
}), G(() => {
|
|
1454
|
+
l.value?.beforeUnmount();
|
|
1455
|
+
}), U(() => {
|
|
1456
|
+
l.value?.unmounted();
|
|
1457
|
+
});
|
|
1458
|
+
const D = { isNotEmpty: n, props: e, propValue: c, element: i, events: t, eventHandler: l, transformAttr: s, textX: a, textY: w, textBaseLine: g, textAnchor: o, handleClick: x, handleDblClick: I, draw: R, drawChart: T, router: y, route: O, compContext: S, get useEventHandler() {
|
|
1459
|
+
return q;
|
|
1460
|
+
}, get useDataCacheStore() {
|
|
1461
|
+
return Z;
|
|
1462
|
+
}, get createSmartAccessor() {
|
|
1463
|
+
return $;
|
|
1464
|
+
}, get CreateCompContext() {
|
|
1465
|
+
return X;
|
|
1466
|
+
}, ref: _, watch: k, computed: p, onMounted: N, onBeforeMount: K, onBeforeUnmount: G, onUnmounted: U, get useRoute() {
|
|
1467
|
+
return J;
|
|
1468
|
+
}, get useRouter() {
|
|
1469
|
+
return Y;
|
|
1470
|
+
}, get CommonUtils() {
|
|
1471
|
+
return z;
|
|
1472
|
+
} };
|
|
1473
|
+
return Object.defineProperty(D, "__isScriptSetup", { enumerable: !1, value: !0 }), D;
|
|
1474
|
+
}
|
|
1475
|
+
});
|
|
1476
|
+
function tl(r, b, n, e, c, i) {
|
|
1477
|
+
return A(), M("div", {
|
|
1478
|
+
class: "svg-container",
|
|
1479
|
+
onClick: e.handleClick,
|
|
1480
|
+
onDblclick: e.handleDblClick
|
|
1481
|
+
}, [
|
|
1482
|
+
(A(), M("svg", {
|
|
1483
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1484
|
+
width: e.element.style.width,
|
|
1485
|
+
height: e.element.style.height
|
|
1486
|
+
}, [
|
|
1487
|
+
e.propValue.hasBackground ? (A(), M("rect", {
|
|
1488
|
+
key: 0,
|
|
1489
|
+
x: 1,
|
|
1490
|
+
y: 1,
|
|
1491
|
+
width: e.element.style.width - 2,
|
|
1492
|
+
height: e.element.style.height - 2,
|
|
1493
|
+
rx: e.propValue.rx,
|
|
1494
|
+
ry: e.propValue.ry,
|
|
1495
|
+
fill: e.propValue.fillColor ? e.propValue.fillColor : "none",
|
|
1496
|
+
stroke: e.propValue.strokeColor,
|
|
1497
|
+
"fill-opacity": e.propValue.fillOpacity,
|
|
1498
|
+
"stroke-opacity": e.propValue.strokeOpacity,
|
|
1499
|
+
"stroke-width": e.propValue.strokeWidth
|
|
1500
|
+
}, null, 8, ["width", "height", "rx", "ry", "fill", "stroke", "fill-opacity", "stroke-opacity", "stroke-width"])) : ue("", !0),
|
|
1501
|
+
se(),
|
|
1502
|
+
e.propValue.verticalText ? (A(), M("text", {
|
|
1503
|
+
key: 1,
|
|
1504
|
+
x: e.textX,
|
|
1505
|
+
y: e.textY,
|
|
1506
|
+
dx: e.propValue.dx,
|
|
1507
|
+
fill: e.propValue.fontColor ? e.propValue.fontColor : "none",
|
|
1508
|
+
"dominant-baseline": e.textBaseLine,
|
|
1509
|
+
"text-anchor": e.textAnchor,
|
|
1510
|
+
"font-family": e.propValue.fontFamily,
|
|
1511
|
+
"font-size": e.propValue.fontSize,
|
|
1512
|
+
"font-weight": e.propValue.fontWeight,
|
|
1513
|
+
style: { "letter-spacing": "5px" },
|
|
1514
|
+
transform: e.transformAttr,
|
|
1515
|
+
rotate: "-90"
|
|
1516
|
+
}, ge(e.propValue.text), 9, ["x", "y", "dx", "fill", "dominant-baseline", "text-anchor", "font-family", "font-size", "font-weight", "transform"])) : (A(), M("text", {
|
|
1517
|
+
key: 2,
|
|
1518
|
+
x: e.textX,
|
|
1519
|
+
y: e.textY,
|
|
1520
|
+
dx: e.propValue.dx,
|
|
1521
|
+
fill: e.propValue.fontColor ? e.propValue.fontColor : "none",
|
|
1522
|
+
"dominant-baseline": e.textBaseLine,
|
|
1523
|
+
"text-anchor": e.textAnchor,
|
|
1524
|
+
"font-family": e.propValue.fontFamily,
|
|
1525
|
+
"font-size": e.propValue.fontSize,
|
|
1526
|
+
"font-weight": e.propValue.fontWeight
|
|
1527
|
+
}, ge(e.propValue.text), 9, ["x", "y", "dx", "fill", "dominant-baseline", "text-anchor", "font-family", "font-size", "font-weight"]))
|
|
1528
|
+
], 8, ["width", "height"]))
|
|
1529
|
+
], 32);
|
|
1530
|
+
}
|
|
1531
|
+
const ll = /* @__PURE__ */ ae(el, [["render", tl], ["__scopeId", "data-v-0559f0da"], ["__file", "Component.vue"]]), ol = /* @__PURE__ */ Object.assign({
|
|
1532
|
+
name: "SVGRhombus"
|
|
1533
|
+
}, {
|
|
1534
|
+
__name: "Component",
|
|
1535
|
+
props: {
|
|
1536
|
+
propValue: {
|
|
1537
|
+
type: Object,
|
|
1538
|
+
required: !0,
|
|
1539
|
+
default: () => {
|
|
1540
|
+
}
|
|
1541
|
+
},
|
|
1542
|
+
element: {
|
|
1543
|
+
type: Object,
|
|
1544
|
+
default: () => {
|
|
1545
|
+
}
|
|
1546
|
+
},
|
|
1547
|
+
designStatus: {
|
|
1548
|
+
type: Boolean,
|
|
1549
|
+
default: !1
|
|
1550
|
+
}
|
|
1551
|
+
},
|
|
1552
|
+
setup(r, { expose: b }) {
|
|
1553
|
+
b();
|
|
1554
|
+
const { generateSecureUUID: n } = z, e = r, c = Z(), i = $(c), t = _(null), l = p(() => e.propValue || {}), s = p(() => e.element || {}), a = p(() => s.value.events || []), w = Y(), g = J(), o = X(l, s, w, g);
|
|
1555
|
+
K(() => {
|
|
1556
|
+
t.value = q(a.value, e.designStatus, o), t.value?.beforeMount(), D.value = n();
|
|
1557
|
+
}), N(() => {
|
|
1558
|
+
O(), t.value?.mounted();
|
|
1559
|
+
}), G(() => {
|
|
1560
|
+
t.value?.beforeUnmount();
|
|
1561
|
+
}), U(() => {
|
|
1562
|
+
t.value?.unmounted();
|
|
1563
|
+
});
|
|
1564
|
+
const { dynamicColor: x } = de(l, i, c.rules, z), I = p(() => x.fillColor ? x.fillColor : l.value.fillColor ? l.value.fillColor : "none"), R = p(() => x.lineColor ? x.lineColor : l.value.strokeColor ? l.value.strokeColor : "none"), T = _(""), y = _(2);
|
|
1565
|
+
k(() => s.value.style.width, (j) => {
|
|
1566
|
+
O();
|
|
1567
|
+
}), k(() => s.value.style.height, (j) => {
|
|
1568
|
+
O();
|
|
1569
|
+
}), k(() => l.value.tilt, (j) => {
|
|
1570
|
+
O();
|
|
1571
|
+
}), k(() => l.value.offsetLen, (j) => {
|
|
1572
|
+
O();
|
|
1573
|
+
});
|
|
1574
|
+
const O = () => {
|
|
1575
|
+
const { width: j, height: P } = s.value.style;
|
|
1576
|
+
S(j, P);
|
|
1577
|
+
}, S = (j, P) => {
|
|
1578
|
+
let L = l.value.tilt || "right", F = l.value.offsetLen || 0, m = [], d = 0, Q = Math.round((j - 2 * y.value) * 0.5);
|
|
1579
|
+
F = Number(F), F = F < 0 ? 0 : F, F = F > Q ? Q : F, L == "left" ? (m[d++] = y.value, m[d++] = ",", m[d++] = y.value, m[d++] = j - y.value - F, m[d++] = ",", m[d++] = y.value, m[d++] = j - y.value, m[d++] = ",", m[d++] = P - y.value, m[d++] = y.value + F, m[d++] = ",", m[d++] = P - y.value, m[d++] = y.value, m[d++] = ",", m[d++] = y.value, T.value = m.join(" ")) : (m[d++] = y.value + F, m[d++] = ",", m[d++] = y.value, m[d++] = j - y.value, m[d++] = ",", m[d++] = y.value, m[d++] = j - y.value - F, m[d++] = ",", m[d++] = P - y.value, m[d++] = y.value, m[d++] = ",", m[d++] = P - y.value, m[d++] = y.value + F, m[d++] = ",", m[d++] = y.value, T.value = m.join(" "));
|
|
1580
|
+
}, D = _(""), f = p(() => l.value.hasGradient ? `url(#${D.value})` : I.value), v = { generateSecureUUID: n, props: e, dataCache: c, smartData: i, eventHandler: t, propValue: l, element: s, events: a, router: w, route: g, compContext: o, dynamicColor: x, showFillColor: I, showLineColor: R, pointDatas: T, gap: y, draw: O, drawChart: S, gradientId: D, fillStyle: f, get useEventHandler() {
|
|
1581
|
+
return q;
|
|
1582
|
+
}, get useDataCacheStore() {
|
|
1583
|
+
return Z;
|
|
1584
|
+
}, get createSmartAccessor() {
|
|
1585
|
+
return $;
|
|
1586
|
+
}, get CreateCompContext() {
|
|
1587
|
+
return X;
|
|
1588
|
+
}, ref: _, computed: p, watch: k, onMounted: N, onBeforeMount: K, onBeforeUnmount: G, onUnmounted: U, get CommonUtils() {
|
|
1589
|
+
return z;
|
|
1590
|
+
}, get useRoute() {
|
|
1591
|
+
return J;
|
|
1592
|
+
}, get useRouter() {
|
|
1593
|
+
return Y;
|
|
1594
|
+
}, get useDynamicColor() {
|
|
1595
|
+
return de;
|
|
1596
|
+
} };
|
|
1597
|
+
return Object.defineProperty(v, "__isScriptSetup", { enumerable: !1, value: !0 }), v;
|
|
1598
|
+
}
|
|
1599
|
+
});
|
|
1600
|
+
function rl(r, b, n, e, c, i) {
|
|
1601
|
+
return A(), M("div", { class: "svg-container" }, [
|
|
1602
|
+
(A(), M("svg", {
|
|
1603
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1604
|
+
width: e.element.style.width,
|
|
1605
|
+
height: e.element.style.height
|
|
1606
|
+
}, [
|
|
1607
|
+
ue(" 根据条件判断是否渲染渐变定义 "),
|
|
1608
|
+
se(),
|
|
1609
|
+
e.propValue.hasGradient ? (A(), M("defs", { key: 0 }, [
|
|
1610
|
+
ue(" 这里根据渐变类型动态渲染线性或径向渐变 "),
|
|
1611
|
+
se(),
|
|
1612
|
+
e.propValue.gradientType === "linear" ? (A(), M("linearGradient", {
|
|
1613
|
+
key: 0,
|
|
1614
|
+
id: e.gradientId,
|
|
1615
|
+
x1: e.propValue.gradientX1 + "%",
|
|
1616
|
+
x2: e.propValue.gradientX2 + "%",
|
|
1617
|
+
y1: e.propValue.gradientY1 + "%",
|
|
1618
|
+
y2: e.propValue.gradientY2 + "%"
|
|
1619
|
+
}, [
|
|
1620
|
+
(A(), M("stop", {
|
|
1621
|
+
key: 1,
|
|
1622
|
+
offset: e.propValue.gradientStopsOffset + "%",
|
|
1623
|
+
"stop-color": e.propValue.gradientStopsColor
|
|
1624
|
+
}, null, 8, ["offset", "stop-color"])),
|
|
1625
|
+
se(),
|
|
1626
|
+
(A(), M("stop", {
|
|
1627
|
+
key: 2,
|
|
1628
|
+
offset: e.propValue.gradientStopsOffset2 + "%",
|
|
1629
|
+
"stop-color": e.propValue.gradientStopsColor2
|
|
1630
|
+
}, null, 8, ["offset", "stop-color"]))
|
|
1631
|
+
], 8, ["id", "x1", "x2", "y1", "y2"])) : (A(), M("radialGradient", {
|
|
1632
|
+
key: 1,
|
|
1633
|
+
id: e.gradientId,
|
|
1634
|
+
cx: e.propValue.gradientCx + "%",
|
|
1635
|
+
cy: e.propValue.gradientCy + "%",
|
|
1636
|
+
r: e.propValue.gradientR + "%",
|
|
1637
|
+
fx: e.propValue.gradientFx + "%",
|
|
1638
|
+
fy: e.propValue.gradientFy + "%"
|
|
1639
|
+
}, [
|
|
1640
|
+
(A(), M("stop", {
|
|
1641
|
+
key: 1,
|
|
1642
|
+
offset: e.propValue.gradientStopsOffset + "%",
|
|
1643
|
+
"stop-color": e.propValue.gradientStopsColor
|
|
1644
|
+
}, null, 8, ["offset", "stop-color"])),
|
|
1645
|
+
se(),
|
|
1646
|
+
(A(), M("stop", {
|
|
1647
|
+
key: 2,
|
|
1648
|
+
offset: e.propValue.gradientStopsOffset2 + "%",
|
|
1649
|
+
"stop-color": e.propValue.gradientStopsColor2
|
|
1650
|
+
}, null, 8, ["offset", "stop-color"]))
|
|
1651
|
+
], 8, ["id", "cx", "cy", "r", "fx", "fy"]))
|
|
1652
|
+
])) : ue("", !0),
|
|
1653
|
+
se(),
|
|
1654
|
+
ne("polygon", {
|
|
1655
|
+
points: e.pointDatas,
|
|
1656
|
+
stroke: e.showLineColor,
|
|
1657
|
+
"stroke-width": e.propValue.strokeWidth,
|
|
1658
|
+
"stroke-dasharray": e.propValue.strokeDasharray,
|
|
1659
|
+
"stroke-opacity": e.propValue.strokeOpacity,
|
|
1660
|
+
fill: e.fillStyle,
|
|
1661
|
+
"fill-opacity": e.propValue.fillOpacity
|
|
1662
|
+
}, null, 8, ["points", "stroke", "stroke-width", "stroke-dasharray", "stroke-opacity", "fill", "fill-opacity"])
|
|
1663
|
+
], 8, ["width", "height"]))
|
|
1664
|
+
]);
|
|
1665
|
+
}
|
|
1666
|
+
const nl = /* @__PURE__ */ ae(ol, [["render", rl], ["__scopeId", "data-v-78f636ae"], ["__file", "Component.vue"]]), al = {
|
|
1667
|
+
__name: "index",
|
|
1668
|
+
props: {
|
|
1669
|
+
propValue: {
|
|
1670
|
+
type: Object,
|
|
1671
|
+
required: !0,
|
|
1672
|
+
default: () => {
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
},
|
|
1676
|
+
setup(r, { expose: b }) {
|
|
1677
|
+
b();
|
|
1678
|
+
const n = r, e = p(() => n.propValue), c = _("");
|
|
1679
|
+
let i = null, t = 3, l = 0;
|
|
1680
|
+
N(() => {
|
|
1681
|
+
i = setInterval(s, 100);
|
|
1682
|
+
});
|
|
1683
|
+
const s = () => {
|
|
1684
|
+
let w = e.value.value || 0;
|
|
1685
|
+
if (isNaN(w))
|
|
1686
|
+
return;
|
|
1687
|
+
w <= 0 && (w = 0);
|
|
1688
|
+
let g = 48 - 46 * w / 100, o = [];
|
|
1689
|
+
o[0] = "M", o[1] = 0, o[2] = 25, o[3] = "Q", o[4] = 6.25, o[5] = 30, o[6] = ",", o[7] = 12.5, o[8] = 25, o[9] = "T", o[10] = 25, o[11] = 25, o[12] = "T", o[13] = 37.5, o[14] = 25, o[15] = "T", o[16] = 50, o[17] = 25, o[18] = "T", o[19] = 62.5, o[20] = 25, o[21] = "T", o[22] = 75, o[23] = 25, o[24] = "V", o[25] = 50, o[26] = "H", o[27] = 0, l += 1, l > 25 && (l = 0), o[1] = 0 - l, o[4] = 6.25 - l, o[7] = 12.5 - l, o[10] = 25 - l, o[13] = 37.5 - l, o[16] = 50 - l, o[19] = 62.5 - l, o[22] = 75 - l, o[2] = g, o[5] = g + t, o[8] = g, o[11] = g, o[14] = g, o[17] = g, o[20] = g, o[23] = g, c.value = o.join(" ");
|
|
1690
|
+
};
|
|
1691
|
+
G(() => {
|
|
1692
|
+
i && clearInterval(i);
|
|
1693
|
+
});
|
|
1694
|
+
const a = { props: n, propValue: e, pathData: c, get timer() {
|
|
1695
|
+
return i;
|
|
1696
|
+
}, set timer(w) {
|
|
1697
|
+
i = w;
|
|
1698
|
+
}, get waveVal() {
|
|
1699
|
+
return t;
|
|
1700
|
+
}, set waveVal(w) {
|
|
1701
|
+
t = w;
|
|
1702
|
+
}, get waveOffset() {
|
|
1703
|
+
return l;
|
|
1704
|
+
}, set waveOffset(w) {
|
|
1705
|
+
l = w;
|
|
1706
|
+
}, drawWave: s, computed: p, onBeforeUnmount: G, onMounted: N, ref: _ };
|
|
1707
|
+
return Object.defineProperty(a, "__isScriptSetup", { enumerable: !1, value: !0 }), a;
|
|
1708
|
+
}
|
|
1709
|
+
};
|
|
1710
|
+
function sl(r, b, n, e, c, i) {
|
|
1711
|
+
return A(), M("svg", {
|
|
1712
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1713
|
+
viewBox: "0 0 50 50"
|
|
1714
|
+
}, [
|
|
1715
|
+
ne("defs", null, [
|
|
1716
|
+
ne("clipPath", { id: "clipWave-507210b2-7385-44df-9082-2785295e5ac9" }, [
|
|
1717
|
+
ne("circle", {
|
|
1718
|
+
cx: "25",
|
|
1719
|
+
cy: "25",
|
|
1720
|
+
r: "23",
|
|
1721
|
+
fill: "black"
|
|
1722
|
+
})
|
|
1723
|
+
])
|
|
1724
|
+
]),
|
|
1725
|
+
se(),
|
|
1726
|
+
ne("circle", {
|
|
1727
|
+
cx: 25,
|
|
1728
|
+
cy: 25,
|
|
1729
|
+
r: 24,
|
|
1730
|
+
fill: "none",
|
|
1731
|
+
stroke: e.propValue.strokeColor,
|
|
1732
|
+
"stroke-width": 1
|
|
1733
|
+
}, null, 8, ["stroke"]),
|
|
1734
|
+
se(),
|
|
1735
|
+
ne("path", {
|
|
1736
|
+
d: e.pathData,
|
|
1737
|
+
fill: e.propValue.strokeColor2 ? e.propValue.strokeColor2 : "none",
|
|
1738
|
+
"clip-path": "url(#clipWave-507210b2-7385-44df-9082-2785295e5ac9)"
|
|
1739
|
+
}, null, 8, ["d", "fill"]),
|
|
1740
|
+
se(),
|
|
1741
|
+
ne("text", {
|
|
1742
|
+
x: 25,
|
|
1743
|
+
y: 25,
|
|
1744
|
+
fill: e.propValue.fontColor ? e.propValue.fontColor : "none",
|
|
1745
|
+
"font-size": e.propValue.fontSize,
|
|
1746
|
+
"font-family": e.propValue.fontFamily,
|
|
1747
|
+
"text-anchor": "middle",
|
|
1748
|
+
"dominant-baseline": "middle"
|
|
1749
|
+
}, ge(e.propValue.value) + `%\r
|
|
1750
|
+
`, 9, ["fill", "font-size", "font-family"])
|
|
1751
|
+
]);
|
|
1752
|
+
}
|
|
1753
|
+
const ul = /* @__PURE__ */ ae(al, [["render", sl], ["__file", "index.vue"]]), il = /* @__PURE__ */ Object.assign({
|
|
1754
|
+
name: "SVGLiquidFillBall"
|
|
1755
|
+
}, {
|
|
1756
|
+
__name: "Component",
|
|
1757
|
+
props: {
|
|
1758
|
+
propValue: {
|
|
1759
|
+
type: Object,
|
|
1760
|
+
required: !0,
|
|
1761
|
+
default: () => {
|
|
1762
|
+
}
|
|
1763
|
+
},
|
|
1764
|
+
element: {
|
|
1765
|
+
type: Object,
|
|
1766
|
+
default: () => {
|
|
1767
|
+
}
|
|
1768
|
+
},
|
|
1769
|
+
designStatus: {
|
|
1770
|
+
type: Boolean,
|
|
1771
|
+
default: !1
|
|
1772
|
+
}
|
|
1773
|
+
},
|
|
1774
|
+
setup(r, { expose: b }) {
|
|
1775
|
+
b();
|
|
1776
|
+
const { isObject: n, isValid: e, isNumber: c } = z, i = r, t = Z(), l = $(t), s = _(null), a = p(() => i.propValue || {}), w = p(() => i.element || {}), g = p(() => w.value.events || []), o = Y(), x = J(), I = X(a, w, o, x);
|
|
1777
|
+
K(() => {
|
|
1778
|
+
s.value = q(g.value, i.designStatus, I), s.value?.beforeMount();
|
|
1779
|
+
}), N(() => {
|
|
1780
|
+
s.value?.mounted();
|
|
1781
|
+
}), G(() => {
|
|
1782
|
+
s.value?.beforeUnmount();
|
|
1783
|
+
}), U(() => {
|
|
1784
|
+
s.value?.unmounted();
|
|
1785
|
+
});
|
|
1786
|
+
const R = (f) => {
|
|
1787
|
+
s.value?.handleClick(f);
|
|
1788
|
+
}, T = (f) => {
|
|
1789
|
+
s.value?.handleDblClick(f);
|
|
1790
|
+
}, y = l[a.value.dataCK];
|
|
1791
|
+
k(() => y.value, (f) => {
|
|
1792
|
+
e(f) && O(f);
|
|
1793
|
+
}, { immediate: !0 });
|
|
1794
|
+
function O(f) {
|
|
1795
|
+
S(f);
|
|
1796
|
+
}
|
|
1797
|
+
function S(f) {
|
|
1798
|
+
let v = null;
|
|
1799
|
+
n(f) ? v = f[a.value.valueKey] || null : v = f, c(v) && (a.value.value = Number(v));
|
|
1800
|
+
}
|
|
1801
|
+
const D = { isObject: n, isValid: e, isNumber: c, props: i, dataCache: t, smartData: l, eventHandler: s, propValue: a, element: w, events: g, router: o, route: x, compContext: I, handleClick: R, handleDblClick: T, bsData: y, dealBsData: O, parseBsData: S, get useEventHandler() {
|
|
1802
|
+
return q;
|
|
1803
|
+
}, get useDataCacheStore() {
|
|
1804
|
+
return Z;
|
|
1805
|
+
}, get createSmartAccessor() {
|
|
1806
|
+
return $;
|
|
1807
|
+
}, get CreateCompContext() {
|
|
1808
|
+
return X;
|
|
1809
|
+
}, ref: _, computed: p, watch: k, onMounted: N, onBeforeMount: K, onBeforeUnmount: G, onUnmounted: U, get useRoute() {
|
|
1810
|
+
return J;
|
|
1811
|
+
}, get useRouter() {
|
|
1812
|
+
return Y;
|
|
1813
|
+
}, get CommonUtils() {
|
|
1814
|
+
return z;
|
|
1815
|
+
}, LiquidFillBall: ul };
|
|
1816
|
+
return Object.defineProperty(D, "__isScriptSetup", { enumerable: !1, value: !0 }), D;
|
|
1817
|
+
}
|
|
1818
|
+
});
|
|
1819
|
+
function cl(r, b, n, e, c, i) {
|
|
1820
|
+
return A(), M("div", {
|
|
1821
|
+
class: "svg-container",
|
|
1822
|
+
onClick: e.handleClick,
|
|
1823
|
+
onDblclick: e.handleDblClick
|
|
1824
|
+
}, [
|
|
1825
|
+
be(e.LiquidFillBall, { "prop-value": e.propValue }, null, 8, ["prop-value"])
|
|
1826
|
+
], 32);
|
|
1827
|
+
}
|
|
1828
|
+
const dl = /* @__PURE__ */ ae(il, [["render", cl], ["__scopeId", "data-v-82417625"], ["__file", "Component.vue"]]), fl = /* @__PURE__ */ Object.assign({
|
|
1829
|
+
name: "SVGFile"
|
|
1830
|
+
}, {
|
|
1831
|
+
__name: "Component",
|
|
1832
|
+
props: {
|
|
1833
|
+
propValue: {
|
|
1834
|
+
type: Object,
|
|
1835
|
+
required: !0,
|
|
1836
|
+
default: () => {
|
|
1837
|
+
}
|
|
1838
|
+
},
|
|
1839
|
+
element: {
|
|
1840
|
+
type: Object,
|
|
1841
|
+
default: () => {
|
|
1842
|
+
}
|
|
1843
|
+
},
|
|
1844
|
+
designStatus: {
|
|
1845
|
+
type: Boolean,
|
|
1846
|
+
default: !1
|
|
1847
|
+
}
|
|
1848
|
+
},
|
|
1849
|
+
setup(r, { expose: b }) {
|
|
1850
|
+
b();
|
|
1851
|
+
const { isNotEmpty: n } = z, e = Ce(), c = _(null), i = r, t = Z(), l = $(t), s = _(null), a = p(() => i.propValue || {}), w = p(() => i.element || {}), g = p(() => w.value.events || []), o = Y(), x = J(), I = X(a, w, o, x);
|
|
1852
|
+
K(() => {
|
|
1853
|
+
s.value = q(g.value, i.designStatus, I), s.value?.beforeMount();
|
|
1854
|
+
}), N(() => {
|
|
1855
|
+
s.value?.mounted();
|
|
1856
|
+
}), G(() => {
|
|
1857
|
+
s.value?.beforeUnmount();
|
|
1858
|
+
}), U(() => {
|
|
1859
|
+
s.value?.unmounted();
|
|
1860
|
+
});
|
|
1861
|
+
const R = (d) => {
|
|
1862
|
+
s.value?.setParam(d);
|
|
1863
|
+
}, T = (d) => {
|
|
1864
|
+
s.value?.handleDblClick(d);
|
|
1865
|
+
}, y = _("");
|
|
1866
|
+
k(y, (d) => {
|
|
1867
|
+
ye(() => {
|
|
1868
|
+
c.value && d ? c.value.innerHTML = d : c.value && (c.value.innerHTML = "");
|
|
1869
|
+
});
|
|
1870
|
+
});
|
|
1871
|
+
const O = p(() => {
|
|
1872
|
+
let d = {};
|
|
1873
|
+
return n(a.value.firstColor) && (d["--custom-first-color"] = a.value.firstColor), n(a.value.secondColor) && (d["--custom-second-color"] = a.value.secondColor), n(a.value.thirdColor) && (d["--custom-third-color"] = a.value.thirdColor), n(a.value.fourColor) && (d["--custom-four-color"] = a.value.fourColor), n(a.value.fiveColor) && (d["--custom-five-color"] = a.value.fiveColor), d;
|
|
1874
|
+
}), S = (d) => {
|
|
1875
|
+
e.getFile(d, function(Q) {
|
|
1876
|
+
if (Q && Q.status == 200) {
|
|
1877
|
+
let ee = Q.data || "";
|
|
1878
|
+
y.value = D(ee);
|
|
1879
|
+
} else
|
|
1880
|
+
y.value = "";
|
|
1881
|
+
}, function(Q) {
|
|
1882
|
+
y.value = "";
|
|
1883
|
+
});
|
|
1884
|
+
};
|
|
1885
|
+
k(() => a.value.svgFile, (d) => {
|
|
1886
|
+
n(d) ? S(d) : y.value = "";
|
|
1887
|
+
}, { immediate: !0 }), k(() => a.value.aspectRatio, (d) => {
|
|
1888
|
+
n(a.value.svgFile) && S(a.value.svgFile);
|
|
1889
|
+
}, { immediate: !0 });
|
|
1890
|
+
const D = (d) => {
|
|
1891
|
+
const Q = a.value.aspectRatio || "xMidYMid meet";
|
|
1892
|
+
return d.replace(/<svg([^>]*)width="[^"]*"/gi, "<svg$1").replace(/<svg([^>]*)height="[^"]*"/gi, "<svg$1").replace(/<svg/, `<svg preserveAspectRatio="${Q}"`);
|
|
1893
|
+
}, f = p(() => {
|
|
1894
|
+
const d = a.value.svgFileCK;
|
|
1895
|
+
return n(d) ? l[d] : {};
|
|
1896
|
+
}), v = p(() => {
|
|
1897
|
+
const d = a.value.firstColorCK;
|
|
1898
|
+
return n(d) ? l[d] : {};
|
|
1899
|
+
}), j = p(() => {
|
|
1900
|
+
const d = a.value.secondColorCK;
|
|
1901
|
+
return n(d) ? l[d] : {};
|
|
1902
|
+
}), P = p(() => {
|
|
1903
|
+
const d = a.value.thirdColorCK;
|
|
1904
|
+
return n(d) ? l[d] : {};
|
|
1905
|
+
}), L = p(() => {
|
|
1906
|
+
const d = a.value.fourColorCK;
|
|
1907
|
+
return n(d) ? l[d] : {};
|
|
1908
|
+
}), F = p(() => {
|
|
1909
|
+
const d = a.value.fiveColorCK;
|
|
1910
|
+
return n(d) ? l[d] : {};
|
|
1911
|
+
});
|
|
1912
|
+
k(() => f, (d) => {
|
|
1913
|
+
n(a.value.svgFileCK) && (a.value.svgFile = d);
|
|
1914
|
+
}), k(() => v, (d) => {
|
|
1915
|
+
n(a.value.firstColorCK) && (a.value.firstColor = d);
|
|
1916
|
+
}), k(() => j, (d) => {
|
|
1917
|
+
n(a.value.secondColorCK) && (a.value.secondColor = d);
|
|
1918
|
+
}), k(() => P, (d) => {
|
|
1919
|
+
n(a.value.thirdColorCK) && (a.value.thirdColor = d);
|
|
1920
|
+
}), k(() => L, (d) => {
|
|
1921
|
+
n(a.value.fourColorCK) && (a.value.fourColor = d);
|
|
1922
|
+
}), k(() => F, (d) => {
|
|
1923
|
+
n(a.value.fiveColorCK) && (a.value.fiveColor = d);
|
|
1924
|
+
});
|
|
1925
|
+
const m = { isNotEmpty: n, api: e, svgContainerRef: c, props: i, dataCache: t, smartData: l, eventHandler: s, propValue: a, element: w, events: g, router: o, route: x, compContext: I, handleClick: R, handleDblClick: T, svgContent: y, customStyle: O, loadSvgFile: S, removeSvgDimensions: D, fileData: f, firstColorData: v, secondColorData: j, thirdColorData: P, fourColorData: L, fiveColorData: F, get useEventHandler() {
|
|
1926
|
+
return q;
|
|
1927
|
+
}, get useDataCacheStore() {
|
|
1928
|
+
return Z;
|
|
1929
|
+
}, get createSmartAccessor() {
|
|
1930
|
+
return $;
|
|
1931
|
+
}, get CreateCompContext() {
|
|
1932
|
+
return X;
|
|
1933
|
+
}, ref: _, computed: p, watch: k, onMounted: N, onBeforeMount: K, onBeforeUnmount: G, onUnmounted: U, nextTick: ye, get CommonUtils() {
|
|
1934
|
+
return z;
|
|
1935
|
+
}, get useRoute() {
|
|
1936
|
+
return J;
|
|
1937
|
+
}, get useRouter() {
|
|
1938
|
+
return Y;
|
|
1939
|
+
}, get useApi() {
|
|
1940
|
+
return Ce;
|
|
1941
|
+
} };
|
|
1942
|
+
return Object.defineProperty(m, "__isScriptSetup", { enumerable: !1, value: !0 }), m;
|
|
1943
|
+
}
|
|
1944
|
+
});
|
|
1945
|
+
function pl(r, b, n, e, c, i) {
|
|
1946
|
+
return A(), M("div", {
|
|
1947
|
+
ref: "svgContainerRef",
|
|
1948
|
+
class: "svg-container",
|
|
1949
|
+
onClick: e.handleClick,
|
|
1950
|
+
onDblclick: e.handleDblClick,
|
|
1951
|
+
style: Ee(e.customStyle)
|
|
1952
|
+
}, null, 36);
|
|
1953
|
+
}
|
|
1954
|
+
const vl = /* @__PURE__ */ ae(fl, [["render", pl], ["__scopeId", "data-v-56539202"], ["__file", "Component.vue"]]), hl = {
|
|
1955
|
+
__name: "BaseGridTable",
|
|
1956
|
+
props: {
|
|
1957
|
+
// 网格边框配置 默认样式配置
|
|
1958
|
+
borderStyle: {
|
|
1959
|
+
type: Object,
|
|
1960
|
+
default: () => ({
|
|
1961
|
+
color: "#ddd",
|
|
1962
|
+
width: 1,
|
|
1963
|
+
dash: []
|
|
1964
|
+
})
|
|
1965
|
+
},
|
|
1966
|
+
// 自定义边框信息 4个边框 上下左右的顺序 可以带样式 没有则使用默认
|
|
1967
|
+
borders: { type: Array, default: () => [] },
|
|
1968
|
+
// 网格行列配置
|
|
1969
|
+
rows: { type: Number, default: 5 },
|
|
1970
|
+
cols: { type: Number, default: 5 },
|
|
1971
|
+
cellWidth: { type: Number, default: 100 },
|
|
1972
|
+
cellHeight: { type: Number, default: 50 },
|
|
1973
|
+
// 行列独立尺寸配置
|
|
1974
|
+
rowHeights: { type: Array, default: () => [] },
|
|
1975
|
+
colWidths: { type: Array, default: () => [] },
|
|
1976
|
+
// 行线样式
|
|
1977
|
+
rowStyle: {
|
|
1978
|
+
type: Object,
|
|
1979
|
+
default: () => ({
|
|
1980
|
+
color: "#999",
|
|
1981
|
+
width: 1,
|
|
1982
|
+
dash: []
|
|
1983
|
+
})
|
|
1984
|
+
},
|
|
1985
|
+
rowLine: {
|
|
1986
|
+
type: Array,
|
|
1987
|
+
default: () => []
|
|
1988
|
+
},
|
|
1989
|
+
// 列线样式
|
|
1990
|
+
colStyle: {
|
|
1991
|
+
type: Object,
|
|
1992
|
+
default: () => ({
|
|
1993
|
+
color: "#999",
|
|
1994
|
+
width: 1,
|
|
1995
|
+
dash: []
|
|
1996
|
+
})
|
|
1997
|
+
},
|
|
1998
|
+
colLine: {
|
|
1999
|
+
type: Array,
|
|
2000
|
+
default: () => []
|
|
2001
|
+
},
|
|
2002
|
+
cellStyle: {
|
|
2003
|
+
type: Array,
|
|
2004
|
+
default: () => []
|
|
2005
|
+
},
|
|
2006
|
+
// 合并单元格配置 row col 从0开始
|
|
2007
|
+
mergedCells: { type: Array, default: () => [] },
|
|
2008
|
+
// 斜线配置
|
|
2009
|
+
diagonalStyle: {
|
|
2010
|
+
type: Object,
|
|
2011
|
+
default: () => ({
|
|
2012
|
+
color: "#999",
|
|
2013
|
+
width: 1,
|
|
2014
|
+
dash: []
|
|
2015
|
+
})
|
|
2016
|
+
},
|
|
2017
|
+
// 斜线单元格配置 row col 从0开始 可以带样式 没有则使用默认样式
|
|
2018
|
+
diagonalCells: { type: Array, default: () => [] }
|
|
2019
|
+
},
|
|
2020
|
+
setup(r, { expose: b }) {
|
|
2021
|
+
const { consolePrint: n, isArray: e, isEven: c, isNotEmpty: i } = z, t = r, l = _(), s = _();
|
|
2022
|
+
let a = [], w = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
2023
|
+
const x = p(() => Array.from(
|
|
2024
|
+
{ length: t.rows },
|
|
2025
|
+
(u, h) => Number(t.rowHeights[h] || t.cellHeight)
|
|
2026
|
+
)), I = p(() => Array.from(
|
|
2027
|
+
{ length: t.cols },
|
|
2028
|
+
(u, h) => Number(t.colWidths[h] || t.cellWidth)
|
|
2029
|
+
)), R = p(
|
|
2030
|
+
() => I.value.reduce((u, h) => u + h, 0)
|
|
2031
|
+
), T = p(
|
|
2032
|
+
() => x.value.reduce((u, h) => u + h, 0)
|
|
2033
|
+
), y = () => {
|
|
2034
|
+
if (!s.value) return;
|
|
2035
|
+
n("debug", "绘制网格开始");
|
|
2036
|
+
const u = l.value;
|
|
2037
|
+
s.value.clearRect(0, 0, u.width, u.height), D(), O(u.width, u.height), f(), n("debug", "绘制网格完成");
|
|
2038
|
+
}, O = (u, h) => {
|
|
2039
|
+
let C = [], H = m();
|
|
2040
|
+
H.x1 = 0, H.y1 = 0, H.x2 = u, H.y2 = 0, S(H, 0), H.y1 += H.lineWidth / 2, H.y2 += H.lineWidth / 2, C.push(H);
|
|
2041
|
+
let W = m();
|
|
2042
|
+
W.x1 = u, W.y1 = 0, W.x2 = u, W.y2 = h, S(W, 3), W.x1 -= W.lineWidth / 2, W.x2 -= W.lineWidth / 2, C.push(W);
|
|
2043
|
+
let E = m();
|
|
2044
|
+
E.x1 = u, E.y1 = h, E.x2 = 0, E.y2 = h, S(E, 1), E.y1 -= E.lineWidth / 2, E.y2 -= E.lineWidth / 2, C.push(E);
|
|
2045
|
+
let V = m();
|
|
2046
|
+
V.x1 = 0, V.y1 = h, V.x2 = 0, V.y2 = 0, S(V, 2), V.x1 += V.lineWidth / 2, V.x2 += V.lineWidth / 2, C.push(V), d(s.value, C, !1);
|
|
2047
|
+
}, S = (u, h) => {
|
|
2048
|
+
u.strokeStyle = t.borderStyle.color, u.lineWidth = t.borderStyle.width, u.dash = t.borderStyle.dash, t.borders && e(t.borders) && t.borders.length > h && (u.strokeStyle = t.borders[h].color, u.lineWidth = t.borders[h].width, u.dash = t.borders[h].dash);
|
|
2049
|
+
}, D = () => {
|
|
2050
|
+
a = [], v();
|
|
2051
|
+
let u = [];
|
|
2052
|
+
for (let h = 0; h < t.rows; h++)
|
|
2053
|
+
for (let C = 0; C < t.cols; C++)
|
|
2054
|
+
j(u, h, C);
|
|
2055
|
+
d(s.value, u, !1);
|
|
2056
|
+
}, f = () => {
|
|
2057
|
+
if (e(t.diagonalCells) && t.diagonalCells.length > 0) {
|
|
2058
|
+
let u, h = [], C, H, W;
|
|
2059
|
+
for (let E = 0; E < t.diagonalCells.length; E++) {
|
|
2060
|
+
if (u = t.diagonalCells[E], !L(u.row, u.col) || (C = u.row + "_" + u.col, w.has(C)))
|
|
2061
|
+
continue;
|
|
2062
|
+
let V = m();
|
|
2063
|
+
if (H = u.row, W = u.col, u.reverse) {
|
|
2064
|
+
let te = a[H][W][0], fe = a[H][W][1], ve = te + F(I.value[u.col]), he = a[H][W][1] + F(x.value[u.row]);
|
|
2065
|
+
if (g.has(C)) {
|
|
2066
|
+
let pe = g.get(C), oe = 0;
|
|
2067
|
+
for (let re = 0; re < pe.colSpan; re++)
|
|
2068
|
+
oe += F(I.value[u.col + re]);
|
|
2069
|
+
ve = te + oe, oe = 0;
|
|
2070
|
+
for (let re = 0; re < pe.rowSpan; re++)
|
|
2071
|
+
oe += F(x.value[u.row + re]);
|
|
2072
|
+
he = fe + oe;
|
|
2073
|
+
}
|
|
2074
|
+
V.x1 = te, V.y1 = he, V.x2 = ve, V.y2 = fe, V.strokeStyle = u.color ?? t.diagonalStyle.color, V.lineWidth = u.width ?? t.diagonalStyle.width, V.dash = u.dash ?? t.diagonalStyle.dash, h.push(V);
|
|
2075
|
+
} else {
|
|
2076
|
+
let te = a[H][W][0], fe = a[H][W][1], ve = te + F(I.value[u.col]), he = fe + F(x.value[u.row]);
|
|
2077
|
+
if (g.has(C)) {
|
|
2078
|
+
let pe = g.get(C), oe = 0;
|
|
2079
|
+
for (let re = 0; re < pe.colSpan; re++)
|
|
2080
|
+
oe += F(I.value[u.col + re]);
|
|
2081
|
+
ve = te + oe, oe = 0;
|
|
2082
|
+
for (let re = 0; re < pe.rowSpan; re++)
|
|
2083
|
+
oe += F(x.value[u.row + re]);
|
|
2084
|
+
he = fe + oe;
|
|
2085
|
+
}
|
|
2086
|
+
V.x1 = te, V.y1 = fe, V.x2 = ve, V.y2 = he, V.strokeStyle = u.color ?? t.diagonalStyle.color, V.lineWidth = u.width ?? t.diagonalStyle.width, V.dash = u.dash ?? t.diagonalStyle.dash, h.push(V);
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
d(s.value, h, !1);
|
|
2090
|
+
}
|
|
2091
|
+
}, v = () => {
|
|
2092
|
+
let u = 0, h = 0, C = 0, H = 0;
|
|
2093
|
+
for (let W = 0; W < t.rows; W++) {
|
|
2094
|
+
a[W] = [], W == 0 ? u = 0 : u = F(x.value[W - 1]), C += u, H = 0;
|
|
2095
|
+
for (let E = 0; E < t.cols; E++)
|
|
2096
|
+
E == 0 ? h = 0 : h = F(I.value[E - 1]), H += h, a[W][E] = [H, C];
|
|
2097
|
+
}
|
|
2098
|
+
}, j = (u, h, C) => {
|
|
2099
|
+
let H = a[h][C][0], W = a[h][C][1], E = h + "_" + C, V;
|
|
2100
|
+
h > 0 && (V = m(), V.x1 = H, V.y1 = W, V.x2 = H + F(I.value[C]), V.y2 = W, V.r = h, V.c = C, w.has(E) ? w.get(E).sameRow && (P(V, h, C, 1), c(V.lineWidth) || (V.y1 += 0.5, V.y2 += 0.5), u.push(V)) : (P(V, h, C, 1), c(V.lineWidth) || (V.y1 += 0.5, V.y2 += 0.5), u.push(V))), C > 0 && (V = m(), V.x1 = H, V.y1 = W, V.x2 = H, V.y2 = W + F(x.value[h]), V.r = h, V.c = C, w.has(E) ? w.get(E).sameCol && (P(V, h, C, 2), c(V.lineWidth) || (V.x1 += 0.5, V.x2 += 0.5), u.push(V)) : (P(V, h, C, 2), c(V.lineWidth) || (V.x1 += 0.5, V.x2 += 0.5), u.push(V)));
|
|
2101
|
+
}, P = (u, h, C, H) => {
|
|
2102
|
+
let W = h + "_" + C, E = h, V = C;
|
|
2103
|
+
if (w.has(W)) {
|
|
2104
|
+
let te = w.get(W);
|
|
2105
|
+
E = te.startRow, V = te.startCol;
|
|
2106
|
+
}
|
|
2107
|
+
if (W = E + "_" + V, o.has(W)) {
|
|
2108
|
+
let te = o.get(W);
|
|
2109
|
+
u.strokeStyle = te.color, u.lineWidth = te.width, u.dash = te.dash;
|
|
2110
|
+
} else
|
|
2111
|
+
H == 1 ? e(t.rowLine) && t.rowLine.length > h ? (u.strokeStyle = t.rowLine[h].color, u.lineWidth = t.rowLine[h].width, u.dash = t.rowLine[h].dash) : (u.strokeStyle = t.rowStyle.color, u.lineWidth = t.rowStyle.width, u.dash = t.rowStyle.dash) : e(t.colLine) && t.colLine.length > C ? (u.strokeStyle = t.colLine[C].color, u.lineWidth = t.colLine[C].width, u.dash = t.colLine[C].dash) : (u.strokeStyle = t.colStyle.color, u.lineWidth = t.colStyle.width, u.dash = t.colStyle.dash);
|
|
2112
|
+
};
|
|
2113
|
+
N(() => {
|
|
2114
|
+
s.value = l.value.getContext("2d"), y();
|
|
2115
|
+
}), k(() => t.mergedCells, (u) => {
|
|
2116
|
+
if (u && (g.clear(), w.clear(), t.mergedCells.length > 0)) {
|
|
2117
|
+
let h, C;
|
|
2118
|
+
for (let H = 0; H < t.mergedCells.length; H++)
|
|
2119
|
+
if (h = t.mergedCells[H], !(h.row < 0 || g.col < 0) && (h.rowSpan >= 2 || h.colSpan >= 2)) {
|
|
2120
|
+
h.row + h.rowSpan > t.rows && (h.rowSpan = t.rows - h.row), h.col + h.colSpan > t.cols && (h.colSpan = t.cols - h.col);
|
|
2121
|
+
let W = 0, E = 0;
|
|
2122
|
+
g.set(h.row + "_" + h.col, { ...h });
|
|
2123
|
+
for (let V = 0; V < h.rowSpan; V++)
|
|
2124
|
+
for (let te = 0; te < h.colSpan; te++)
|
|
2125
|
+
V == 0 && te == 0 || (W = h.row + V, E = h.col + te, C = W + "_" + E, W == h.row ? w.set(C, {
|
|
2126
|
+
sameRow: !0,
|
|
2127
|
+
sameCol: !1,
|
|
2128
|
+
startRow: h.row,
|
|
2129
|
+
startCol: h.col
|
|
2130
|
+
}) : E == h.col ? w.set(C, {
|
|
2131
|
+
sameRow: !1,
|
|
2132
|
+
sameCol: !0,
|
|
2133
|
+
startRow: h.row,
|
|
2134
|
+
startCol: h.col
|
|
2135
|
+
}) : w.set(C, {
|
|
2136
|
+
sameRow: !1,
|
|
2137
|
+
sameCol: !1,
|
|
2138
|
+
startRow: h.row,
|
|
2139
|
+
startCol: h.col
|
|
2140
|
+
}));
|
|
2141
|
+
}
|
|
2142
|
+
}
|
|
2143
|
+
}, { immediate: !0 }), k(() => t.cellStyle, (u) => {
|
|
2144
|
+
if (u && (o.clear(), t.cellStyle.length > 0)) {
|
|
2145
|
+
let h;
|
|
2146
|
+
for (let C = 0; C < t.cellStyle.length; C++)
|
|
2147
|
+
h = t.cellStyle[C], L(h.row, h.col) && o.set(h.row + "_" + h.col, { ...h });
|
|
2148
|
+
}
|
|
2149
|
+
}, { immediate: !0 });
|
|
2150
|
+
const L = (u, h) => !(u < 0 || h < 0 || u > t.rows || h > t.cols), F = (u) => parseFloat(u) ?? 0, m = () => ({
|
|
2151
|
+
x1: 0,
|
|
2152
|
+
y1: 0,
|
|
2153
|
+
x2: 0,
|
|
2154
|
+
y2: 0,
|
|
2155
|
+
strokeStyle: "#F8F8FF",
|
|
2156
|
+
lineWidth: 1,
|
|
2157
|
+
dash: []
|
|
2158
|
+
}), d = (u, h, C) => {
|
|
2159
|
+
if (e(h) && h.length > 0) {
|
|
2160
|
+
let H = !!C;
|
|
2161
|
+
H && u.beginPath(), h.forEach((W, E) => {
|
|
2162
|
+
if (Number(W.lineWidth) > 0) {
|
|
2163
|
+
if (H || u.beginPath(), u.strokeStyle = W.strokeStyle, u.lineWidth = W.lineWidth, i(W.dash))
|
|
2164
|
+
if (e(W.dash))
|
|
2165
|
+
u.setLineDash(W.dash);
|
|
2166
|
+
else {
|
|
2167
|
+
let V = W.dash.split(",");
|
|
2168
|
+
u.setLineDash(V);
|
|
2169
|
+
}
|
|
2170
|
+
else
|
|
2171
|
+
u.setLineDash([]);
|
|
2172
|
+
u.moveTo(W.x1, W.y1), u.lineTo(W.x2, W.y2), u.closePath(), H || u.stroke();
|
|
2173
|
+
}
|
|
2174
|
+
}), H && u.stroke(), u.restore();
|
|
2175
|
+
}
|
|
2176
|
+
}, Q = () => {
|
|
2177
|
+
ye(() => {
|
|
2178
|
+
y();
|
|
2179
|
+
});
|
|
2180
|
+
};
|
|
2181
|
+
b({
|
|
2182
|
+
redraw: Q
|
|
2183
|
+
});
|
|
2184
|
+
const ee = { consolePrint: n, isArray: e, isEven: c, isNotEmpty: i, props: t, canvasRef: l, ctx: s, get cellPosition() {
|
|
2185
|
+
return a;
|
|
2186
|
+
}, set cellPosition(u) {
|
|
2187
|
+
a = u;
|
|
2188
|
+
}, get mergedCellInfo() {
|
|
2189
|
+
return w;
|
|
2190
|
+
}, set mergedCellInfo(u) {
|
|
2191
|
+
w = u;
|
|
2192
|
+
}, get mergeCellInfo() {
|
|
2193
|
+
return g;
|
|
2194
|
+
}, set mergeCellInfo(u) {
|
|
2195
|
+
g = u;
|
|
2196
|
+
}, get cellStyleMap() {
|
|
2197
|
+
return o;
|
|
2198
|
+
}, set cellStyleMap(u) {
|
|
2199
|
+
o = u;
|
|
2200
|
+
}, computedRowHeights: x, computedColWidths: I, canvasWidth: R, canvasHeight: T, drawGrid: y, _drawBorder: O, _setBorderStyle: S, _drawCellArea: D, _drawDiagonal: f, _calcCellPosition: v, drawCell: j, _setCellStyle: P, _checkValidCell: L, _getVal: F, _getDefaultLineObj: m, drawLine: d, redraw: Q, computed: p, onMounted: N, ref: _, watch: k, nextTick: ye, get CommonUtils() {
|
|
2201
|
+
return z;
|
|
2202
|
+
} };
|
|
2203
|
+
return Object.defineProperty(ee, "__isScriptSetup", { enumerable: !1, value: !0 }), ee;
|
|
2204
|
+
}
|
|
2205
|
+
};
|
|
2206
|
+
function gl(r, b, n, e, c, i) {
|
|
2207
|
+
return A(), M("div", { class: "canvas-grid-container" }, [
|
|
2208
|
+
ne("canvas", {
|
|
2209
|
+
ref: "canvasRef",
|
|
2210
|
+
width: e.canvasWidth,
|
|
2211
|
+
height: e.canvasHeight
|
|
2212
|
+
}, null, 8, ["width", "height"])
|
|
2213
|
+
]);
|
|
2214
|
+
}
|
|
2215
|
+
const ml = /* @__PURE__ */ ae(hl, [["render", gl], ["__scopeId", "data-v-6480756a"], ["__file", "BaseGridTable.vue"]]), yl = /* @__PURE__ */ Object.assign({
|
|
2216
|
+
name: "GridTable"
|
|
2217
|
+
}, {
|
|
2218
|
+
__name: "Component",
|
|
2219
|
+
props: {
|
|
2220
|
+
propValue: {
|
|
2221
|
+
type: Object,
|
|
2222
|
+
required: !0,
|
|
2223
|
+
default: () => {
|
|
2224
|
+
}
|
|
2225
|
+
},
|
|
2226
|
+
element: {
|
|
2227
|
+
type: Object,
|
|
2228
|
+
default: () => {
|
|
2229
|
+
}
|
|
2230
|
+
},
|
|
2231
|
+
designStatus: {
|
|
2232
|
+
type: Boolean,
|
|
2233
|
+
default: !1
|
|
2234
|
+
}
|
|
2235
|
+
},
|
|
2236
|
+
setup(r, { expose: b }) {
|
|
2237
|
+
const n = r, e = Z(), c = $(e), i = _(null), t = p(() => n.propValue || {}), l = p(() => n.element || {}), s = p(() => l.value.events || []), a = Y(), w = J(), g = X(t, l, a, w);
|
|
2238
|
+
K(() => {
|
|
2239
|
+
i.value = q(s.value, n.designStatus, g), i.value?.beforeMount();
|
|
2240
|
+
}), N(() => {
|
|
2241
|
+
i.value?.mounted();
|
|
2242
|
+
}), G(() => {
|
|
2243
|
+
i.value?.beforeUnmount();
|
|
2244
|
+
}), U(() => {
|
|
2245
|
+
i.value?.unmounted();
|
|
2246
|
+
});
|
|
2247
|
+
const o = _(null);
|
|
2248
|
+
k([() => l.value.style.width, () => l.value.style.height], ([O, S]) => {
|
|
2249
|
+
o.value && (t.value.autoResize ? T() : o.value.redraw());
|
|
2250
|
+
});
|
|
2251
|
+
const x = _([]), I = _([]), R = () => {
|
|
2252
|
+
if (!t.value.autoResize)
|
|
2253
|
+
return;
|
|
2254
|
+
let O = Array.from(
|
|
2255
|
+
{ length: t.value.rows },
|
|
2256
|
+
(D, f) => t.value?.rowHeights?.length > f ? Number(t.value?.rowHeights[f] || t.value.cellHeight) ?? 0 : Number(t.value.cellHeight) ?? 0
|
|
2257
|
+
);
|
|
2258
|
+
if (l.value.style.height > 0) {
|
|
2259
|
+
let D = 0;
|
|
2260
|
+
D = O.reduce((L, F) => L + F, 0);
|
|
2261
|
+
let f = [], v = 0;
|
|
2262
|
+
for (let L = 0; L < t.value.rows; L++)
|
|
2263
|
+
f[L] = Math.floor(O[L] / D * l.value.style.height, 0), v += f[L];
|
|
2264
|
+
let j = l.value.style.height - v, P = Math.min(j, t.value.rows);
|
|
2265
|
+
for (let L = P - 1; L >= 0; L--)
|
|
2266
|
+
f[L] += 1;
|
|
2267
|
+
x.value = [...f];
|
|
2268
|
+
}
|
|
2269
|
+
let S = Array.from(
|
|
2270
|
+
{ length: t.value.cols },
|
|
2271
|
+
(D, f) => t.value?.colWidths?.length > f ? Number(t.value?.colWidths[f] || t.value.cellWidth) ?? 0 : Number(t.value.cellWidth) ?? 0
|
|
2272
|
+
);
|
|
2273
|
+
if (l.value.style.width > 0) {
|
|
2274
|
+
let D = 0;
|
|
2275
|
+
D = S.reduce((L, F) => L + F, 0);
|
|
2276
|
+
let f = [], v = 0;
|
|
2277
|
+
for (let L = 0; L < t.value.cols; L++)
|
|
2278
|
+
f[L] = Math.floor(S[L] / D * l.value.style.width, 0), v += f[L];
|
|
2279
|
+
let j = l.value.style.width - v, P = Math.min(j, t.value.cols);
|
|
2280
|
+
for (let L = P - 1; L >= 0; L--)
|
|
2281
|
+
f[L] += 1;
|
|
2282
|
+
I.value = [...f];
|
|
2283
|
+
}
|
|
2284
|
+
o.value?.redraw();
|
|
2285
|
+
}, T = we(R, 500);
|
|
2286
|
+
k(() => t.value.autoResize, (O) => {
|
|
2287
|
+
O && T();
|
|
2288
|
+
}, { immediate: !0 }), b({});
|
|
2289
|
+
const y = { props: n, dataCache: e, smartData: c, eventHandler: i, propValue: t, element: l, events: s, router: a, route: w, compContext: g, baseGridTableRef: o, rowHeights: x, colWidths: I, _autoCalcWidthAndHeight: R, debouncedAutoCalcWidthAndHeight: T, get useEventHandler() {
|
|
2290
|
+
return q;
|
|
2291
|
+
}, get useDataCacheStore() {
|
|
2292
|
+
return Z;
|
|
2293
|
+
}, get createSmartAccessor() {
|
|
2294
|
+
return $;
|
|
2295
|
+
}, get CreateCompContext() {
|
|
2296
|
+
return X;
|
|
2297
|
+
}, ref: _, computed: p, onMounted: N, onBeforeMount: K, onBeforeUnmount: G, onUnmounted: U, watch: k, reactive: Oe, get useRoute() {
|
|
2298
|
+
return J;
|
|
2299
|
+
}, get useRouter() {
|
|
2300
|
+
return Y;
|
|
2301
|
+
}, BaseGridTable: ml, get debounce() {
|
|
2302
|
+
return we;
|
|
2303
|
+
} };
|
|
2304
|
+
return Object.defineProperty(y, "__isScriptSetup", { enumerable: !1, value: !0 }), y;
|
|
2305
|
+
}
|
|
2306
|
+
});
|
|
2307
|
+
function Cl(r, b, n, e, c, i) {
|
|
2308
|
+
return A(), M("div", { class: "grid-container" }, [
|
|
2309
|
+
be(e.BaseGridTable, {
|
|
2310
|
+
ref: "baseGridTableRef",
|
|
2311
|
+
rows: e.propValue.rows,
|
|
2312
|
+
cols: e.propValue.cols,
|
|
2313
|
+
"cell-width": e.propValue.cellWidth,
|
|
2314
|
+
"cell-height": e.propValue.cellHeight,
|
|
2315
|
+
"row-heights": e.rowHeights,
|
|
2316
|
+
"col-widths": e.colWidths,
|
|
2317
|
+
"merged-cells": e.propValue.mergedCells,
|
|
2318
|
+
"diagonal-cells": e.propValue.diagonalCells,
|
|
2319
|
+
"row-style": e.propValue.rowStyle,
|
|
2320
|
+
"row-line": e.propValue.rowLine,
|
|
2321
|
+
"col-style": e.propValue.colStyle,
|
|
2322
|
+
"col-line": e.propValue.colLine,
|
|
2323
|
+
"cell-style": e.propValue.cellStyle,
|
|
2324
|
+
"diagonal-style": e.propValue.diagonalStyle,
|
|
2325
|
+
borders: e.propValue.borders,
|
|
2326
|
+
"border-style": e.propValue.borderStyle
|
|
2327
|
+
}, null, 8, ["rows", "cols", "cell-width", "cell-height", "row-heights", "col-widths", "merged-cells", "diagonal-cells", "row-style", "row-line", "col-style", "col-line", "cell-style", "diagonal-style", "borders", "border-style"])
|
|
2328
|
+
]);
|
|
2329
|
+
}
|
|
2330
|
+
const _l = /* @__PURE__ */ ae(yl, [["render", Cl], ["__scopeId", "data-v-dced3ee3"], ["__file", "Component.vue"]]), wl = [
|
|
2331
|
+
Ze,
|
|
2332
|
+
tt,
|
|
2333
|
+
jt,
|
|
2334
|
+
Wt,
|
|
2335
|
+
Pt,
|
|
2336
|
+
Bt,
|
|
2337
|
+
Et,
|
|
2338
|
+
zt,
|
|
2339
|
+
Xt,
|
|
2340
|
+
Jt,
|
|
2341
|
+
$t,
|
|
2342
|
+
ll,
|
|
2343
|
+
nl,
|
|
2344
|
+
dl,
|
|
2345
|
+
vl,
|
|
2346
|
+
_l
|
|
2347
|
+
], ke = (r) => {
|
|
2348
|
+
if (ke.installed)
|
|
2349
|
+
return;
|
|
2350
|
+
ke.installed = !0;
|
|
2351
|
+
const b = r._context.provides["hflvloader-api"];
|
|
2352
|
+
b && r.provide("hflvcomp-api", b), wl.forEach((n) => {
|
|
2353
|
+
r.component(n.name, n);
|
|
2354
|
+
});
|
|
2355
|
+
}, Vl = {
|
|
2356
|
+
install: ke
|
|
2357
|
+
};
|
|
2358
|
+
export {
|
|
2359
|
+
Vl as default
|
|
2360
|
+
};
|