mrxy-yk 1.9.6 → 1.9.8

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.
@@ -1,6 +1,7 @@
1
1
  import { TableColumnCtx } from 'element-plus';
2
2
  import { VNode, PublicProps } from 'vue';
3
- declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ import { DefaultRow } from 'element-plus/es/components/table/src/table/defaults';
4
+ declare const __VLS_export: <T = DefaultRow>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
5
  props: PublicProps & __VLS_PrettifyLocal<{
5
6
  emptyStr?: string;
6
7
  formatter?: ((row: T, column: TableColumnCtx<T>, cellValue: any, index: number) => VNode) | string;
@@ -1,15 +0,0 @@
1
- import { TableColumnCtx } from 'element-plus';
2
- export namespace TableSlot {
3
- export type Default<T> = {
4
- row: T,
5
- column: TableColumnCtx<T>,
6
- $index: number
7
- }
8
- export type D<T> = TableSlot.Default<Partial<T>>
9
-
10
- export type Header<T> = {
11
- column: TableColumnCtx<T>,
12
- $index: number
13
- }
14
- export type H<T> = TableSlot.Header<Partial<T>>
15
- }
@@ -38,7 +38,7 @@ var EcPieOption = class extends EcBasicOption {
38
38
  show: true,
39
39
  position: "center",
40
40
  formatter: (e) => {
41
- let ret = `{total|${this.centerLabelData}}`;
41
+ let ret = `{total|${this.centerLabelData.toFixed(labelDataFractionDigits)}}`;
42
42
  if (unit) ret += `\n{unit|${unit}}`;
43
43
  if (name) ret += `\n{name|${name}}`;
44
44
  return ret;
@@ -81,7 +81,11 @@ var EcPieOption = class extends EcBasicOption {
81
81
  */
82
82
  setSeriesData(data) {
83
83
  if (this.ec) {
84
- const option = { series: [{ data }] };
84
+ const series = this.currentOption.series[0];
85
+ const option = { series: [{
86
+ data,
87
+ label: series instanceof EcPieSeries ? series.seriesOption?.label : series?.label
88
+ }] };
85
89
  const sum = data.reduce((ret, item) => {
86
90
  const value = Number(item.value);
87
91
  return ret + (Number.isNaN(value) ? 0 : value);
@@ -100,8 +104,8 @@ var EcPieOption = class extends EcBasicOption {
100
104
  return this.lengthFormatter.replace(/\{name}/g, name).replace(/\{unit}/g, this.unit || "").replace(/\{value}/g, dataDic[name].value).replace(/\{percent}/g, percent);
101
105
  } };
102
106
  }
103
- this.ec.setOption(option);
104
107
  this.centerLabelData = sum;
108
+ this.ec.setOption(option);
105
109
  return sum;
106
110
  }
107
111
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mrxy-yk",
3
- "version": "1.9.6",
3
+ "version": "1.9.8",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "A collection of Vue 3 components and utilities",