x-next 1.6.0 → 1.8.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 +182 -4
- package/CHANGELOG.md +74 -0
- package/dist/_hooks/use-chart-size.d.ts +25 -0
- package/dist/_utils/chart/index.d.ts +6 -0
- package/dist/_utils/chart/padding.d.ts +15 -0
- package/dist/_utils/chart/path.d.ts +34 -0
- package/dist/_utils/chart/scale.d.ts +55 -0
- package/dist/components/_components/chart/ChartAxis.d.ts +85 -0
- package/dist/components/_components/chart/ChartLegend.d.ts +26 -0
- package/dist/components/_components/chart/ChartTooltip.d.ts +76 -0
- package/dist/components/_components/chart/colors.d.ts +10 -0
- package/dist/components/_components/chart/interface.d.ts +38 -0
- package/dist/components/bar-chart/BarChart.d.ts +278 -0
- package/dist/components/bar-chart/helpers/layout.d.ts +55 -0
- package/dist/components/bar-chart/index.d.ts +600 -0
- package/dist/components/bar-chart/interface.d.ts +74 -0
- package/dist/components/bar-chart/props.d.ts +145 -0
- package/dist/components/date-picker/DatePicker.vue.d.ts +3 -3
- package/dist/components/date-picker/index.d.ts +6 -6
- package/dist/components/draggable/Draggable.d.ts +1 -1
- package/dist/components/draggable/index.d.ts +2 -2
- package/dist/components/drawer/index.d.ts +6 -6
- package/dist/components/drawer/src/Drawer.vue.d.ts +3 -3
- package/dist/components/dropdown/Dropdown.vue.d.ts +4 -4
- package/dist/components/dropdown/DropdownButton.vue.d.ts +5 -5
- package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +4 -4
- package/dist/components/dropdown/index.d.ts +29 -29
- package/dist/components/form/FormItem.vue.d.ts +12 -12
- package/dist/components/form/form-item-label.vue.d.ts +3 -3
- package/dist/components/form/index.d.ts +24 -24
- package/dist/components/form-select/Select.d.ts +3 -3
- package/dist/components/form-select/index.d.ts +6 -6
- package/dist/components/form-slider/Slider.vue.d.ts +3 -3
- package/dist/components/form-slider/index.d.ts +6 -6
- package/dist/components/form-slider/slider-button.vue.d.ts +3 -3
- package/dist/components/grid/Row.vue.d.ts +3 -3
- package/dist/components/grid/index.d.ts +9 -9
- package/dist/components/heatmap/Heatmap.d.ts +10 -0
- package/dist/components/heatmap/index.d.ts +30 -0
- package/dist/components/image/Image.vue.d.ts +125 -17
- package/dist/components/image/ImagePreview.vue.d.ts +97 -7
- package/dist/components/image/ImagePreviewAction.d.ts +3 -3
- package/dist/components/image/ImagePreviewGroup.vue.d.ts +100 -7
- package/dist/components/image/hooks/use-image-drag.d.ts +2 -2
- package/dist/components/image/index.d.ts +712 -124
- package/dist/components/image/interface.d.ts +9 -1
- package/dist/components/image/preview-toolbar.vue.d.ts +3 -3
- package/dist/components/index.d.ts +4 -0
- package/dist/components/line-chart/LineChart.d.ts +295 -0
- package/dist/components/line-chart/helpers/layout.d.ts +74 -0
- package/dist/components/line-chart/index.d.ts +614 -0
- package/dist/components/line-chart/interface.d.ts +76 -0
- package/dist/components/line-chart/props.d.ts +173 -0
- package/dist/components/menu/sub-menu-pop.vue.d.ts +3 -3
- package/dist/components/pagination/page-options.vue.d.ts +6 -6
- package/dist/components/pie-chart/PieChart.d.ts +219 -0
- package/dist/components/pie-chart/index.d.ts +470 -0
- package/dist/components/pie-chart/interface.d.ts +58 -0
- package/dist/components/pie-chart/props.d.ts +107 -0
- package/dist/components/popconfirm/src/popup.vue.d.ts +3 -3
- package/dist/components/popover/Popover.d.ts +1 -1
- package/dist/components/popover/index.d.ts +3 -3
- package/dist/components/popup/Popup.d.ts +1 -1
- package/dist/components/popup/index.d.ts +3 -3
- package/dist/components/space/Space.d.ts +1 -1
- package/dist/components/space/index.d.ts +3 -3
- package/dist/components/tabs/Tabs.d.ts +1 -1
- package/dist/components/tabs/index.d.ts +3 -3
- package/dist/components/time-picker/TimePicker.vue.d.ts +3 -3
- package/dist/components/time-picker/index.d.ts +6 -6
- package/dist/components/tooltip/Tooltip.vue.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts +3 -3
- package/dist/components/trend-chart/components/TrendChart.d.ts +19 -96
- package/dist/components/trend-chart/index.d.ts +33 -187
- package/dist/components/trend-chart/props.d.ts +9 -78
- package/dist/components/trend-chart/themes.d.ts +0 -1
- package/dist/components/trigger/Trigger.d.ts +1 -1
- package/dist/components/trigger/index.d.ts +3 -3
- package/dist/components/upload/Upload.d.ts +372 -0
- package/dist/components/upload/context.d.ts +28 -0
- package/dist/components/upload/index.d.ts +656 -0
- package/dist/components/upload/interface.d.ts +110 -0
- package/dist/components/upload/props.d.ts +321 -0
- package/dist/components/upload/upload-list-item.d.ts +15 -0
- package/dist/components/upload/upload-list.d.ts +11 -0
- package/dist/components/upload/upload-picture-item.d.ts +20 -0
- package/dist/components/upload/upload-trigger.d.ts +8 -0
- package/dist/components/upload/utils.d.ts +48 -0
- package/dist/es/_hooks/use-chart-size.js +25 -0
- package/dist/es/_styles/palette-aliases.js +7 -4
- package/dist/es/_utils/chart/padding.js +22 -0
- package/dist/es/_utils/chart/path.js +69 -0
- package/dist/es/_utils/chart/scale.js +77 -0
- package/dist/es/components/_components/chart/ChartAxis.js +79 -0
- package/dist/es/components/_components/chart/ChartLegend.js +53 -0
- package/dist/es/components/_components/chart/ChartTooltip.js +64 -0
- package/dist/es/components/_components/chart/colors.js +12 -0
- package/dist/es/components/bar-chart/BarChart.js +470 -0
- package/dist/es/components/bar-chart/helpers/layout.js +53 -0
- package/dist/es/components/bar-chart/index.js +8 -0
- package/dist/es/components/bar-chart/props.js +148 -0
- package/dist/es/components/heatmap/Heatmap.js +244 -169
- package/dist/es/components/image/Image.vue.js +55 -45
- package/dist/es/components/image/Image.vue2.js +113 -92
- package/dist/es/components/image/ImagePreview.vue.js +66 -53
- package/dist/es/components/image/ImagePreview.vue2.js +219 -171
- package/dist/es/components/image/ImagePreviewAction.js +12 -15
- package/dist/es/components/image/ImagePreviewGroup.vue.js +21 -20
- package/dist/es/components/image/ImagePreviewGroup.vue2.js +45 -39
- package/dist/es/components/image/hooks/use-image-drag.js +16 -14
- package/dist/es/components/index.js +136 -128
- package/dist/es/components/line-chart/LineChart.js +532 -0
- package/dist/es/components/line-chart/helpers/layout.js +80 -0
- package/dist/es/components/line-chart/index.js +8 -0
- package/dist/es/components/line-chart/props.js +178 -0
- package/dist/es/components/pie-chart/PieChart.js +397 -0
- package/dist/es/components/pie-chart/index.js +8 -0
- package/dist/es/components/pie-chart/props.js +104 -0
- package/dist/es/components/trend-chart/components/TrendChart.js +143 -183
- package/dist/es/components/trend-chart/components/trend-chart-curve.js +85 -81
- package/dist/es/components/trend-chart/props.js +28 -74
- package/dist/es/components/trend-chart/themes.js +30 -31
- package/dist/es/components/upload/Upload.js +420 -0
- package/dist/es/components/upload/context.js +4 -0
- package/dist/es/components/upload/index.js +8 -0
- package/dist/es/components/upload/props.js +321 -0
- package/dist/es/components/upload/upload-list-item.js +138 -0
- package/dist/es/components/upload/upload-list.js +48 -0
- package/dist/es/components/upload/upload-picture-item.js +109 -0
- package/dist/es/components/upload/upload-trigger.js +89 -0
- package/dist/es/components/upload/utils.js +195 -0
- package/dist/es/icons/_self/upload-icons.js +103 -0
- package/dist/es/index.js +197 -189
- package/dist/es/locale/en-US.js +30 -1
- package/dist/es/locale/zh-CN.js +30 -1
- package/dist/es/style.css +1 -1
- package/dist/icons/_self/upload-icons.d.ts +523 -0
- package/dist/index.cjs +4 -4
- package/dist/index.umd.js +4 -4
- package/dist/locale/interface.d.ts +45 -0
- package/dist/style/bar-chart.css +1 -0
- package/dist/style/bar-chart.js +2 -0
- package/dist/style/base.css +1 -1
- package/dist/style/heatmap.css +1 -1
- package/dist/style/image.css +1 -1
- package/dist/style/line-chart.css +1 -0
- package/dist/style/line-chart.js +2 -0
- package/dist/style/pie-chart.css +1 -0
- package/dist/style/pie-chart.js +2 -0
- package/dist/style/upload.css +1 -0
- package/dist/style/upload.js +2 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +4 -0
- package/package.json +1 -1
- package/volar.d.ts +4 -0
- package/dist/components/trend-chart/components/trend-chart-grid.d.ts +0 -55
- package/dist/components/trend-chart/components/trend-chart-labels.d.ts +0 -26
- package/dist/components/trend-chart/helpers/genPath.d.ts +0 -8
- package/dist/components/trend-chart/helpers/getPadding.d.ts +0 -8
- package/dist/components/trend-chart/helpers/validatePadding.d.ts +0 -2
- package/dist/es/_hooks/use-popup-overflow-hidden.js +0 -29
- package/dist/es/components/trend-chart/components/trend-chart-grid.js +0 -62
- package/dist/es/components/trend-chart/components/trend-chart-labels.js +0 -75
- package/dist/es/components/trend-chart/helpers/genPath.js +0 -22
- package/dist/es/components/trend-chart/helpers/getPadding.js +0 -21
- package/dist/es/components/trend-chart/helpers/validatePadding.js +0 -7
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
import { LineChartGridOptions, LineChartLabelsOptions, LineChartSeries } from './interface';
|
|
3
|
+
export declare const lineChartProps: {
|
|
4
|
+
/**
|
|
5
|
+
* @zh 类目轴标签,与每个系列 data 的下标一一对应;缺省时按 1、2、3… 显示
|
|
6
|
+
* @en Category axis labels, aligned by index with each series data
|
|
7
|
+
*/
|
|
8
|
+
categories: {
|
|
9
|
+
type: PropType<Array<string | number>>;
|
|
10
|
+
default: () => never[];
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* @zh 数据系列;单系列为普通折线,多系列可叠放或堆叠
|
|
14
|
+
* @en Data series; a single series renders a plain line, multiple series can
|
|
15
|
+
* overlap or stack
|
|
16
|
+
*/
|
|
17
|
+
series: {
|
|
18
|
+
required: boolean;
|
|
19
|
+
type: PropType<LineChartSeries[]>;
|
|
20
|
+
default: () => never[];
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* @zh 堆叠多系列;折线按值累加,面积按下界与上界填充(堆叠面积)
|
|
24
|
+
* @en Stack multiple series; lines accumulate and areas fill between the
|
|
25
|
+
* lower and upper bounds
|
|
26
|
+
* @defaultValue false
|
|
27
|
+
*/
|
|
28
|
+
stack: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* @zh 是否绘制面积填充
|
|
34
|
+
* @en Whether to fill the area under the line
|
|
35
|
+
* @defaultValue false
|
|
36
|
+
*/
|
|
37
|
+
area: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* @zh 平滑曲线
|
|
43
|
+
* @en Smooth curve
|
|
44
|
+
* @defaultValue true
|
|
45
|
+
*/
|
|
46
|
+
smooth: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* @zh 缺测点(null)是否跨过连接;默认断开,避免「没有数据」被画成跌到 0
|
|
52
|
+
* @en Whether null points are connected; by default the line breaks so that
|
|
53
|
+
* missing data is not drawn as a drop to zero
|
|
54
|
+
* @defaultValue false
|
|
55
|
+
*/
|
|
56
|
+
connectNulls: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
default: boolean;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* @zh 数据点显示策略:true 常显、false 不显示、auto 时点数少时常显
|
|
62
|
+
* @en Data point strategy: true always, false never, auto shows points when
|
|
63
|
+
* there are few of them
|
|
64
|
+
* @defaultValue 'auto'
|
|
65
|
+
*/
|
|
66
|
+
showPoints: {
|
|
67
|
+
type: PropType<boolean | "auto">;
|
|
68
|
+
default: string;
|
|
69
|
+
validator: (value: boolean | "auto") => boolean;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* @zh 图表高度,数字按 px 处理
|
|
73
|
+
* @en Chart height; numbers are treated as px
|
|
74
|
+
* @defaultValue 280
|
|
75
|
+
*/
|
|
76
|
+
height: {
|
|
77
|
+
type: PropType<number | string>;
|
|
78
|
+
default: number;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* @zh 图表宽度,数字按 px 处理,默认撑满父容器
|
|
82
|
+
* @en Chart width; numbers are treated as px, defaults to filling the parent
|
|
83
|
+
* @defaultValue '100%'
|
|
84
|
+
*/
|
|
85
|
+
width: {
|
|
86
|
+
type: PropType<number | string>;
|
|
87
|
+
default: string;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* @zh 数值轴上界;传入后不再自动计算「好看」的刻度
|
|
91
|
+
* @en Upper bound of the value axis; disables nice-tick calculation
|
|
92
|
+
*/
|
|
93
|
+
max: {
|
|
94
|
+
type: NumberConstructor;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* @zh 数值轴下界;数据含负值时自动扩展,也可手动锁定
|
|
98
|
+
* @en Lower bound of the value axis; expands automatically for negative data
|
|
99
|
+
*/
|
|
100
|
+
min: {
|
|
101
|
+
type: NumberConstructor;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* @zh 绘制边距,支持 1-4 个非负数字字符串或单个非负数字
|
|
105
|
+
* @en Plot padding; supports a single non-negative number or CSS-like 1-4 values
|
|
106
|
+
* @defaultValue '8'
|
|
107
|
+
*/
|
|
108
|
+
padding: {
|
|
109
|
+
default: string;
|
|
110
|
+
type: PropType<string | number>;
|
|
111
|
+
validator(val: string | number): boolean;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* @zh 横向网格线配置
|
|
115
|
+
* @en Horizontal grid line options
|
|
116
|
+
*/
|
|
117
|
+
grid: {
|
|
118
|
+
default: null;
|
|
119
|
+
type: PropType<LineChartGridOptions>;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* @zh 坐标轴标签配置
|
|
123
|
+
* @en Axis label options
|
|
124
|
+
*/
|
|
125
|
+
labels: {
|
|
126
|
+
default: null;
|
|
127
|
+
type: PropType<LineChartLabelsOptions>;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* @zh 悬浮提示
|
|
131
|
+
* @en Hover tooltip
|
|
132
|
+
* @defaultValue true
|
|
133
|
+
*/
|
|
134
|
+
tooltip: {
|
|
135
|
+
type: BooleanConstructor;
|
|
136
|
+
default: boolean;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* @zh 图例;多系列时建议开启,点击图例项可临时隐藏/显示对应系列
|
|
140
|
+
* @en Legend; recommended for multiple series, clicking an item toggles the
|
|
141
|
+
* series visibility
|
|
142
|
+
* @defaultValue false
|
|
143
|
+
*/
|
|
144
|
+
legend: {
|
|
145
|
+
type: BooleanConstructor;
|
|
146
|
+
default: boolean;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* @zh 数值格式化函数,用于提示、图例与数值轴
|
|
150
|
+
* @en Value formatter used by tooltip, legend and the value axis
|
|
151
|
+
*/
|
|
152
|
+
valueFormatter: {
|
|
153
|
+
type: PropType<(value: number) => string>;
|
|
154
|
+
default: (value: number) => string;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* @zh 加载中
|
|
158
|
+
* @en Loading state
|
|
159
|
+
* @defaultValue false
|
|
160
|
+
*/
|
|
161
|
+
loading: {
|
|
162
|
+
type: PropType<boolean | Record<string, unknown>>;
|
|
163
|
+
default: boolean;
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* @zh 无障碍名称;设置后画布带 role="img"
|
|
167
|
+
* @en Accessible name; adds role="img" to the canvas when set
|
|
168
|
+
*/
|
|
169
|
+
ariaLabel: {
|
|
170
|
+
type: StringConstructor;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
export type LineChartProps = ExtractPropTypes<typeof lineChartProps>;
|
|
@@ -939,8 +939,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
939
939
|
resize: () => true;
|
|
940
940
|
}, import('vue').PublicProps, {
|
|
941
941
|
disabled: boolean;
|
|
942
|
-
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
943
942
|
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
943
|
+
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
944
944
|
animationName: string;
|
|
945
945
|
autoFitPosition: boolean;
|
|
946
946
|
popupVisible: boolean;
|
|
@@ -1127,8 +1127,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1127
1127
|
onPopupVisibleChange?: ((visible: boolean) => any) | undefined;
|
|
1128
1128
|
}>, () => any, {}, {}, {}, {
|
|
1129
1129
|
disabled: boolean;
|
|
1130
|
-
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
1131
1130
|
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
1131
|
+
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
1132
1132
|
animationName: string;
|
|
1133
1133
|
autoFitPosition: boolean;
|
|
1134
1134
|
popupVisible: boolean;
|
|
@@ -1315,8 +1315,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1315
1315
|
resize: () => true;
|
|
1316
1316
|
}, string, {
|
|
1317
1317
|
disabled: boolean;
|
|
1318
|
-
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
1319
1318
|
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
1319
|
+
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
1320
1320
|
animationName: string;
|
|
1321
1321
|
autoFitPosition: boolean;
|
|
1322
1322
|
popupVisible: boolean;
|
|
@@ -398,8 +398,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
398
398
|
resize: () => true;
|
|
399
399
|
}, import('vue').PublicProps, {
|
|
400
400
|
disabled: boolean;
|
|
401
|
-
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
402
401
|
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
402
|
+
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
403
403
|
animationName: string;
|
|
404
404
|
autoFitPosition: boolean;
|
|
405
405
|
popupVisible: boolean;
|
|
@@ -586,8 +586,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
586
586
|
onPopupVisibleChange?: ((visible: boolean) => any) | undefined;
|
|
587
587
|
}>, () => any, {}, {}, {}, {
|
|
588
588
|
disabled: boolean;
|
|
589
|
-
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
590
589
|
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
590
|
+
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
591
591
|
animationName: string;
|
|
592
592
|
autoFitPosition: boolean;
|
|
593
593
|
popupVisible: boolean;
|
|
@@ -774,8 +774,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
774
774
|
resize: () => true;
|
|
775
775
|
}, string, {
|
|
776
776
|
disabled: boolean;
|
|
777
|
-
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
778
777
|
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
778
|
+
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
779
779
|
animationName: string;
|
|
780
780
|
autoFitPosition: boolean;
|
|
781
781
|
popupVisible: boolean;
|
|
@@ -1496,8 +1496,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1496
1496
|
resize: () => true;
|
|
1497
1497
|
}, import('vue').PublicProps, {
|
|
1498
1498
|
disabled: boolean;
|
|
1499
|
-
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
1500
1499
|
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
1500
|
+
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
1501
1501
|
animationName: string;
|
|
1502
1502
|
autoFitPosition: boolean;
|
|
1503
1503
|
popupVisible: boolean;
|
|
@@ -1684,8 +1684,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1684
1684
|
onPopupVisibleChange?: ((visible: boolean) => any) | undefined;
|
|
1685
1685
|
}>, () => any, {}, {}, {}, {
|
|
1686
1686
|
disabled: boolean;
|
|
1687
|
-
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
1688
1687
|
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
1688
|
+
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
1689
1689
|
animationName: string;
|
|
1690
1690
|
autoFitPosition: boolean;
|
|
1691
1691
|
popupVisible: boolean;
|
|
@@ -1872,8 +1872,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1872
1872
|
resize: () => true;
|
|
1873
1873
|
}, string, {
|
|
1874
1874
|
disabled: boolean;
|
|
1875
|
-
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
1876
1875
|
trigger: "hover" | "click" | "focus" | "contextMenu" | ("hover" | "click" | "focus" | "contextMenu")[];
|
|
1876
|
+
position: "top" | "tl" | "tr" | "bottom" | "bl" | "br" | "left" | "lt" | "lb" | "right" | "rt" | "rb";
|
|
1877
1877
|
animationName: string;
|
|
1878
1878
|
autoFitPosition: boolean;
|
|
1879
1879
|
popupVisible: boolean;
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { SlotsType } from 'vue';
|
|
2
|
+
import { PieChartActiveData, PieChartClickData, PieChartItem, PieChartSegment } from './interface';
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
|
+
data: {
|
|
5
|
+
required: boolean;
|
|
6
|
+
type: import('vue').PropType<PieChartItem[]>;
|
|
7
|
+
default: () => never[];
|
|
8
|
+
};
|
|
9
|
+
innerRadius: {
|
|
10
|
+
type: import('vue').PropType<number | string>;
|
|
11
|
+
default: number;
|
|
12
|
+
};
|
|
13
|
+
height: {
|
|
14
|
+
type: import('vue').PropType<number | string>;
|
|
15
|
+
default: number;
|
|
16
|
+
};
|
|
17
|
+
width: {
|
|
18
|
+
type: import('vue').PropType<number | string>;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
labels: {
|
|
22
|
+
type: import('vue').PropType<boolean | {
|
|
23
|
+
fontSize?: number;
|
|
24
|
+
color?: string;
|
|
25
|
+
}>;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
28
|
+
center: {
|
|
29
|
+
type: import('vue').PropType<boolean | {
|
|
30
|
+
fontSize?: number;
|
|
31
|
+
}>;
|
|
32
|
+
default: boolean;
|
|
33
|
+
};
|
|
34
|
+
tooltip: {
|
|
35
|
+
type: BooleanConstructor;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
38
|
+
legend: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: boolean;
|
|
41
|
+
};
|
|
42
|
+
valueFormatter: {
|
|
43
|
+
type: import('vue').PropType<(value: number) => string>;
|
|
44
|
+
default: (value: number) => string;
|
|
45
|
+
};
|
|
46
|
+
loading: {
|
|
47
|
+
type: import('vue').PropType<boolean | Record<string, unknown>>;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
ariaLabel: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
};
|
|
53
|
+
}>, {
|
|
54
|
+
className: {
|
|
55
|
+
block: string;
|
|
56
|
+
element: (className: string) => string;
|
|
57
|
+
modifier: (className: string) => string;
|
|
58
|
+
is: (className: string) => string;
|
|
59
|
+
};
|
|
60
|
+
state: {
|
|
61
|
+
activeIndex: number | null;
|
|
62
|
+
hiddenIndexes: number[];
|
|
63
|
+
keyboardActive: boolean;
|
|
64
|
+
pointer: {
|
|
65
|
+
x: number;
|
|
66
|
+
y: number;
|
|
67
|
+
};
|
|
68
|
+
tooltipWidth: number;
|
|
69
|
+
};
|
|
70
|
+
size: {
|
|
71
|
+
width: number;
|
|
72
|
+
height: number;
|
|
73
|
+
};
|
|
74
|
+
refs: {
|
|
75
|
+
root: import('vue').Ref<HTMLDivElement | null, HTMLDivElement | null>;
|
|
76
|
+
canvas: import('vue').Ref<HTMLDivElement | null, HTMLDivElement | null>;
|
|
77
|
+
tooltip: import('vue').Ref<HTMLDivElement | null, HTMLDivElement | null>;
|
|
78
|
+
};
|
|
79
|
+
slots: Readonly<{
|
|
80
|
+
center?: ((props: {
|
|
81
|
+
total: number;
|
|
82
|
+
formatValue: (value: number) => string;
|
|
83
|
+
}) => unknown) | undefined;
|
|
84
|
+
tooltip?: ((props: PieChartActiveData) => unknown) | undefined;
|
|
85
|
+
label?: ((props: PieChartActiveData) => unknown) | undefined;
|
|
86
|
+
legend?: ((props: {
|
|
87
|
+
items: PieChartItem[];
|
|
88
|
+
hiddenIndexes: number[];
|
|
89
|
+
}) => unknown) | undefined;
|
|
90
|
+
empty?: (() => unknown) | undefined;
|
|
91
|
+
}>;
|
|
92
|
+
t: (key: import('../..').LocaleKey | (string & {}), params?: Record<string, string | number>) => string;
|
|
93
|
+
items: import('vue').ComputedRef<PieChartItem[]>;
|
|
94
|
+
visibleIndexes: import('vue').ComputedRef<number[]>;
|
|
95
|
+
total: import('vue').ComputedRef<number>;
|
|
96
|
+
hasData: import('vue').ComputedRef<boolean>;
|
|
97
|
+
geometry: import('vue').ComputedRef<{
|
|
98
|
+
cx: number;
|
|
99
|
+
cy: number;
|
|
100
|
+
radius: number;
|
|
101
|
+
inner: number;
|
|
102
|
+
}>;
|
|
103
|
+
segments: import('vue').ComputedRef<PieChartSegment[]>;
|
|
104
|
+
activeData: import('vue').ComputedRef<PieChartActiveData | null>;
|
|
105
|
+
legendItems: import('vue').ComputedRef<{
|
|
106
|
+
key: number;
|
|
107
|
+
name: string;
|
|
108
|
+
color: string;
|
|
109
|
+
hidden: boolean;
|
|
110
|
+
value: string;
|
|
111
|
+
}[]>;
|
|
112
|
+
centerVisible: import('vue').ComputedRef<boolean>;
|
|
113
|
+
labelFontSize: import('vue').ComputedRef<number>;
|
|
114
|
+
labelColor: import('vue').ComputedRef<string>;
|
|
115
|
+
centerFontSize: import('vue').ComputedRef<number>;
|
|
116
|
+
formatValue: import('vue').ComputedRef<(value: number) => string>;
|
|
117
|
+
tooltipStyle: import('vue').ComputedRef<Record<string, string>>;
|
|
118
|
+
handleSegmentEnter: (index: number) => void;
|
|
119
|
+
handleClick: (index: number, ev: MouseEvent) => void;
|
|
120
|
+
handleKeydown: (ev: KeyboardEvent) => void;
|
|
121
|
+
clearActive: () => void;
|
|
122
|
+
toggleItem: (index: number) => void;
|
|
123
|
+
liveText: import('vue').ComputedRef<string>;
|
|
124
|
+
setTooltipElement: (el: HTMLDivElement | null) => void;
|
|
125
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
126
|
+
/**
|
|
127
|
+
* @zh 点击分片时触发
|
|
128
|
+
* @en Emitted when a slice is clicked
|
|
129
|
+
*/
|
|
130
|
+
'item-click': (data: PieChartClickData) => boolean;
|
|
131
|
+
/**
|
|
132
|
+
* @zh 图例切换后触发,参数为当前可见的分片下标
|
|
133
|
+
* @en Emitted after a legend toggle, with the visible item indexes
|
|
134
|
+
*/
|
|
135
|
+
'legend-change': (visibleIndexes: number[]) => boolean;
|
|
136
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
137
|
+
data: {
|
|
138
|
+
required: boolean;
|
|
139
|
+
type: import('vue').PropType<PieChartItem[]>;
|
|
140
|
+
default: () => never[];
|
|
141
|
+
};
|
|
142
|
+
innerRadius: {
|
|
143
|
+
type: import('vue').PropType<number | string>;
|
|
144
|
+
default: number;
|
|
145
|
+
};
|
|
146
|
+
height: {
|
|
147
|
+
type: import('vue').PropType<number | string>;
|
|
148
|
+
default: number;
|
|
149
|
+
};
|
|
150
|
+
width: {
|
|
151
|
+
type: import('vue').PropType<number | string>;
|
|
152
|
+
default: string;
|
|
153
|
+
};
|
|
154
|
+
labels: {
|
|
155
|
+
type: import('vue').PropType<boolean | {
|
|
156
|
+
fontSize?: number;
|
|
157
|
+
color?: string;
|
|
158
|
+
}>;
|
|
159
|
+
default: boolean;
|
|
160
|
+
};
|
|
161
|
+
center: {
|
|
162
|
+
type: import('vue').PropType<boolean | {
|
|
163
|
+
fontSize?: number;
|
|
164
|
+
}>;
|
|
165
|
+
default: boolean;
|
|
166
|
+
};
|
|
167
|
+
tooltip: {
|
|
168
|
+
type: BooleanConstructor;
|
|
169
|
+
default: boolean;
|
|
170
|
+
};
|
|
171
|
+
legend: {
|
|
172
|
+
type: BooleanConstructor;
|
|
173
|
+
default: boolean;
|
|
174
|
+
};
|
|
175
|
+
valueFormatter: {
|
|
176
|
+
type: import('vue').PropType<(value: number) => string>;
|
|
177
|
+
default: (value: number) => string;
|
|
178
|
+
};
|
|
179
|
+
loading: {
|
|
180
|
+
type: import('vue').PropType<boolean | Record<string, unknown>>;
|
|
181
|
+
default: boolean;
|
|
182
|
+
};
|
|
183
|
+
ariaLabel: {
|
|
184
|
+
type: StringConstructor;
|
|
185
|
+
};
|
|
186
|
+
}>> & Readonly<{
|
|
187
|
+
"onLegend-change"?: ((visibleIndexes: number[]) => any) | undefined;
|
|
188
|
+
"onItem-click"?: ((data: PieChartClickData) => any) | undefined;
|
|
189
|
+
}>, {
|
|
190
|
+
center: boolean | {
|
|
191
|
+
fontSize?: number;
|
|
192
|
+
};
|
|
193
|
+
loading: boolean | Record<string, unknown>;
|
|
194
|
+
data: PieChartItem[];
|
|
195
|
+
legend: boolean;
|
|
196
|
+
height: string | number;
|
|
197
|
+
width: string | number;
|
|
198
|
+
tooltip: boolean;
|
|
199
|
+
labels: boolean | {
|
|
200
|
+
fontSize?: number;
|
|
201
|
+
color?: string;
|
|
202
|
+
};
|
|
203
|
+
valueFormatter: (value: number) => string;
|
|
204
|
+
innerRadius: string | number;
|
|
205
|
+
}, SlotsType<{
|
|
206
|
+
/** 圆环中心内容;默认展示合计 */
|
|
207
|
+
center?: (props: {
|
|
208
|
+
total: number;
|
|
209
|
+
formatValue: (value: number) => string;
|
|
210
|
+
}) => unknown;
|
|
211
|
+
tooltip?: (props: PieChartActiveData) => unknown;
|
|
212
|
+
label?: (props: PieChartActiveData) => unknown;
|
|
213
|
+
legend?: (props: {
|
|
214
|
+
items: PieChartItem[];
|
|
215
|
+
hiddenIndexes: number[];
|
|
216
|
+
}) => unknown;
|
|
217
|
+
empty?: () => unknown;
|
|
218
|
+
}>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
219
|
+
export default _default;
|