x-next 1.3.1 → 1.5.0
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/AI_USAGE.md +2 -2
- package/CHANGELOG.md +71 -0
- package/dist/_utils/constant.d.ts +1 -1
- package/dist/_utils/palette.d.ts +6 -14
- package/dist/components/alert/Alert.vue.d.ts +9 -9
- package/dist/components/alert/index.d.ts +6 -6
- package/dist/components/button/ButtonGroup.vue.d.ts +22 -18
- package/dist/components/date-picker/DatePanel.vue.d.ts +342 -1
- package/dist/components/date-picker/DatePicker.vue.d.ts +343 -2
- package/dist/components/date-picker/index.d.ts +1765 -1083
- package/dist/components/dropdown/DropdownButton.vue.d.ts +2 -1
- package/dist/components/dropdown/index.d.ts +3 -0
- package/dist/components/form-input-tag/index.d.ts +26 -25
- package/dist/components/form-input-tag/interface.d.ts +8 -0
- package/dist/components/link/Link.vue.d.ts +4 -4
- package/dist/components/link/index.d.ts +6 -6
- package/dist/components/message/index.d.ts +3 -3
- package/dist/components/message/message.vue.d.ts +1 -1
- package/dist/components/notification/Notification.d.ts +1 -1
- package/dist/components/notification/index.d.ts +3 -3
- package/dist/components/popconfirm/src/types.d.ts +1 -1
- package/dist/components/progress/Progress.vue.d.ts +3 -3
- package/dist/components/progress/index.d.ts +3 -3
- package/dist/components/steps/context.d.ts +9 -0
- package/dist/components/tabs/TabPane.vue.d.ts +2 -0
- package/dist/components/tabs/index.d.ts +6 -0
- package/dist/components/tabs/interface.d.ts +4 -0
- package/dist/components/tag/Tag.vue.d.ts +14 -0
- package/dist/components/tag/index.d.ts +9 -0
- package/dist/components/tag/interface.d.ts +5 -0
- package/dist/components/trend-chart/components/TrendChart.d.ts +127 -17
- package/dist/components/trend-chart/components/trend-chart-curve.d.ts +27 -7
- package/dist/components/trend-chart/components/trend-chart-labels.d.ts +4 -0
- package/dist/components/trend-chart/helpers/getPadding.d.ts +3 -2
- package/dist/components/trend-chart/index.d.ts +223 -28
- package/dist/components/trend-chart/props.d.ts +63 -5
- package/dist/es/_styles/palette-aliases.js +182 -127
- package/dist/es/_utils/palette.js +49 -43
- package/dist/es/components/_components/picker/input-range.vue2.js +10 -10
- package/dist/es/components/_components/picker/input.vue2.js +20 -20
- package/dist/es/components/_components/select-view/select-view.js +2 -2
- package/dist/es/components/alert/Alert.vue.js +2 -2
- package/dist/es/components/alert/Alert.vue2.js +21 -20
- package/dist/es/components/button/Button.js +17 -17
- package/dist/es/components/button/ButtonGroup.vue2.js +11 -9
- package/dist/es/components/date-picker/DatePanel.vue.js +71 -62
- package/dist/es/components/date-picker/DatePanel.vue2.js +50 -40
- package/dist/es/components/date-picker/DatePicker.vue2.js +1 -1
- package/dist/es/components/dropdown/Dropdown.vue2.js +11 -4
- package/dist/es/components/dropdown/DropdownButton.vue.js +8 -7
- package/dist/es/components/dropdown/DropdownButton.vue2.js +19 -17
- package/dist/es/components/dropdown/DropdownSubmenu.vue.js +18 -17
- package/dist/es/components/form/form-item-label.vue.js +25 -22
- package/dist/es/components/form/form-item-label.vue2.js +1 -1
- package/dist/es/components/form-checkbox/icon-check.js +12 -43
- package/dist/es/components/form-input/InputPassword.vue2.js +2 -2
- package/dist/es/components/form-input/InputSearch.js +1 -1
- package/dist/es/components/form-input-number/InputNumber.js +4 -4
- package/dist/es/components/form-input-tag/InputTag.js +168 -147
- package/dist/es/components/form-input-tag/utils.js +21 -19
- package/dist/es/components/form-textarea/Textarea.vue2.js +1 -1
- package/dist/es/components/link/Link.vue2.js +1 -1
- package/dist/es/components/menu/MenuSubMenu.js +50 -36
- package/dist/es/components/menu/sub-menu-pop.vue2.js +30 -30
- package/dist/es/components/pagination/Pagination.js +73 -70
- package/dist/es/components/popconfirm/src/popup.vue.js +1 -1
- package/dist/es/components/progress/Progress.vue2.js +1 -1
- package/dist/es/components/steps/Step.vue2.js +51 -47
- package/dist/es/components/steps/Steps.vue2.js +22 -19
- package/dist/es/components/table/Table.js +1 -1
- package/dist/es/components/table/table-th.js +2 -2
- package/dist/es/components/tabs/TabPane.vue.js +11 -9
- package/dist/es/components/tabs/TabPane.vue2.js +28 -24
- package/dist/es/components/tabs/tabs-button.js +2 -2
- package/dist/es/components/tabs/tabs-nav.js +21 -19
- package/dist/es/components/tabs/tabs-tab.vue.js +10 -8
- package/dist/es/components/tag/Tag.vue.js +20 -20
- package/dist/es/components/tag/Tag.vue2.js +35 -28
- package/dist/es/components/time-picker/TimePanel.vue.js +30 -29
- package/dist/es/components/time-picker/TimePicker.vue2.js +1 -1
- package/dist/es/components/time-picker/TimeRangePanel.js +26 -23
- package/dist/es/components/trend-chart/components/TrendChart.js +208 -142
- package/dist/es/components/trend-chart/components/trend-chart-curve.js +124 -59
- package/dist/es/components/trend-chart/components/trend-chart-labels.js +43 -41
- package/dist/es/components/trend-chart/helpers/getPadding.js +3 -3
- package/dist/es/components/trend-chart/props.js +101 -33
- package/dist/es/components/trend-chart/themes.js +15 -15
- package/dist/es/components/watermark/controller.js +40 -40
- package/dist/es/icons/default/calendar.js +15 -0
- package/dist/es/icons/default/clock-circle.js +15 -0
- package/dist/es/icons/default/double-left.js +15 -0
- package/dist/es/icons/default/double-right.js +15 -0
- package/dist/es/icons/default/down.js +16 -0
- package/dist/es/icons/default/eye-invisible.js +20 -0
- package/dist/es/icons/default/eye.js +18 -0
- package/dist/es/icons/default/left.js +15 -0
- package/dist/es/icons/default/minus.js +16 -0
- package/dist/es/icons/default/plus.js +16 -0
- package/dist/es/icons/default/question-circle.js +18 -0
- package/dist/es/icons/default/right.js +15 -0
- package/dist/es/icons/default/search.js +16 -0
- package/dist/es/icons/default/up.js +16 -0
- package/dist/es/icons/icon.js +26 -25
- package/dist/es/icons/public/boxicons/basic.js +1893 -0
- package/dist/es/icons/public/boxicons/brands.js +304 -0
- package/dist/es/icons/public/boxicons/filled.js +1893 -0
- package/dist/es/icons/public/boxicons/index.js +24 -0
- package/dist/es/icons/public/boxicons/names.js +4082 -0
- package/dist/es/icons/registry.js +15 -15
- package/dist/es/locale/en-US.js +2 -1
- package/dist/es/locale/zh-CN.js +2 -1
- package/dist/es/style.css +1 -1
- package/dist/icons/default/calendar.d.ts +93 -0
- package/dist/icons/default/clock-circle.d.ts +93 -0
- package/dist/icons/{_self/down.d.ts → default/double-left.d.ts} +6 -0
- package/dist/icons/{_self/eye-invisible.d.ts → default/double-right.d.ts} +6 -0
- package/dist/icons/default/down.d.ts +93 -0
- package/dist/icons/default/eye-invisible.d.ts +93 -0
- package/dist/icons/default/eye.d.ts +93 -0
- package/dist/icons/{_self/eye.d.ts → default/left.d.ts} +7 -0
- package/dist/icons/default/minus.d.ts +93 -0
- package/dist/icons/{_self → default}/plus.d.ts +7 -0
- package/dist/icons/default/question-circle.d.ts +93 -0
- package/dist/icons/{_self/minus.d.ts → default/right.d.ts} +7 -0
- package/dist/icons/{_self → default}/search.d.ts +7 -0
- package/dist/icons/{_self → default}/up.d.ts +7 -0
- package/dist/icons/public/boxicons/basic.cjs +1 -0
- package/dist/icons/public/boxicons/basic.d.ts +2 -0
- package/dist/icons/public/boxicons/brands.cjs +1 -0
- package/dist/icons/public/boxicons/brands.d.ts +2 -0
- package/dist/icons/public/boxicons/filled.cjs +1 -0
- package/dist/icons/public/boxicons/filled.d.ts +2 -0
- package/dist/icons/public/boxicons/index.cjs +1 -0
- package/dist/icons/public/boxicons/index.d.ts +10 -0
- package/dist/icons/public/boxicons/names.d.ts +10 -0
- package/dist/icons/registry.d.ts +5 -0
- package/dist/index.cjs +4 -4
- package/dist/index.umd.js +4 -4
- package/dist/locale/interface.d.ts +2 -0
- package/dist/style/alert.css +1 -1
- package/dist/style/base.css +1 -1
- package/dist/style/button.css +1 -1
- package/dist/style/date-picker.css +1 -1
- package/dist/style/dialog.css +1 -1
- package/dist/style/drawer.css +1 -1
- package/dist/style/dropdown.css +1 -1
- package/dist/style/form-input-number.css +1 -1
- package/dist/style/form-input-tag.css +1 -1
- package/dist/style/form-input.css +1 -1
- package/dist/style/form-radio.css +1 -1
- package/dist/style/form-select.css +1 -1
- package/dist/style/form-textarea.css +1 -1
- package/dist/style/form.css +1 -1
- package/dist/style/link.css +1 -1
- package/dist/style/menu.css +1 -1
- package/dist/style/message-box.css +1 -1
- package/dist/style/network.css +1 -1
- package/dist/style/pagination.css +1 -1
- package/dist/style/popconfirm.css +1 -1
- package/dist/style/popover.css +1 -1
- package/dist/style/popup.css +1 -1
- package/dist/style/progress.css +1 -1
- package/dist/style/rate.css +1 -1
- package/dist/style/spin.css +1 -1
- package/dist/style/steps.css +1 -1
- package/dist/style/table.css +1 -1
- package/dist/style/tabs.css +1 -1
- package/dist/style/tag.css +1 -1
- package/dist/style/time-picker.css +1 -1
- package/dist/style/time-range-selector.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +31 -4
- package/dist/es/icons/_self/down.js +0 -16
- package/dist/es/icons/_self/eye-invisible.js +0 -13
- package/dist/es/icons/_self/eye.js +0 -13
- package/dist/es/icons/_self/minus.js +0 -13
- package/dist/es/icons/_self/plus.js +0 -12
- package/dist/es/icons/_self/question-message.js +0 -12
- package/dist/es/icons/_self/search.js +0 -13
- package/dist/es/icons/_self/up.js +0 -16
- package/dist/es/icons/_ui/calendar.js +0 -13
- package/dist/es/icons/_ui/time.js +0 -12
|
@@ -1,73 +1,75 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { getComponentPrefix as
|
|
3
|
-
import { trendChartLabelsProps as
|
|
1
|
+
import { defineComponent as h, computed as l, h as t } from "vue";
|
|
2
|
+
import { getComponentPrefix as v } from "../../../_utils/config.js";
|
|
3
|
+
import { trendChartLabelsProps as Y } from "../props.js";
|
|
4
4
|
import { TrendChartAxisColor as d } from "../themes.js";
|
|
5
|
-
const
|
|
6
|
-
name:
|
|
7
|
-
props:
|
|
5
|
+
const S = h({
|
|
6
|
+
name: v("TrendChartLabels"),
|
|
7
|
+
props: Y,
|
|
8
8
|
setup(e) {
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
const u = l(() => {
|
|
10
|
+
if (e.fontSize)
|
|
11
|
+
return e.fontSize;
|
|
12
|
+
const a = e.boundary.maxY - e.boundary.minY;
|
|
13
|
+
return a >= 100 ? 12 : a >= 60 ? 11 : 10;
|
|
14
|
+
}), c = l(() => e.color ?? "var(--x-color-text-secondary)"), b = l(() => ({
|
|
15
|
+
fill: c.value,
|
|
16
|
+
fontSize: `${u.value}px`
|
|
17
|
+
})), x = (a) => {
|
|
13
18
|
var y;
|
|
14
|
-
const
|
|
15
|
-
return { transform: `translate(${
|
|
16
|
-
},
|
|
17
|
-
const
|
|
18
|
-
return { transform: `translate(${
|
|
19
|
-
},
|
|
20
|
-
const
|
|
21
|
-
return
|
|
22
|
-
}
|
|
23
|
-
C(() => {
|
|
24
|
-
var a, t;
|
|
25
|
-
u.value && e.xLabels && e.xLabels.length && (l.xLabelHeight = ((a = u.value.querySelector("text")) == null ? void 0 : a.getBoundingClientRect().height) || 0), b.value && e.yLabels && e.yLabels > 0 && (l.yLabelHeight = ((t = b.value.querySelector("text")) == null ? void 0 : t.getBoundingClientRect().height) || 0);
|
|
26
|
-
});
|
|
27
|
-
const m = c(() => e.xLabels && e.xLabels.length ? n(
|
|
19
|
+
const n = ((y = e.xLabels) == null ? void 0 : y.length) ?? 0, r = n > 1 ? (e.boundary.maxX - e.boundary.minX) / (n - 1) : 0, o = n > 1 ? e.boundary.minX + r * a : e.boundary.minX + (e.boundary.maxX - e.boundary.minX) / 2, s = e.boundary.maxY;
|
|
20
|
+
return { transform: `translate(${o}, ${s})` };
|
|
21
|
+
}, f = (a) => {
|
|
22
|
+
const n = e.yLabels ?? 0, r = n > 1 ? (e.boundary.maxY - e.boundary.minY) / (n - 1) : 0, o = e.boundary.minX, s = n > 1 ? e.boundary.maxY - r * a : e.boundary.minY + (e.boundary.maxY - e.boundary.minY) / 2;
|
|
23
|
+
return { transform: `translate(${o}, ${s})` };
|
|
24
|
+
}, L = (a) => {
|
|
25
|
+
const n = e.yLabels ?? 0;
|
|
26
|
+
return n <= 1 ? e.minValue : e.minValue + (e.maxValue - e.minValue) / (n - 1) * a;
|
|
27
|
+
}, m = l(() => e.xLabels && e.xLabels.length ? t(
|
|
28
28
|
"g",
|
|
29
|
-
{ class: "x-labels"
|
|
29
|
+
{ class: "x-labels" },
|
|
30
30
|
e.xLabels.map(
|
|
31
|
-
(a,
|
|
32
|
-
|
|
31
|
+
(a, n) => t("g", { class: "label", ...x(n) }, [
|
|
32
|
+
t(
|
|
33
33
|
"text",
|
|
34
34
|
{
|
|
35
|
-
dy:
|
|
36
|
-
"text-anchor": "middle"
|
|
35
|
+
dy: u.value + 5,
|
|
36
|
+
"text-anchor": "middle",
|
|
37
|
+
style: b.value
|
|
37
38
|
},
|
|
38
39
|
a
|
|
39
40
|
),
|
|
40
|
-
|
|
41
|
+
t("line", { style: { stroke: d }, y2: 5 })
|
|
41
42
|
])
|
|
42
43
|
)
|
|
43
|
-
) : null),
|
|
44
|
+
) : null), i = l(() => {
|
|
44
45
|
if (e.yLabels && e.yLabels > 0) {
|
|
45
46
|
const a = [];
|
|
46
|
-
for (let
|
|
47
|
+
for (let n = 0; n < e.yLabels; n++)
|
|
47
48
|
a.push(
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
t("g", { class: "label", ...f(n) }, [
|
|
50
|
+
t(
|
|
50
51
|
"text",
|
|
51
52
|
{
|
|
52
53
|
dx: -10,
|
|
53
|
-
dy:
|
|
54
|
-
"text-anchor": "end"
|
|
54
|
+
dy: u.value / 4,
|
|
55
|
+
"text-anchor": "end",
|
|
56
|
+
style: b.value
|
|
55
57
|
},
|
|
56
|
-
e.yLabelsTextFormatter(
|
|
58
|
+
e.yLabelsTextFormatter(L(n))
|
|
57
59
|
),
|
|
58
|
-
|
|
60
|
+
t("line", { style: { stroke: d }, x1: 0, x2: -5 })
|
|
59
61
|
])
|
|
60
62
|
);
|
|
61
|
-
return
|
|
63
|
+
return t("g", { class: "y-labels" }, a);
|
|
62
64
|
}
|
|
63
65
|
return null;
|
|
64
66
|
});
|
|
65
67
|
return () => {
|
|
66
68
|
const a = [];
|
|
67
|
-
return m.value && a.push(m.value),
|
|
69
|
+
return m.value && a.push(m.value), i.value && a.push(i.value), t("g", a);
|
|
68
70
|
};
|
|
69
71
|
}
|
|
70
72
|
});
|
|
71
73
|
export {
|
|
72
|
-
|
|
74
|
+
S as default
|
|
73
75
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const
|
|
2
|
-
const t =
|
|
1
|
+
const l = (o) => {
|
|
2
|
+
const t = (typeof o == "number" ? `${o}` : o).split(" ").filter((r) => r !== "").map((r) => Number(r));
|
|
3
3
|
let e = {};
|
|
4
4
|
switch (t.length) {
|
|
5
5
|
case 4:
|
|
@@ -17,5 +17,5 @@ const r = (a) => {
|
|
|
17
17
|
return e;
|
|
18
18
|
};
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
l as default
|
|
21
21
|
};
|
|
@@ -1,56 +1,103 @@
|
|
|
1
|
-
import { definePropType as
|
|
1
|
+
import { definePropType as t } from "../../_utils/vue-eco.js";
|
|
2
2
|
import r from "./helpers/validatePadding.js";
|
|
3
|
-
const
|
|
3
|
+
const o = {
|
|
4
4
|
// 数据集
|
|
5
5
|
dataset: {
|
|
6
6
|
required: !0,
|
|
7
|
-
type:
|
|
7
|
+
type: t(Array),
|
|
8
8
|
default: () => []
|
|
9
9
|
},
|
|
10
10
|
status: {
|
|
11
|
-
type:
|
|
11
|
+
type: t(String),
|
|
12
12
|
default: void 0
|
|
13
13
|
},
|
|
14
|
+
// 图表高度,数字按 px 处理,也可传 '100%' 等 CSS 值
|
|
15
|
+
height: {
|
|
16
|
+
type: [Number, String],
|
|
17
|
+
default: 60
|
|
18
|
+
},
|
|
19
|
+
// 图表宽度,数字按 px 处理
|
|
20
|
+
width: {
|
|
21
|
+
type: [Number, String],
|
|
22
|
+
default: "100%"
|
|
23
|
+
},
|
|
14
24
|
// 网格属性
|
|
15
25
|
grid: {
|
|
16
26
|
default: null,
|
|
17
|
-
type:
|
|
27
|
+
type: t(Object)
|
|
18
28
|
},
|
|
19
29
|
// 标签属性
|
|
20
30
|
labels: {
|
|
21
31
|
default: null,
|
|
22
|
-
type:
|
|
32
|
+
type: t(Object)
|
|
23
33
|
},
|
|
24
|
-
//
|
|
34
|
+
// 最大值,传入后锁定数据域上界,超出部分被裁剪
|
|
25
35
|
max: {
|
|
26
36
|
type: Number
|
|
27
37
|
},
|
|
28
|
-
//
|
|
38
|
+
// 最小值,传入后锁定数据域下界,超出部分被裁剪
|
|
29
39
|
min: {
|
|
30
40
|
type: Number
|
|
31
41
|
},
|
|
32
|
-
//
|
|
42
|
+
// 绘制边距,支持 1-4 个非负数字字符串或单个非负数字
|
|
33
43
|
padding: {
|
|
34
44
|
default: "5",
|
|
35
|
-
type: String,
|
|
36
|
-
validator(
|
|
37
|
-
return r(
|
|
45
|
+
type: [String, Number],
|
|
46
|
+
validator(e) {
|
|
47
|
+
return typeof e == "number" ? Number.isFinite(e) && e >= 0 : r(e);
|
|
38
48
|
}
|
|
39
49
|
},
|
|
40
|
-
//
|
|
50
|
+
// 平滑曲线
|
|
51
|
+
smooth: {
|
|
52
|
+
default: !0,
|
|
53
|
+
type: Boolean
|
|
54
|
+
},
|
|
55
|
+
// 是否渲染描边
|
|
56
|
+
stroke: {
|
|
57
|
+
default: !0,
|
|
58
|
+
type: Boolean
|
|
59
|
+
},
|
|
60
|
+
// 是否渲染填充
|
|
61
|
+
fill: {
|
|
62
|
+
default: !0,
|
|
63
|
+
type: Boolean
|
|
64
|
+
},
|
|
65
|
+
// 数据点显示策略
|
|
66
|
+
showPoints: {
|
|
67
|
+
default: "auto",
|
|
68
|
+
type: t([Boolean, String]),
|
|
69
|
+
validator(e) {
|
|
70
|
+
return typeof e == "boolean" || e === "auto";
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
// 开启交互,开启后启用 mousemove 事件
|
|
41
74
|
interactive: {
|
|
42
75
|
default: !1,
|
|
43
76
|
type: Boolean
|
|
44
77
|
},
|
|
78
|
+
// 开启后 hover 时在激活点旁显示数值提示
|
|
79
|
+
tooltip: {
|
|
80
|
+
default: !1,
|
|
81
|
+
type: Boolean
|
|
82
|
+
},
|
|
83
|
+
// 数值提示的文本格式化
|
|
84
|
+
tooltipFormatter: {
|
|
85
|
+
default: (e) => `${e}`,
|
|
86
|
+
type: Function
|
|
87
|
+
},
|
|
88
|
+
// 无障碍名称,设置后为图表添加 role="img"
|
|
89
|
+
ariaLabel: {
|
|
90
|
+
type: String
|
|
91
|
+
},
|
|
45
92
|
// 主题
|
|
46
93
|
theme: {
|
|
47
|
-
type:
|
|
94
|
+
type: t(Object),
|
|
48
95
|
default: () => ({})
|
|
49
96
|
}
|
|
50
|
-
},
|
|
97
|
+
}, l = {
|
|
51
98
|
boundary: {
|
|
52
99
|
required: !0,
|
|
53
|
-
type:
|
|
100
|
+
type: t(Object),
|
|
54
101
|
default: () => {
|
|
55
102
|
}
|
|
56
103
|
},
|
|
@@ -67,16 +114,20 @@ const l = {
|
|
|
67
114
|
type: Number
|
|
68
115
|
},
|
|
69
116
|
activeLineParams: {
|
|
70
|
-
type:
|
|
117
|
+
type: t(Object)
|
|
71
118
|
},
|
|
72
119
|
data: {
|
|
73
120
|
required: !0,
|
|
74
|
-
type:
|
|
121
|
+
type: t(Array),
|
|
75
122
|
default: () => []
|
|
76
123
|
},
|
|
77
124
|
className: {
|
|
78
125
|
type: String
|
|
79
126
|
},
|
|
127
|
+
// 绘图区裁剪路径,避免 min/max 收窄后越界点画到图表外
|
|
128
|
+
clipPath: {
|
|
129
|
+
type: String
|
|
130
|
+
},
|
|
80
131
|
// 平滑
|
|
81
132
|
smooth: {
|
|
82
133
|
default: !0,
|
|
@@ -91,21 +142,30 @@ const l = {
|
|
|
91
142
|
default: !0,
|
|
92
143
|
type: Boolean
|
|
93
144
|
},
|
|
94
|
-
//
|
|
145
|
+
// 数据点显示策略
|
|
95
146
|
showPoints: {
|
|
96
|
-
default:
|
|
147
|
+
default: "auto",
|
|
148
|
+
type: t([Boolean, String]),
|
|
149
|
+
validator(e) {
|
|
150
|
+
return typeof e == "boolean" || e === "auto";
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
// 鼠标
|
|
154
|
+
tooltip: {
|
|
155
|
+
default: !1,
|
|
97
156
|
type: Boolean
|
|
98
157
|
},
|
|
99
|
-
|
|
100
|
-
|
|
158
|
+
tooltipFormatter: {
|
|
159
|
+
default: (e) => `${e}`,
|
|
160
|
+
type: Function
|
|
101
161
|
},
|
|
102
|
-
|
|
103
|
-
type:
|
|
162
|
+
theme: {
|
|
163
|
+
type: t(Object)
|
|
104
164
|
}
|
|
105
|
-
},
|
|
165
|
+
}, i = {
|
|
106
166
|
boundary: {
|
|
107
167
|
required: !0,
|
|
108
|
-
type:
|
|
168
|
+
type: t(Object),
|
|
109
169
|
default: () => {
|
|
110
170
|
}
|
|
111
171
|
},
|
|
@@ -125,10 +185,10 @@ const l = {
|
|
|
125
185
|
default: 0,
|
|
126
186
|
type: Number
|
|
127
187
|
}
|
|
128
|
-
},
|
|
188
|
+
}, n = {
|
|
129
189
|
boundary: {
|
|
130
190
|
required: !0,
|
|
131
|
-
type:
|
|
191
|
+
type: t(Object),
|
|
132
192
|
default: () => {
|
|
133
193
|
}
|
|
134
194
|
},
|
|
@@ -148,13 +208,21 @@ const l = {
|
|
|
148
208
|
required: !0
|
|
149
209
|
},
|
|
150
210
|
yLabelsTextFormatter: {
|
|
151
|
-
default: (
|
|
211
|
+
default: (e) => e,
|
|
152
212
|
type: Function
|
|
213
|
+
},
|
|
214
|
+
// 标签字号,默认按绘图区高度自适应
|
|
215
|
+
fontSize: {
|
|
216
|
+
type: Number
|
|
217
|
+
},
|
|
218
|
+
// 标签颜色
|
|
219
|
+
color: {
|
|
220
|
+
type: String
|
|
153
221
|
}
|
|
154
222
|
};
|
|
155
223
|
export {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
224
|
+
l as trendChartCurveProps,
|
|
225
|
+
i as trendChartGridProps,
|
|
226
|
+
n as trendChartLabelsProps,
|
|
227
|
+
o as trendChartProps
|
|
160
228
|
};
|
|
@@ -9,9 +9,9 @@ const o = "var(--x-color-danger-solid)", r = "var(--x-color-strong-solid)", i =
|
|
|
9
9
|
},
|
|
10
10
|
// 描边
|
|
11
11
|
stroke: {
|
|
12
|
-
width:
|
|
12
|
+
width: 2,
|
|
13
13
|
color: o,
|
|
14
|
-
opacity:
|
|
14
|
+
opacity: 1
|
|
15
15
|
},
|
|
16
16
|
// 填充
|
|
17
17
|
fill: {
|
|
@@ -29,13 +29,13 @@ const o = "var(--x-color-danger-solid)", r = "var(--x-color-strong-solid)", i =
|
|
|
29
29
|
color: r,
|
|
30
30
|
// 点
|
|
31
31
|
point: {
|
|
32
|
-
width:
|
|
32
|
+
width: 3,
|
|
33
33
|
color: r
|
|
34
34
|
},
|
|
35
35
|
stroke: {
|
|
36
|
-
width:
|
|
36
|
+
width: 2,
|
|
37
37
|
color: r,
|
|
38
|
-
opacity:
|
|
38
|
+
opacity: 1
|
|
39
39
|
},
|
|
40
40
|
fill: {
|
|
41
41
|
color: r,
|
|
@@ -52,11 +52,11 @@ const o = "var(--x-color-danger-solid)", r = "var(--x-color-strong-solid)", i =
|
|
|
52
52
|
color: i,
|
|
53
53
|
// 点
|
|
54
54
|
point: {
|
|
55
|
-
width:
|
|
55
|
+
width: 3,
|
|
56
56
|
color: i
|
|
57
57
|
},
|
|
58
58
|
stroke: {
|
|
59
|
-
width:
|
|
59
|
+
width: 2,
|
|
60
60
|
color: i,
|
|
61
61
|
opacity: 1
|
|
62
62
|
},
|
|
@@ -75,11 +75,11 @@ const o = "var(--x-color-danger-solid)", r = "var(--x-color-strong-solid)", i =
|
|
|
75
75
|
color: t,
|
|
76
76
|
// 点
|
|
77
77
|
point: {
|
|
78
|
-
width:
|
|
78
|
+
width: 3,
|
|
79
79
|
color: t
|
|
80
80
|
},
|
|
81
81
|
stroke: {
|
|
82
|
-
width:
|
|
82
|
+
width: 2,
|
|
83
83
|
color: t,
|
|
84
84
|
opacity: 1
|
|
85
85
|
},
|
|
@@ -94,15 +94,15 @@ const o = "var(--x-color-danger-solid)", r = "var(--x-color-strong-solid)", i =
|
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
INFO: {
|
|
97
|
-
//
|
|
97
|
+
// 主题色(次要指标语义,保留中性文本色作为数据色)
|
|
98
98
|
color: c,
|
|
99
99
|
// 点
|
|
100
100
|
point: {
|
|
101
|
-
width:
|
|
101
|
+
width: 3,
|
|
102
102
|
color: c
|
|
103
103
|
},
|
|
104
104
|
stroke: {
|
|
105
|
-
width:
|
|
105
|
+
width: 2,
|
|
106
106
|
color: c,
|
|
107
107
|
opacity: 1
|
|
108
108
|
},
|
|
@@ -121,13 +121,13 @@ const o = "var(--x-color-danger-solid)", r = "var(--x-color-strong-solid)", i =
|
|
|
121
121
|
color: l,
|
|
122
122
|
// 点
|
|
123
123
|
point: {
|
|
124
|
-
width:
|
|
124
|
+
width: 3,
|
|
125
125
|
color: l
|
|
126
126
|
},
|
|
127
127
|
stroke: {
|
|
128
|
-
width:
|
|
128
|
+
width: 2,
|
|
129
129
|
color: l,
|
|
130
|
-
opacity:
|
|
130
|
+
opacity: 1
|
|
131
131
|
},
|
|
132
132
|
fill: {
|
|
133
133
|
color: l,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { getClassNameMixin as lt } from "../../_utils/config.js";
|
|
2
|
-
import { canvasToGray as
|
|
3
|
-
const
|
|
4
|
-
let e =
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
},
|
|
8
|
-
const t = r - a / 2, n = o -
|
|
2
|
+
import { canvasToGray as ft, getPixelRatio as dt, styleToString as gt } from "./utils.js";
|
|
3
|
+
const q = [90, 90], J = 3, mt = lt("watermark"), ut = (i) => typeof document > "u" || typeof getComputedStyle != "function" ? "rgba(0, 0, 0, 0.15)" : getComputedStyle(i).getPropertyValue("--x-watermark-color").trim() || "rgba(0, 0, 0, 0.15)", pt = (i) => Array.isArray(i) ? i.filter((u) => u !== "") : i ? [i] : [], xt = (i, u = {}) => {
|
|
4
|
+
let e = u, c, l, y = !1, x = 0;
|
|
5
|
+
const p = () => {
|
|
6
|
+
c != null && c.parentNode && c.parentNode.removeChild(c), c = void 0;
|
|
7
|
+
}, K = (a, f, r, o) => {
|
|
8
|
+
const t = r - a / 2, n = o - f / 2;
|
|
9
9
|
return {
|
|
10
10
|
position: "absolute",
|
|
11
11
|
inset: "0",
|
|
@@ -18,41 +18,41 @@ const J = [90, 90], K = 3, mt = lt("watermark"), ut = () => typeof document > "u
|
|
|
18
18
|
backgroundPosition: `${t > 0 ? 0 : t}px ${n > 0 ? 0 : n}px`,
|
|
19
19
|
zIndex: e.zIndex ?? 6
|
|
20
20
|
};
|
|
21
|
-
},
|
|
22
|
-
|
|
21
|
+
}, Q = (a, f, r) => {
|
|
22
|
+
y = !0, p();
|
|
23
23
|
const o = document.createElement("div");
|
|
24
24
|
o.className = mt.element("layer"), o.setAttribute(
|
|
25
25
|
"style",
|
|
26
26
|
gt({
|
|
27
27
|
...r,
|
|
28
28
|
backgroundImage: `url('${a}')`,
|
|
29
|
-
backgroundSize: `${
|
|
29
|
+
backgroundSize: `${f}px`
|
|
30
30
|
})
|
|
31
|
-
),
|
|
32
|
-
|
|
31
|
+
), i.append(o), c = o, Promise.resolve().then(() => {
|
|
32
|
+
y = !1;
|
|
33
33
|
});
|
|
34
|
-
},
|
|
35
|
-
var
|
|
34
|
+
}, v = (a) => {
|
|
35
|
+
var D, G, O, X, Y, U, _, B, V, j;
|
|
36
36
|
if (typeof document > "u") return;
|
|
37
37
|
a && (e = a);
|
|
38
|
-
const
|
|
38
|
+
const f = ++x, r = pt(e.content);
|
|
39
39
|
if (!e.image && !r.length) {
|
|
40
|
-
|
|
40
|
+
p();
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
const o = document.createElement("canvas"), t = o.getContext("2d");
|
|
44
44
|
if (!t) return;
|
|
45
|
-
const n =
|
|
46
|
-
let
|
|
45
|
+
const n = dt(), d = ((D = e.gap) == null ? void 0 : D[0]) ?? q[0], h = ((G = e.gap) == null ? void 0 : G[1]) ?? q[1], Z = ((O = e.offset) == null ? void 0 : O[0]) ?? d / 2, tt = ((X = e.offset) == null ? void 0 : X[1]) ?? h / 2, $ = ((Y = e.font) == null ? void 0 : Y.fontSize) ?? 16, W = ((U = e.font) == null ? void 0 : U.fontWeight) ?? "normal", C = ((_ = e.font) == null ? void 0 : _.fontStyle) ?? "normal", P = ((B = e.font) == null ? void 0 : B.fontFamily) ?? "sans-serif", et = ((V = e.font) == null ? void 0 : V.textAlign) ?? "center", nt = ((j = e.font) == null ? void 0 : j.color) ?? ut(i), ot = e.rotate ?? -22, rt = e.alpha ?? 1, z = e.repeat !== !1 && e.staggered !== !1, at = K(d, h, Z, tt);
|
|
46
|
+
let I = 120, M = 64;
|
|
47
47
|
if (!e.image && r.length && t.measureText) {
|
|
48
|
-
t.font = `${
|
|
48
|
+
t.font = `${C} normal ${W} ${$}px ${P}`;
|
|
49
49
|
const s = r.map((A) => t.measureText(A).width);
|
|
50
|
-
|
|
50
|
+
I = Math.ceil(Math.max(...s)), M = $ * r.length + J * (r.length - 1);
|
|
51
51
|
}
|
|
52
|
-
const
|
|
53
|
-
o.width = g * w, o.height = m * w, t.globalAlpha = rt, t.save(), t.translate(
|
|
54
|
-
const
|
|
55
|
-
t.restore(),
|
|
52
|
+
const k = e.width ?? I, b = e.height ?? M, g = (d + k) * n, m = (h + b) * n, w = z ? 2 : 1, st = (d + k) * w, N = d * n / 2, R = h * n / 2, S = k * n, it = b * n, F = g / 2, E = m / 2;
|
|
53
|
+
o.width = g * w, o.height = m * w, t.globalAlpha = rt, t.save(), t.translate(F, E), t.rotate(Math.PI / 180 * ot), t.translate(-F, -E);
|
|
54
|
+
const H = () => {
|
|
55
|
+
t.restore(), z && t.drawImage(
|
|
56
56
|
o,
|
|
57
57
|
0,
|
|
58
58
|
0,
|
|
@@ -64,44 +64,44 @@ const J = [90, 90], K = 3, mt = lt("watermark"), ut = () => typeof document > "u
|
|
|
64
64
|
m
|
|
65
65
|
);
|
|
66
66
|
}, L = () => {
|
|
67
|
-
e.grayscale &&
|
|
67
|
+
e.grayscale && ft(o), Q(o.toDataURL(), st, at);
|
|
68
68
|
};
|
|
69
69
|
if (e.image) {
|
|
70
70
|
const s = new Image();
|
|
71
71
|
s.onload = () => {
|
|
72
|
-
|
|
72
|
+
f === x && (t.drawImage(s, N, R, S, it), H(), L());
|
|
73
73
|
}, s.onerror = () => {
|
|
74
|
-
|
|
74
|
+
f === x && p();
|
|
75
75
|
}, s.crossOrigin = "anonymous", s.referrerPolicy = "no-referrer", s.src = e.image;
|
|
76
76
|
} else {
|
|
77
|
-
const s =
|
|
78
|
-
t.font = `${
|
|
79
|
-
t.fillText(A,
|
|
80
|
-
}), t.translate(-S / 2, 0),
|
|
77
|
+
const s = $ * n;
|
|
78
|
+
t.font = `${C} normal ${W} ${s}px/${b * n}px ${P}`, t.fillStyle = nt, t.textAlign = et, t.textBaseline = "top", t.translate(S / 2, 0), r.forEach((A, ct) => {
|
|
79
|
+
t.fillText(A, N, R + ct * (s + J * n));
|
|
80
|
+
}), t.translate(-S / 2, 0), H(), L();
|
|
81
81
|
}
|
|
82
82
|
}, T = () => {
|
|
83
|
-
typeof MutationObserver > "u" || (
|
|
84
|
-
if (e.antiTamper === !1 ||
|
|
83
|
+
typeof MutationObserver > "u" || (l == null || l.disconnect(), l = new MutationObserver((a) => {
|
|
84
|
+
if (e.antiTamper === !1 || y) return;
|
|
85
85
|
a.some((r) => {
|
|
86
|
-
const o = Array.from(r.removedNodes).some((n) => n ===
|
|
86
|
+
const o = Array.from(r.removedNodes).some((n) => n === c), t = r.type === "attributes" && r.target === c;
|
|
87
87
|
return o || t;
|
|
88
|
-
}) &&
|
|
89
|
-
}),
|
|
88
|
+
}) && v();
|
|
89
|
+
}), l.observe(i, {
|
|
90
90
|
attributes: !0,
|
|
91
91
|
childList: !0,
|
|
92
92
|
subtree: !0
|
|
93
93
|
}));
|
|
94
94
|
};
|
|
95
95
|
return T(), {
|
|
96
|
-
render:
|
|
96
|
+
render: v,
|
|
97
97
|
update(a) {
|
|
98
|
-
a && (e = a),
|
|
98
|
+
a && (e = a), v(), T();
|
|
99
99
|
},
|
|
100
100
|
destroy() {
|
|
101
|
-
|
|
101
|
+
l == null || l.disconnect(), l = void 0, p();
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
104
|
};
|
|
105
105
|
export {
|
|
106
|
-
|
|
106
|
+
xt as createWatermarkController
|
|
107
107
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { h as o, createVNode as e } from "vue";
|
|
2
|
+
import { generateIcon as t } from "../icon.js";
|
|
3
|
+
const a = t("Calendar", o(e("svg", {
|
|
4
|
+
viewBox: "0 0 48 48",
|
|
5
|
+
fill: "none",
|
|
6
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
+
stroke: "currentColor",
|
|
8
|
+
"stroke-width": "4",
|
|
9
|
+
"stroke-linecap": "butt"
|
|
10
|
+
}, [e("path", {
|
|
11
|
+
d: "M7 22H41M14 5V13M34 5V13M8 41H40C40.5523 41 41 40.5523 41 40V10C41 9.44772 40.5523 9 40 9H8C7.44772 9 7 9.44772 7 10V40C7 40.5523 7.44772 41 8 41Z"
|
|
12
|
+
}, null)])));
|
|
13
|
+
export {
|
|
14
|
+
a as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { h as e, createVNode as o } from "vue";
|
|
2
|
+
import { generateIcon as t } from "../icon.js";
|
|
3
|
+
const n = t("ClockCircle", e(o("svg", {
|
|
4
|
+
viewBox: "0 0 48 48",
|
|
5
|
+
fill: "none",
|
|
6
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
+
stroke: "currentColor",
|
|
8
|
+
"stroke-width": "4",
|
|
9
|
+
"stroke-linecap": "butt"
|
|
10
|
+
}, [o("path", {
|
|
11
|
+
d: "M24 14V24H33.5M42 24C42 33.9411 33.9411 42 24 42C14.0589 42 6 33.9411 6 24C6 14.0589 14.0589 6 24 6C33.9411 6 42 14.0589 42 24Z"
|
|
12
|
+
}, null)])));
|
|
13
|
+
export {
|
|
14
|
+
n as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { h as o, createVNode as e } from "vue";
|
|
2
|
+
import { generateIcon as t } from "../icon.js";
|
|
3
|
+
const n = t("DoubleLeft", o(e("svg", {
|
|
4
|
+
viewBox: "0 0 48 48",
|
|
5
|
+
fill: "none",
|
|
6
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
+
stroke: "currentColor",
|
|
8
|
+
"stroke-width": "4",
|
|
9
|
+
"stroke-linecap": "butt"
|
|
10
|
+
}, [e("path", {
|
|
11
|
+
d: "M36.8574 9.8999L22.7153 24.042L36.8574 38.1842M25.5437 9.8999L11.4016 24.042L25.5437 38.1842"
|
|
12
|
+
}, null)])));
|
|
13
|
+
export {
|
|
14
|
+
n as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { h as t, createVNode as o } from "vue";
|
|
2
|
+
import { generateIcon as e } from "../icon.js";
|
|
3
|
+
const n = e("DoubleRight", t(o("svg", {
|
|
4
|
+
viewBox: "0 0 48 48",
|
|
5
|
+
fill: "none",
|
|
6
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
+
stroke: "currentColor",
|
|
8
|
+
"stroke-width": "4",
|
|
9
|
+
"stroke-linecap": "butt"
|
|
10
|
+
}, [o("path", {
|
|
11
|
+
d: "M11.1426 38.1001L25.2847 23.958L11.1426 9.81583M22.4563 38.1001L36.5984 23.958L22.4563 9.81583"
|
|
12
|
+
}, null)])));
|
|
13
|
+
export {
|
|
14
|
+
n as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { h as t, createVNode as o } from "vue";
|
|
2
|
+
import { generateIcon as e } from "../icon.js";
|
|
3
|
+
const i = e("Down", t(o("svg", {
|
|
4
|
+
viewBox: "0 0 48 48",
|
|
5
|
+
fill: "none",
|
|
6
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
+
stroke: "currentColor",
|
|
8
|
+
"stroke-width": "4",
|
|
9
|
+
"stroke-linecap": "butt",
|
|
10
|
+
"stroke-linejoin": "miter"
|
|
11
|
+
}, [o("path", {
|
|
12
|
+
d: "M39.5996 17.4434L24.0433 32.9997C24.0433 32.9997 13.1813 22.1378 8.48691 17.4434"
|
|
13
|
+
}, null)])));
|
|
14
|
+
export {
|
|
15
|
+
i as default
|
|
16
|
+
};
|