g-ui-web 0.10.14 → 0.10.15
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 +70 -50
- 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
|
@@ -48353,7 +48353,7 @@ const mr = (e) => {
|
|
|
48353
48353
|
params: r[1] ? Ey.parse(r[1]) : {}
|
|
48354
48354
|
});
|
|
48355
48355
|
}
|
|
48356
|
-
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;
|
|
48356
|
+
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;
|
|
48357
48357
|
}, _x = (e) => Array.isArray(e) ? "数组" : typeof e == "object" && e !== null ? "对象" : typeof e == "string" ? "字符串" : "其他类型";
|
|
48358
48358
|
var i$e = {
|
|
48359
48359
|
name: "zh-cn",
|
|
@@ -94460,7 +94460,11 @@ const Sst = (e, t) => {
|
|
|
94460
94460
|
y.data.push(w[_.field]), y.name = w[_.title] || _.title, y.stack = _.stack;
|
|
94461
94461
|
}), p.push(y);
|
|
94462
94462
|
}), d.value.map((_) => {
|
|
94463
|
-
r.dbOptions.direction == "horizontal" ? v.push(
|
|
94463
|
+
r.dbOptions.direction == "horizontal" ? v.push(
|
|
94464
|
+
c == "function" ? r.dbOptions.xAxisField(_) : _[r.dbOptions.xAxisField]
|
|
94465
|
+
) : h.push(
|
|
94466
|
+
c == "function" ? r.dbOptions.xAxisField(_) : _[r.dbOptions.xAxisField]
|
|
94467
|
+
);
|
|
94464
94468
|
}), r.dbOptions.direction == "horizontal" ? h.push({ type: "value", name: "" }) : v.push({ type: "value", name: "" }), f ? (r.dbOptions.direction == "horizontal" ? (f.yAxis ? f.yAxis[0].data = v : f.yAxis = [{ data: v }], f.xAxis ? f.xAxis = Vn({}, f.xAxis, h) : f.xAxis = h) : (f.xAxis ? f.xAxis[0].data = h : f.xAxis = [{ data: h }], f.yAxis ? f.yAxis = Vn({}, f.yAxis, v) : f.yAxis = v), f.series ? f.series = Vn({}, f.series, p) : f.series = p) : (r.dbOptions.direction == "horizontal" ? (g.xAxis = h, g.yAxis = [{ data: v }]) : (g.xAxis = [{ data: h }], g.yAxis = v), g.series = p), r.dbOptions && r.dbOptions.yAxis && r.dbOptions.yAxis.yAxises) {
|
|
94465
94469
|
let _ = [];
|
|
94466
94470
|
r.dbOptions.yAxis.yAxises.map((y) => {
|
|
@@ -94475,7 +94479,15 @@ const Sst = (e, t) => {
|
|
|
94475
94479
|
}), r.dbOptions.direction == "horizontal" ? f.xAxis = Vn({}, f.xAxis, _) : f.yAxis = Vn({}, f.yAxis, _);
|
|
94476
94480
|
}
|
|
94477
94481
|
}
|
|
94478
|
-
f ? n.value = yB(
|
|
94482
|
+
f ? n.value = yB(
|
|
94483
|
+
f,
|
|
94484
|
+
r.dbOptions.columns.length,
|
|
94485
|
+
r.dbOptions.direction
|
|
94486
|
+
) : n.value = yB(
|
|
94487
|
+
g,
|
|
94488
|
+
r.dbOptions.columns.length,
|
|
94489
|
+
r.dbOptions.direction
|
|
94490
|
+
);
|
|
94479
94491
|
};
|
|
94480
94492
|
return Me(
|
|
94481
94493
|
() => r.dbOptions.data,
|
|
@@ -94510,7 +94522,7 @@ const Sst = (e, t) => {
|
|
|
94510
94522
|
]);
|
|
94511
94523
|
};
|
|
94512
94524
|
}
|
|
94513
|
-
}), Nst = /* @__PURE__ */ ma(Lst, [["__scopeId", "data-v-
|
|
94525
|
+
}), Nst = /* @__PURE__ */ ma(Lst, [["__scopeId", "data-v-f68384a8"]]), Pst = tr(Nst), $b = Jn(), $st = {
|
|
94514
94526
|
backgroundColor: $b.chartOption.backgroundColor,
|
|
94515
94527
|
color: $b.chartOption.colors,
|
|
94516
94528
|
tooltip: {
|
|
@@ -94726,59 +94738,67 @@ const Sst = (e, t) => {
|
|
|
94726
94738
|
},
|
|
94727
94739
|
setup(e, { expose: t }) {
|
|
94728
94740
|
const r = Jn(), n = e, a = z();
|
|
94729
|
-
let o =
|
|
94730
|
-
const
|
|
94731
|
-
let
|
|
94732
|
-
const
|
|
94733
|
-
let
|
|
94741
|
+
let o = n.options;
|
|
94742
|
+
const i = z({});
|
|
94743
|
+
let s = [], l = [], u = [], c = z(0);
|
|
94744
|
+
const d = z(null);
|
|
94745
|
+
let f = {
|
|
94734
94746
|
xAxis: [],
|
|
94735
94747
|
yAxis: [],
|
|
94736
94748
|
series: []
|
|
94737
94749
|
};
|
|
94738
|
-
const
|
|
94739
|
-
|
|
94740
|
-
|
|
94741
|
-
|
|
94742
|
-
|
|
94743
|
-
|
|
94744
|
-
|
|
94750
|
+
const p = () => {
|
|
94751
|
+
f = {
|
|
94752
|
+
xAxis: [],
|
|
94753
|
+
yAxis: [],
|
|
94754
|
+
series: []
|
|
94755
|
+
}, s = [], l = [], u = [];
|
|
94756
|
+
}, h = async (g) => {
|
|
94757
|
+
let m = z([]);
|
|
94758
|
+
p();
|
|
94759
|
+
const _ = Sg(n.dbOptions.xAxisField);
|
|
94760
|
+
if (m.value = g, m.value && n.dbOptions) {
|
|
94761
|
+
let y = [];
|
|
94762
|
+
n.dbOptions.yAxis && n.dbOptions.yAxis.yAxisFields ? y = n.dbOptions.columns.map((C) => {
|
|
94763
|
+
const x = n.dbOptions.yAxis.yAxisFields.find((S) => S.field === C.field);
|
|
94764
|
+
return x ? { ...C, ...x } : C;
|
|
94745
94765
|
}).concat(
|
|
94746
94766
|
n.dbOptions.yAxis.yAxisFields.filter(
|
|
94747
|
-
(
|
|
94767
|
+
(C) => !n.dbOptions.columns.some((x) => x.field === C.field)
|
|
94748
94768
|
)
|
|
94749
|
-
) :
|
|
94750
|
-
let
|
|
94751
|
-
if (
|
|
94752
|
-
let
|
|
94753
|
-
name:
|
|
94754
|
-
type:
|
|
94755
|
-
yAxisIndex:
|
|
94756
|
-
stack:
|
|
94769
|
+
) : y = n.dbOptions.columns;
|
|
94770
|
+
let w = [];
|
|
94771
|
+
if (y.map((C) => {
|
|
94772
|
+
let x = {
|
|
94773
|
+
name: C.title,
|
|
94774
|
+
type: C.type,
|
|
94775
|
+
yAxisIndex: C.yAxisIndex,
|
|
94776
|
+
stack: C.stack,
|
|
94757
94777
|
data: []
|
|
94758
94778
|
};
|
|
94759
|
-
|
|
94760
|
-
|
|
94761
|
-
}),
|
|
94762
|
-
}),
|
|
94763
|
-
|
|
94764
|
-
}),
|
|
94765
|
-
if (
|
|
94766
|
-
let
|
|
94767
|
-
n.dbOptions.yAxis.yAxises.map((
|
|
94768
|
-
let
|
|
94769
|
-
name:
|
|
94779
|
+
m.value.map((S) => {
|
|
94780
|
+
x.name = S[C.title] || C.title, x.data.push(S[C.field]);
|
|
94781
|
+
}), s.push(x), C.type == "bar" && w.push(C);
|
|
94782
|
+
}), w.length > 0 && (c.value = w.length), m.value.map((C) => {
|
|
94783
|
+
l.push(_ == "function" ? n.dbOptions.xAxisField(C) : C[n.dbOptions.xAxisField]);
|
|
94784
|
+
}), o) {
|
|
94785
|
+
if (o.xAxis ? o.xAxis[0].data = l : o.xAxis = [{ data: l }], o.yAxis ? o.yAxis = Vn({}, o.yAxis, u) : o.yAxis = u, o.series ? o.series = Vn({}, o.series, s) : o.series = s, n.dbOptions && n.dbOptions.yAxis && n.dbOptions.yAxis.yAxises) {
|
|
94786
|
+
let C = [];
|
|
94787
|
+
n.dbOptions.yAxis.yAxises.map((x) => {
|
|
94788
|
+
let S = {
|
|
94789
|
+
name: x.name,
|
|
94770
94790
|
type: "value",
|
|
94771
|
-
position:
|
|
94772
|
-
alignTicks:
|
|
94773
|
-
offset:
|
|
94791
|
+
position: x.position,
|
|
94792
|
+
alignTicks: x.alignTicks,
|
|
94793
|
+
offset: x.offset
|
|
94774
94794
|
};
|
|
94775
|
-
|
|
94776
|
-
}),
|
|
94795
|
+
C.push(S);
|
|
94796
|
+
}), o.yAxis = Vn({}, o.yAxis, C);
|
|
94777
94797
|
}
|
|
94778
94798
|
} else
|
|
94779
|
-
|
|
94799
|
+
f.xAxis = [{ data: l }], f.yAxis = u, f.series = s;
|
|
94780
94800
|
}
|
|
94781
|
-
|
|
94801
|
+
o ? (v(o), a.value = _B(o, c.value)) : (v(o), a.value = _B(f, c.value));
|
|
94782
94802
|
}, v = (g) => {
|
|
94783
94803
|
let m = [], _ = [];
|
|
94784
94804
|
return g.series.length > 0 && g.series.map((y, w) => {
|
|
@@ -94797,36 +94817,36 @@ const Sst = (e, t) => {
|
|
|
94797
94817
|
}
|
|
94798
94818
|
});
|
|
94799
94819
|
});
|
|
94800
|
-
}),
|
|
94820
|
+
}), g;
|
|
94801
94821
|
};
|
|
94802
94822
|
return Me(
|
|
94803
94823
|
() => n.dbOptions.data,
|
|
94804
94824
|
(g) => {
|
|
94805
|
-
|
|
94825
|
+
i.value = mr(g);
|
|
94806
94826
|
const m = ["http://", "https://", void 0];
|
|
94807
|
-
!g.path && !g.dsKey && !
|
|
94827
|
+
!g.path && !g.dsKey && !i.value.dataUrl && !(typeof g == "string" && m.some((_) => g.includes(_))) && i.value.loadStaticData(g), (typeof g == "string" || g.path) && i.value.reload(g.data);
|
|
94808
94828
|
},
|
|
94809
94829
|
{
|
|
94810
94830
|
deep: !0
|
|
94811
94831
|
}
|
|
94812
94832
|
), xe(async () => {
|
|
94813
|
-
|
|
94833
|
+
i.value = mr(n.dbOptions.data), i.value.on("load", (g) => {
|
|
94814
94834
|
h(g);
|
|
94815
94835
|
});
|
|
94816
94836
|
}), t({
|
|
94817
94837
|
props: n,
|
|
94818
|
-
barLineRef:
|
|
94838
|
+
barLineRef: d
|
|
94819
94839
|
}), (g, m) => {
|
|
94820
94840
|
const _ = xt("g-chart");
|
|
94821
94841
|
return k(), F("div", Gst, [
|
|
94822
94842
|
fe(_, $t({ options: a.value }, g.$attrs, {
|
|
94823
94843
|
ref_key: "barLineRef",
|
|
94824
|
-
ref:
|
|
94844
|
+
ref: d
|
|
94825
94845
|
}), null, 16, ["options"])
|
|
94826
94846
|
]);
|
|
94827
94847
|
};
|
|
94828
94848
|
}
|
|
94829
|
-
}), Kst = /* @__PURE__ */ ma(jst, [["__scopeId", "data-v-
|
|
94849
|
+
}), Kst = /* @__PURE__ */ ma(jst, [["__scopeId", "data-v-84757fc5"]]), Yst = tr(Kst), Uh = Jn(), qst = (e) => {
|
|
94830
94850
|
let t = [];
|
|
94831
94851
|
return e == "pie" ? t = [
|
|
94832
94852
|
{
|
package/lib/g-ui-web.js.gz
CHANGED
|
Binary file
|