g-ui-web 0.10.38 → 0.10.40
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/lib/g-ui-web.js +46 -45
- package/lib/g-ui-web.js.gz +0 -0
- package/lib/g-ui-web.umd.cjs +2 -2
- package/lib/style.css +1 -1
- package/lib/style.css.gz +0 -0
- package/package.json +1 -1
package/lib/g-ui-web.js
CHANGED
|
@@ -48359,7 +48359,7 @@ const mr = (e) => {
|
|
|
48359
48359
|
params: r[1] ? Ey.parse(r[1]) : {}
|
|
48360
48360
|
});
|
|
48361
48361
|
}
|
|
48362
|
-
return e.path && (t = new bx(e)), e.dsKey && (t = e), !e.path && !e.dsKey && !(typeof e == "string" && UE.some((r) => e.includes(r))) && !["string", "number"].includes(typeof e) && (t = new bx(e)), t;
|
|
48362
|
+
return e != null && e.path && (t = new bx(e)), e != null && e.dsKey && (t = e), !(e != null && e.path) && !(e != null && e.dsKey) && !(typeof e == "string" && UE.some((r) => e.includes(r))) && !["string", "number"].includes(typeof e) && (t = new bx(e)), t;
|
|
48363
48363
|
}, _x = (e) => Array.isArray(e) ? "数组" : typeof e == "object" && e !== null ? "对象" : typeof e == "string" ? "字符串" : "其他类型";
|
|
48364
48364
|
var i$e = {
|
|
48365
48365
|
name: "zh-cn",
|
|
@@ -97082,19 +97082,19 @@ const wlt = /* @__PURE__ */ _l(_lt), Clt = ["id"], xlt = /* @__PURE__ */ H({
|
|
|
97082
97082
|
}
|
|
97083
97083
|
},
|
|
97084
97084
|
setup(e, { expose: t }) {
|
|
97085
|
-
vc((
|
|
97086
|
-
"
|
|
97087
|
-
"
|
|
97088
|
-
|
|
97089
|
-
"
|
|
97090
|
-
"
|
|
97091
|
-
|
|
97092
|
-
|
|
97093
|
-
"
|
|
97085
|
+
vc((E) => ({
|
|
97086
|
+
"19bc4fa9": p.value,
|
|
97087
|
+
"003a6f8a": b.value,
|
|
97088
|
+
45244522: g.value,
|
|
97089
|
+
"901330a6": m.value,
|
|
97090
|
+
"572456a4": y.value,
|
|
97091
|
+
"0e3ffc78": h.value,
|
|
97092
|
+
"6cb0e7cc": d.value,
|
|
97093
|
+
"487b272c": f.value
|
|
97094
97094
|
}));
|
|
97095
97095
|
const r = Jn(), n = e, a = z();
|
|
97096
97096
|
let o = z([]), i = z([]);
|
|
97097
|
-
const s = z(null), l = O(() => `g-target-ach-${n.size}`),
|
|
97097
|
+
const s = z(null), l = n.options.isLegend == null ? !0 : n.options.isLegend, u = O(() => `g-target-ach-${n.size}`), c = O(() => `target-${n.type}`), d = O(() => `var(--el-color-${n.type}-lighter-7)`), f = O(() => `var(--color-${n.type})`), p = O(() => n.bg ? `var(--color-${n.type}-lights-7)` : ""), h = O(() => `var(--color-${n.type})`), v = O(() => {
|
|
97098
97098
|
if (n.aspect)
|
|
97099
97099
|
return n.aspectPlacement == "left" ? n.bg ? {
|
|
97100
97100
|
// 'margin-left': `calc(var(--layout-padding-default) * -0.6)`,
|
|
@@ -97121,58 +97121,58 @@ const wlt = /* @__PURE__ */ _l(_lt), Clt = ["id"], xlt = /* @__PURE__ */ H({
|
|
|
97121
97121
|
"border-right": "none",
|
|
97122
97122
|
"border-top": "none"
|
|
97123
97123
|
};
|
|
97124
|
-
}),
|
|
97124
|
+
}), g = O(() => {
|
|
97125
97125
|
if (n.aspect)
|
|
97126
97126
|
return `var(--color-${n.type}-lights-5)`;
|
|
97127
|
-
}),
|
|
97127
|
+
}), m = O(() => {
|
|
97128
97128
|
if (n.aspect)
|
|
97129
97129
|
return n.type != "default" ? `var(--color-${n.type})` : "var(--color-primary)";
|
|
97130
|
-
}),
|
|
97131
|
-
let
|
|
97132
|
-
const
|
|
97133
|
-
o.value =
|
|
97134
|
-
const
|
|
97130
|
+
}), b = O(() => n.type != "default" && !n.bg ? r.name.includes("white") ? "#F5F7FA" : "#171918" : "var(--color-primary-light-5)"), y = O(() => n.aspect ? "calc(var(--layout-padding-default) * 1.25)" : "calc(var(--layout-padding-default) * 0.625)");
|
|
97131
|
+
let w = z(0);
|
|
97132
|
+
const C = z({}), x = (E) => Math.floor(E) === E ? E.toString() : E.toFixed(2), S = async (E) => {
|
|
97133
|
+
o.value = E && E;
|
|
97134
|
+
const T = n.dbOptions.columns && n.dbOptions.dataField && n.dbOptions.columns.length > 0 && n.dbOptions.columns.find((M) => M.field === n.dbOptions.dataField), A = n.dbOptions.columns && n.dbOptions.kpiField && n.dbOptions.columns.length > 0 && n.dbOptions.columns.find((M) => M.field === n.dbOptions.kpiField);
|
|
97135
97135
|
if (n.dbOptions.rateField)
|
|
97136
|
-
|
|
97136
|
+
w.value = o.value[n.dbOptions.rateField];
|
|
97137
97137
|
else {
|
|
97138
|
-
let
|
|
97139
|
-
|
|
97138
|
+
let M = o.value[T == null ? void 0 : T.field] / o.value[A == null ? void 0 : A.field];
|
|
97139
|
+
w.value = x(parseFloat(M) * 100);
|
|
97140
97140
|
}
|
|
97141
97141
|
a.value = qut(
|
|
97142
97142
|
n.type,
|
|
97143
|
-
|
|
97143
|
+
w.value,
|
|
97144
97144
|
n.size,
|
|
97145
97145
|
n.bg,
|
|
97146
97146
|
n.options.subText
|
|
97147
97147
|
), i.value[0] = {
|
|
97148
|
-
title: E == null ? void 0 : E.title,
|
|
97149
|
-
field: o.value[E == null ? void 0 : E.field],
|
|
97150
|
-
unit: E == null ? void 0 : E.unit
|
|
97151
|
-
}, i.value[1] = {
|
|
97152
97148
|
title: T == null ? void 0 : T.title,
|
|
97153
97149
|
field: o.value[T == null ? void 0 : T.field],
|
|
97154
97150
|
unit: T == null ? void 0 : T.unit
|
|
97151
|
+
}, i.value[1] = {
|
|
97152
|
+
title: A == null ? void 0 : A.title,
|
|
97153
|
+
field: o.value[A == null ? void 0 : A.field],
|
|
97154
|
+
unit: A == null ? void 0 : A.unit
|
|
97155
97155
|
};
|
|
97156
97156
|
};
|
|
97157
97157
|
return Me(
|
|
97158
97158
|
() => n.dbOptions.data,
|
|
97159
|
-
(
|
|
97160
|
-
|
|
97161
|
-
const
|
|
97162
|
-
!
|
|
97159
|
+
(E) => {
|
|
97160
|
+
C.value = mr(E);
|
|
97161
|
+
const T = ["http://", "https://", void 0];
|
|
97162
|
+
!E.path && !E.dsKey && !C.value.dataUrl && !(typeof E == "string" && T.some((A) => E.includes(A))) && C.value.loadStaticData(E), (typeof E == "string" || E.path) && C.value.reload(E.data);
|
|
97163
97163
|
},
|
|
97164
97164
|
{
|
|
97165
97165
|
deep: !0
|
|
97166
97166
|
}
|
|
97167
97167
|
), xe(async () => {
|
|
97168
|
-
|
|
97169
|
-
|
|
97168
|
+
C.value = mr(n.dbOptions.data), C.value.on("load", (E) => {
|
|
97169
|
+
S(E);
|
|
97170
97170
|
});
|
|
97171
97171
|
}), t({
|
|
97172
97172
|
props: n,
|
|
97173
97173
|
targetAchRef: s
|
|
97174
|
-
}), (
|
|
97175
|
-
const
|
|
97174
|
+
}), (E, T) => {
|
|
97175
|
+
const A = xt("g-chart");
|
|
97176
97176
|
return k(), F("div", {
|
|
97177
97177
|
class: "g-target-ach-outbox",
|
|
97178
97178
|
ref_key: "targetAchRef",
|
|
@@ -97181,29 +97181,30 @@ const wlt = /* @__PURE__ */ _l(_lt), Clt = ["id"], xlt = /* @__PURE__ */ H({
|
|
|
97181
97181
|
n.aspect && n.bg && n.type != "default" ? (k(), F("div", {
|
|
97182
97182
|
key: 0,
|
|
97183
97183
|
class: "g-aspect",
|
|
97184
|
-
style: ht(
|
|
97184
|
+
style: ht(v.value)
|
|
97185
97185
|
}, Re(n.aspect), 5)) : ue("", !0),
|
|
97186
97186
|
$("div", {
|
|
97187
|
-
class: j(["g-target-ach",
|
|
97187
|
+
class: j(["g-target-ach", u.value])
|
|
97188
97188
|
}, [
|
|
97189
97189
|
$("div", Xut, Re(e.options.title), 1),
|
|
97190
97190
|
$("div", Zut, [
|
|
97191
|
-
fe(
|
|
97191
|
+
fe(A, { options: a.value }, null, 8, ["options"])
|
|
97192
97192
|
]),
|
|
97193
|
-
|
|
97194
|
-
|
|
97193
|
+
_(l) ? (k(), F("div", {
|
|
97194
|
+
key: 0,
|
|
97195
|
+
class: j(["targe", c.value])
|
|
97195
97196
|
}, [
|
|
97196
|
-
(k(!0), F(_t, null, Ot(_(i), (
|
|
97197
|
+
(k(!0), F(_t, null, Ot(_(i), (M) => (k(), F("div", Qut, [
|
|
97197
97198
|
$("div", Jut, [
|
|
97198
|
-
|
|
97199
|
-
$("span", ect, Re(
|
|
97199
|
+
T[0] || (T[0] = $("span", { class: "circle" }, null, -1)),
|
|
97200
|
+
$("span", ect, Re(M.title), 1)
|
|
97200
97201
|
]),
|
|
97201
97202
|
$("div", tct, [
|
|
97202
|
-
nr(Re(
|
|
97203
|
-
$("span", null, Re(
|
|
97203
|
+
nr(Re(M.field || "--") + " ", 1),
|
|
97204
|
+
$("span", null, Re(M.unit), 1)
|
|
97204
97205
|
])
|
|
97205
97206
|
]))), 256))
|
|
97206
|
-
], 2)
|
|
97207
|
+
], 2)) : ue("", !0)
|
|
97207
97208
|
], 2)
|
|
97208
97209
|
], 512);
|
|
97209
97210
|
};
|
package/lib/g-ui-web.js.gz
CHANGED
|
Binary file
|