@element-plus/nightly 0.0.20221202 → 0.0.20221204
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/dist/index.css +1 -1
- package/dist/index.full.js +736 -449
- package/dist/index.full.min.js +17 -17
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +14 -14
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +730 -450
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/component.mjs +3 -0
- package/es/component.mjs.map +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +3 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/notification/src/notify.mjs +1 -1
- package/es/components/notification/src/notify.mjs.map +1 -1
- package/es/components/statistic/index.d.ts +164 -0
- package/es/components/statistic/index.mjs +12 -0
- package/es/components/statistic/index.mjs.map +1 -0
- package/es/components/statistic/src/countdown.d.ts +22 -0
- package/es/components/statistic/src/countdown.mjs +63 -0
- package/es/components/statistic/src/countdown.mjs.map +1 -0
- package/es/components/statistic/src/countdown.vue.d.ts +80 -0
- package/es/components/statistic/src/countdown2.mjs +114 -0
- package/es/components/statistic/src/countdown2.mjs.map +1 -0
- package/es/components/statistic/src/statistic.d.ts +21 -0
- package/es/components/statistic/src/statistic.mjs +51 -0
- package/es/components/statistic/src/statistic.mjs.map +1 -0
- package/es/components/statistic/src/statistic.vue.d.ts +83 -0
- package/es/components/statistic/src/statistic2.mjs +81 -0
- package/es/components/statistic/src/statistic2.mjs.map +1 -0
- package/es/components/statistic/style/css.d.ts +2 -0
- package/es/components/statistic/style/css.mjs +3 -0
- package/es/components/statistic/style/css.mjs.map +1 -0
- package/es/components/statistic/style/index.d.ts +2 -0
- package/es/components/statistic/style/index.mjs +3 -0
- package/es/components/statistic/style/index.mjs.map +1 -0
- package/es/components/steps/index.d.ts +16 -16
- package/es/components/steps/src/item.d.ts +1 -1
- package/es/components/steps/src/item.vue.d.ts +4 -4
- package/es/components/steps/src/steps.d.ts +2 -2
- package/es/components/steps/src/steps.vue.d.ts +8 -8
- package/es/index.mjs +3 -0
- package/es/index.mjs.map +1 -1
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/es/version.mjs.map +1 -1
- package/lib/component.js +165 -162
- package/lib/component.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +23 -13
- package/lib/components/index.js.map +1 -1
- package/lib/components/notification/src/notify.js +1 -1
- package/lib/components/notification/src/notify.js.map +1 -1
- package/lib/components/statistic/index.d.ts +164 -0
- package/lib/components/statistic/index.js +23 -0
- package/lib/components/statistic/index.js.map +1 -0
- package/lib/components/statistic/src/countdown.d.ts +22 -0
- package/lib/components/statistic/src/countdown.js +73 -0
- package/lib/components/statistic/src/countdown.js.map +1 -0
- package/lib/components/statistic/src/countdown.vue.d.ts +80 -0
- package/lib/components/statistic/src/countdown2.js +118 -0
- package/lib/components/statistic/src/countdown2.js.map +1 -0
- package/lib/components/statistic/src/statistic.d.ts +21 -0
- package/lib/components/statistic/src/statistic.js +56 -0
- package/lib/components/statistic/src/statistic.js.map +1 -0
- package/lib/components/statistic/src/statistic.vue.d.ts +83 -0
- package/lib/components/statistic/src/statistic2.js +85 -0
- package/lib/components/statistic/src/statistic2.js.map +1 -0
- package/lib/components/statistic/style/css.d.ts +2 -0
- package/lib/components/statistic/style/css.js +6 -0
- package/lib/components/statistic/style/css.js.map +1 -0
- package/lib/components/statistic/style/index.d.ts +2 -0
- package/lib/components/statistic/style/index.js +6 -0
- package/lib/components/statistic/style/index.js.map +1 -0
- package/lib/components/steps/index.d.ts +16 -16
- package/lib/components/steps/src/item.d.ts +1 -1
- package/lib/components/steps/src/item.vue.d.ts +4 -4
- package/lib/components/steps/src/steps.d.ts +2 -2
- package/lib/components/steps/src/steps.vue.d.ts +8 -8
- package/lib/index.js +112 -102
- package/lib/index.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +2 -2
- package/tags.json +1 -1
- package/theme-chalk/el-statistic.css +1 -0
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/common/var.scss +14 -1
- package/theme-chalk/src/index.scss +1 -0
- package/theme-chalk/src/statistic.scss +46 -0
- package/web-types.json +1 -1
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
export * from './src/statistic';
|
|
2
|
+
export * from './src/countdown';
|
|
3
|
+
export declare const ElStatistic: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
4
|
+
readonly decimalSeparator: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, ".", boolean>;
|
|
5
|
+
readonly groupSeparator: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, ",", boolean>;
|
|
6
|
+
readonly precision: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, null, boolean>;
|
|
7
|
+
readonly formatter: {
|
|
8
|
+
readonly type: import("vue").PropType<(val: string | number) => string | number>;
|
|
9
|
+
readonly required: false;
|
|
10
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
11
|
+
__epPropKey: true;
|
|
12
|
+
};
|
|
13
|
+
readonly value: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, null, boolean>;
|
|
14
|
+
readonly prefix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
15
|
+
readonly suffix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, null, boolean>;
|
|
16
|
+
readonly title: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
17
|
+
readonly valueStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue) | ((new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue))[], unknown, unknown, () => {}, boolean>;
|
|
18
|
+
readonly rate: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 3, boolean>;
|
|
19
|
+
}, {
|
|
20
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
21
|
+
readonly decimalSeparator: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, ".", boolean>;
|
|
22
|
+
readonly groupSeparator: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, ",", boolean>;
|
|
23
|
+
readonly precision: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, null, boolean>;
|
|
24
|
+
readonly formatter: {
|
|
25
|
+
readonly type: import("vue").PropType<(val: string | number) => string | number>;
|
|
26
|
+
readonly required: false;
|
|
27
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
28
|
+
__epPropKey: true;
|
|
29
|
+
};
|
|
30
|
+
readonly value: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, null, boolean>;
|
|
31
|
+
readonly prefix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
32
|
+
readonly suffix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, null, boolean>;
|
|
33
|
+
readonly title: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
34
|
+
readonly valueStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue) | ((new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue))[], unknown, unknown, () => {}, boolean>;
|
|
35
|
+
readonly rate: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 3, boolean>;
|
|
36
|
+
}>> & {
|
|
37
|
+
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined;
|
|
38
|
+
}>>;
|
|
39
|
+
ns: {
|
|
40
|
+
namespace: import("vue").Ref<string>;
|
|
41
|
+
b: (blockSuffix?: string) => string;
|
|
42
|
+
e: (element?: string | undefined) => string;
|
|
43
|
+
m: (modifier?: string | undefined) => string;
|
|
44
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
45
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
46
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
47
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
48
|
+
is: {
|
|
49
|
+
(name: string, state: boolean | undefined): string;
|
|
50
|
+
(name: string): string;
|
|
51
|
+
};
|
|
52
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
53
|
+
cssVarName: (name: string) => string;
|
|
54
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
55
|
+
cssVarBlockName: (name: string) => string;
|
|
56
|
+
};
|
|
57
|
+
disposeValue: import("vue").ComputedRef<import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
58
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
59
|
+
readonly decimalSeparator: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, ".", boolean>;
|
|
60
|
+
readonly groupSeparator: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, ",", boolean>;
|
|
61
|
+
readonly precision: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, null, boolean>;
|
|
62
|
+
readonly formatter: {
|
|
63
|
+
readonly type: import("vue").PropType<(val: string | number) => string | number>;
|
|
64
|
+
readonly required: false;
|
|
65
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
66
|
+
__epPropKey: true;
|
|
67
|
+
};
|
|
68
|
+
readonly value: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, null, boolean>;
|
|
69
|
+
readonly prefix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
70
|
+
readonly suffix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, null, boolean>;
|
|
71
|
+
readonly title: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
72
|
+
readonly valueStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue) | ((new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue))[], unknown, unknown, () => {}, boolean>;
|
|
73
|
+
readonly rate: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 3, boolean>;
|
|
74
|
+
}>>, {
|
|
75
|
+
readonly title: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
76
|
+
readonly value: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
77
|
+
readonly prefix: string;
|
|
78
|
+
readonly suffix: string;
|
|
79
|
+
readonly precision: number;
|
|
80
|
+
readonly decimalSeparator: string;
|
|
81
|
+
readonly groupSeparator: string;
|
|
82
|
+
readonly valueStyle: import("vue").StyleValue;
|
|
83
|
+
readonly rate: number;
|
|
84
|
+
}>> & Record<string, any>;
|
|
85
|
+
export declare const ElCountdown: import("element-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
86
|
+
readonly format: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "HH:mm:ss", boolean>;
|
|
87
|
+
readonly prefix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
88
|
+
readonly suffix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, null, boolean>;
|
|
89
|
+
readonly title: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
90
|
+
readonly value: {
|
|
91
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (number | import("dayjs").Dayjs) & {}) | (() => number | import("dayjs").Dayjs) | ((new (...args: any[]) => (number | import("dayjs").Dayjs) & {}) | (() => number | import("dayjs").Dayjs))[], unknown, unknown>>;
|
|
92
|
+
readonly required: false;
|
|
93
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
94
|
+
__epPropKey: true;
|
|
95
|
+
};
|
|
96
|
+
readonly valueStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue) | ((new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue))[], unknown, unknown, () => {}, boolean>;
|
|
97
|
+
}, {
|
|
98
|
+
REFRESH_INTERVAL: number;
|
|
99
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
100
|
+
readonly format: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "HH:mm:ss", boolean>;
|
|
101
|
+
readonly prefix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
102
|
+
readonly suffix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, null, boolean>;
|
|
103
|
+
readonly title: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
104
|
+
readonly value: {
|
|
105
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (number | import("dayjs").Dayjs) & {}) | (() => number | import("dayjs").Dayjs) | ((new (...args: any[]) => (number | import("dayjs").Dayjs) & {}) | (() => number | import("dayjs").Dayjs))[], unknown, unknown>>;
|
|
106
|
+
readonly required: false;
|
|
107
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
108
|
+
__epPropKey: true;
|
|
109
|
+
};
|
|
110
|
+
readonly valueStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue) | ((new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue))[], unknown, unknown, () => {}, boolean>;
|
|
111
|
+
}>> & {
|
|
112
|
+
onChange?: ((value: number) => any) | undefined;
|
|
113
|
+
onFinish?: (() => any) | undefined;
|
|
114
|
+
}>>;
|
|
115
|
+
emit: ((event: "change", value: number) => void) & ((event: "finish") => void);
|
|
116
|
+
ns: {
|
|
117
|
+
namespace: import("vue").Ref<string>;
|
|
118
|
+
b: (blockSuffix?: string) => string;
|
|
119
|
+
e: (element?: string | undefined) => string;
|
|
120
|
+
m: (modifier?: string | undefined) => string;
|
|
121
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
122
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
123
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
124
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
125
|
+
is: {
|
|
126
|
+
(name: string, state: boolean | undefined): string;
|
|
127
|
+
(name: string): string;
|
|
128
|
+
};
|
|
129
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
130
|
+
cssVarName: (name: string) => string;
|
|
131
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
132
|
+
cssVarBlockName: (name: string) => string;
|
|
133
|
+
};
|
|
134
|
+
disposeValue: import("vue").Ref<string>;
|
|
135
|
+
timer: number | undefined;
|
|
136
|
+
getTime: (val: number) => number;
|
|
137
|
+
stopTimer: () => void;
|
|
138
|
+
startTimer: () => void;
|
|
139
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
140
|
+
finish: () => boolean;
|
|
141
|
+
change: (value: number) => boolean;
|
|
142
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
143
|
+
readonly format: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "HH:mm:ss", boolean>;
|
|
144
|
+
readonly prefix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
145
|
+
readonly suffix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, null, boolean>;
|
|
146
|
+
readonly title: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
147
|
+
readonly value: {
|
|
148
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (number | import("dayjs").Dayjs) & {}) | (() => number | import("dayjs").Dayjs) | ((new (...args: any[]) => (number | import("dayjs").Dayjs) & {}) | (() => number | import("dayjs").Dayjs))[], unknown, unknown>>;
|
|
149
|
+
readonly required: false;
|
|
150
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
151
|
+
__epPropKey: true;
|
|
152
|
+
};
|
|
153
|
+
readonly valueStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue) | ((new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue))[], unknown, unknown, () => {}, boolean>;
|
|
154
|
+
}>> & {
|
|
155
|
+
onChange?: ((value: number) => any) | undefined;
|
|
156
|
+
onFinish?: (() => any) | undefined;
|
|
157
|
+
}, {
|
|
158
|
+
readonly title: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
159
|
+
readonly prefix: string;
|
|
160
|
+
readonly suffix: string;
|
|
161
|
+
readonly format: string;
|
|
162
|
+
readonly valueStyle: import("vue").StyleValue;
|
|
163
|
+
}>> & Record<string, any>;
|
|
164
|
+
export default ElStatistic;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
require('../../utils/index.js');
|
|
6
|
+
var statistic$1 = require('./src/statistic2.js');
|
|
7
|
+
var countdown$1 = require('./src/countdown2.js');
|
|
8
|
+
var statistic = require('./src/statistic.js');
|
|
9
|
+
var countdown = require('./src/countdown.js');
|
|
10
|
+
var install = require('../../utils/vue/install.js');
|
|
11
|
+
|
|
12
|
+
const ElStatistic = install.withInstall(statistic$1["default"]);
|
|
13
|
+
const ElCountdown = install.withInstall(countdown$1["default"]);
|
|
14
|
+
|
|
15
|
+
exports.regroup = statistic.regroup;
|
|
16
|
+
exports.statisticProps = statistic.statisticProps;
|
|
17
|
+
exports.countdownEmits = countdown.countdownEmits;
|
|
18
|
+
exports.countdownProps = countdown.countdownProps;
|
|
19
|
+
exports.formatTimeStr = countdown.formatTimeStr;
|
|
20
|
+
exports.ElCountdown = ElCountdown;
|
|
21
|
+
exports.ElStatistic = ElStatistic;
|
|
22
|
+
exports["default"] = ElStatistic;
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../packages/components/statistic/index.ts"],"sourcesContent":["import { withInstall } from '@element-plus/utils'\nimport Statistic from './src/statistic.vue'\nimport Countdown from './src/countdown.vue'\n\nexport * from './src/statistic'\nexport * from './src/countdown'\n\nexport const ElStatistic = withInstall(Statistic)\nexport const ElCountdown = withInstall(Countdown)\n\nexport default ElStatistic\n"],"names":["withInstall","Statistic","Countdown"],"mappings":";;;;;;;;;;;AAKY,MAAC,WAAW,GAAGA,mBAAW,CAACC,sBAAS,EAAE;AACtC,MAAC,WAAW,GAAGD,mBAAW,CAACE,sBAAS;;;;;;;;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import type { StyleValue } from 'vue';
|
|
3
|
+
import type Countdown from './countdown.vue';
|
|
4
|
+
export declare const countdownProps: {
|
|
5
|
+
readonly format: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "HH:mm:ss", boolean>;
|
|
6
|
+
readonly prefix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
7
|
+
readonly suffix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, null, boolean>;
|
|
8
|
+
readonly title: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
9
|
+
readonly value: {
|
|
10
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (number | dayjs.Dayjs) & {}) | (() => number | dayjs.Dayjs) | ((new (...args: any[]) => (number | dayjs.Dayjs) & {}) | (() => number | dayjs.Dayjs))[], unknown, unknown>>;
|
|
11
|
+
readonly required: false;
|
|
12
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
13
|
+
__epPropKey: true;
|
|
14
|
+
};
|
|
15
|
+
readonly valueStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => StyleValue & {}) | (() => StyleValue) | ((new (...args: any[]) => StyleValue & {}) | (() => StyleValue))[], unknown, unknown, () => {}, boolean>;
|
|
16
|
+
};
|
|
17
|
+
export declare const countdownEmits: {
|
|
18
|
+
finish: () => boolean;
|
|
19
|
+
change: (value: number) => boolean;
|
|
20
|
+
};
|
|
21
|
+
export declare const formatTimeStr: (format: any, time: number, futureTime: any) => string;
|
|
22
|
+
export declare type CountdownInstance = InstanceType<typeof Countdown>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var lodashUnified = require('lodash-unified');
|
|
6
|
+
var dayjs = require('dayjs');
|
|
7
|
+
require('../../../utils/index.js');
|
|
8
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
9
|
+
|
|
10
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
|
+
|
|
12
|
+
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
13
|
+
|
|
14
|
+
const countdownProps = runtime.buildProps({
|
|
15
|
+
format: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "HH:mm:ss"
|
|
18
|
+
},
|
|
19
|
+
prefix: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: ""
|
|
22
|
+
},
|
|
23
|
+
suffix: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: null
|
|
26
|
+
},
|
|
27
|
+
title: {
|
|
28
|
+
type: [String, Number],
|
|
29
|
+
default: ""
|
|
30
|
+
},
|
|
31
|
+
value: {
|
|
32
|
+
type: runtime.definePropType([Number, Object])
|
|
33
|
+
},
|
|
34
|
+
valueStyle: {
|
|
35
|
+
type: runtime.definePropType([String, Object]),
|
|
36
|
+
default: () => ({})
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
const countdownEmits = {
|
|
40
|
+
finish: () => true,
|
|
41
|
+
change: (value) => !!value
|
|
42
|
+
};
|
|
43
|
+
const formatTimeStr = function(format, time, futureTime) {
|
|
44
|
+
const timeUnits = [
|
|
45
|
+
["Y", 1e3 * 60 * 60 * 24 * 365],
|
|
46
|
+
["M", 1e3 * 60 * 60 * 24 * 30],
|
|
47
|
+
["D", 1e3 * 60 * 60 * 24],
|
|
48
|
+
["H", 1e3 * 60 * 60],
|
|
49
|
+
["m", 1e3 * 60],
|
|
50
|
+
["s", 1e3],
|
|
51
|
+
["S", 1]
|
|
52
|
+
];
|
|
53
|
+
return lodashUnified.reduce(timeUnits, (con, item) => {
|
|
54
|
+
const name = item[0];
|
|
55
|
+
return con.replace(new RegExp(`${name}+`, "g"), (match) => {
|
|
56
|
+
let sum = 0;
|
|
57
|
+
if (name == "M") {
|
|
58
|
+
sum = Math.abs(dayjs__default["default"]().diff(dayjs__default["default"](futureTime), name));
|
|
59
|
+
time -= Math.abs(dayjs__default["default"]().diff(dayjs__default["default"]().add(sum, "month").format(), "day") * timeUnits[2][1]);
|
|
60
|
+
} else {
|
|
61
|
+
sum = lodashUnified.floor(lodashUnified.divide(time, item[1]));
|
|
62
|
+
time -= lodashUnified.multiply(sum, item[1]);
|
|
63
|
+
}
|
|
64
|
+
sum = lodashUnified.padStart(String(sum), String(match).length, "0");
|
|
65
|
+
return sum;
|
|
66
|
+
});
|
|
67
|
+
}, format);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
exports.countdownEmits = countdownEmits;
|
|
71
|
+
exports.countdownProps = countdownProps;
|
|
72
|
+
exports.formatTimeStr = formatTimeStr;
|
|
73
|
+
//# sourceMappingURL=countdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"countdown.js","sources":["../../../../../../packages/components/statistic/src/countdown.ts"],"sourcesContent":["import { divide, floor, multiply, padStart, reduce } from 'lodash-unified'\nimport dayjs from 'dayjs'\nimport { buildProps, definePropType } from '@element-plus/utils'\nimport type { StyleValue } from 'vue'\nimport type { Dayjs } from 'dayjs'\nimport type Countdown from './countdown.vue'\nexport const countdownProps = buildProps({\n format: {\n type: String,\n default: 'HH:mm:ss',\n },\n prefix: {\n type: String,\n default: '',\n },\n suffix: {\n type: String,\n default: null,\n },\n title: {\n type: [String, Number],\n default: '',\n },\n value: {\n type: definePropType<number | Dayjs>([Number, Object]),\n },\n valueStyle: {\n type: definePropType<StyleValue>([String, Object]),\n default: () => ({}),\n },\n} as const)\n\nexport const countdownEmits = {\n finish: () => true,\n change: (value: number) => !!value,\n}\n\nexport const formatTimeStr = function (\n format: any,\n time: number,\n futureTime: any\n) {\n const timeUnits: any = [\n ['Y', 1000 * 60 * 60 * 24 * 365], // years\n ['M', 1000 * 60 * 60 * 24 * 30], // months\n ['D', 1000 * 60 * 60 * 24], // days\n ['H', 1000 * 60 * 60], // hours\n ['m', 1000 * 60], // minutes\n ['s', 1000], // seconds\n ['S', 1], // million seconds\n ]\n return reduce(\n timeUnits,\n (con: string, item: any[]) => {\n const name = item[0]\n return con.replace(new RegExp(`${name}+`, 'g'), (match: any) => {\n let sum: any = 0\n if (name == 'M') {\n //Revision of month\n sum = Math.abs(dayjs().diff(dayjs(futureTime), name))\n time -= Math.abs(\n dayjs().diff(dayjs().add(sum, 'month').format(), 'day') *\n timeUnits[2][1]\n )\n } else {\n sum = floor(divide(time, item[1]))\n time -= multiply(sum, item[1])\n }\n sum = padStart(String(sum), String(match).length, '0') // autoCompletion\n return sum\n })\n },\n format\n )\n}\n\nexport type CountdownInstance = InstanceType<typeof Countdown>\n"],"names":["buildProps","definePropType","reduce","dayjs","floor","divide","multiply","padStart"],"mappings":";;;;;;;;;;;;;AAGY,MAAC,cAAc,GAAGA,kBAAU,CAAC;AACzC,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,UAAU;AACvB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAEC,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAEA,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,OAAO,EAAE,CAAC;AACvB,GAAG;AACH,CAAC,EAAE;AACS,MAAC,cAAc,GAAG;AAC9B,EAAE,MAAM,EAAE,MAAM,IAAI;AACpB,EAAE,MAAM,EAAE,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;AAC5B,EAAE;AACU,MAAC,aAAa,GAAG,SAAS,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE;AAChE,EAAE,MAAM,SAAS,GAAG;AACpB,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;AACnC,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAClC,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAC7B,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,EAAE,GAAG,EAAE,CAAC;AACxB,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,EAAE,CAAC;AACnB,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC;AACd,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;AACZ,GAAG,CAAC;AACJ,EAAE,OAAOC,oBAAM,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK;AAC1C,IAAI,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;AACzB,IAAI,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,KAAK,KAAK;AAC/D,MAAM,IAAI,GAAG,GAAG,CAAC,CAAC;AAClB,MAAM,IAAI,IAAI,IAAI,GAAG,EAAE;AACvB,QAAQ,GAAG,GAAG,IAAI,CAAC,GAAG,CAACC,yBAAK,EAAE,CAAC,IAAI,CAACA,yBAAK,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AAC9D,QAAQ,IAAI,IAAI,IAAI,CAAC,GAAG,CAACA,yBAAK,EAAE,CAAC,IAAI,CAACA,yBAAK,EAAE,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpG,OAAO,MAAM;AACb,QAAQ,GAAG,GAAGC,mBAAK,CAACC,oBAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,QAAQ,IAAI,IAAIC,sBAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,OAAO;AACP,MAAM,GAAG,GAAGC,sBAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC7D,MAAM,OAAO,GAAG,CAAC;AACjB,KAAK,CAAC,CAAC;AACP,GAAG,EAAE,MAAM,CAAC,CAAC;AACb;;;;;;"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
readonly format: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "HH:mm:ss", boolean>;
|
|
3
|
+
readonly prefix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
4
|
+
readonly suffix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, null, boolean>;
|
|
5
|
+
readonly title: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
6
|
+
readonly value: {
|
|
7
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (number | import("dayjs").Dayjs) & {}) | (() => number | import("dayjs").Dayjs) | ((new (...args: any[]) => (number | import("dayjs").Dayjs) & {}) | (() => number | import("dayjs").Dayjs))[], unknown, unknown>>;
|
|
8
|
+
readonly required: false;
|
|
9
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
10
|
+
__epPropKey: true;
|
|
11
|
+
};
|
|
12
|
+
readonly valueStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue) | ((new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue))[], unknown, unknown, () => {}, boolean>;
|
|
13
|
+
}, {
|
|
14
|
+
REFRESH_INTERVAL: number;
|
|
15
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
readonly format: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "HH:mm:ss", boolean>;
|
|
17
|
+
readonly prefix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
18
|
+
readonly suffix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, null, boolean>;
|
|
19
|
+
readonly title: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
20
|
+
readonly value: {
|
|
21
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (number | import("dayjs").Dayjs) & {}) | (() => number | import("dayjs").Dayjs) | ((new (...args: any[]) => (number | import("dayjs").Dayjs) & {}) | (() => number | import("dayjs").Dayjs))[], unknown, unknown>>;
|
|
22
|
+
readonly required: false;
|
|
23
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
24
|
+
__epPropKey: true;
|
|
25
|
+
};
|
|
26
|
+
readonly valueStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue) | ((new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue))[], unknown, unknown, () => {}, boolean>;
|
|
27
|
+
}>> & {
|
|
28
|
+
onChange?: ((value: number) => any) | undefined;
|
|
29
|
+
onFinish?: (() => any) | undefined;
|
|
30
|
+
}>>;
|
|
31
|
+
emit: ((event: "change", value: number) => void) & ((event: "finish") => void);
|
|
32
|
+
ns: {
|
|
33
|
+
namespace: import("vue").Ref<string>;
|
|
34
|
+
b: (blockSuffix?: string) => string;
|
|
35
|
+
e: (element?: string | undefined) => string;
|
|
36
|
+
m: (modifier?: string | undefined) => string;
|
|
37
|
+
be: (blockSuffix?: string | undefined, element?: string | undefined) => string;
|
|
38
|
+
em: (element?: string | undefined, modifier?: string | undefined) => string;
|
|
39
|
+
bm: (blockSuffix?: string | undefined, modifier?: string | undefined) => string;
|
|
40
|
+
bem: (blockSuffix?: string | undefined, element?: string | undefined, modifier?: string | undefined) => string;
|
|
41
|
+
is: {
|
|
42
|
+
(name: string, state: boolean | undefined): string;
|
|
43
|
+
(name: string): string;
|
|
44
|
+
};
|
|
45
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
46
|
+
cssVarName: (name: string) => string;
|
|
47
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
48
|
+
cssVarBlockName: (name: string) => string;
|
|
49
|
+
};
|
|
50
|
+
disposeValue: import("vue").Ref<string>;
|
|
51
|
+
timer: number | undefined;
|
|
52
|
+
getTime: (val: number) => number;
|
|
53
|
+
stopTimer: () => void;
|
|
54
|
+
startTimer: () => void;
|
|
55
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
56
|
+
finish: () => boolean;
|
|
57
|
+
change: (value: number) => boolean;
|
|
58
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
59
|
+
readonly format: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "HH:mm:ss", boolean>;
|
|
60
|
+
readonly prefix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
61
|
+
readonly suffix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, null, boolean>;
|
|
62
|
+
readonly title: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
63
|
+
readonly value: {
|
|
64
|
+
readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (number | import("dayjs").Dayjs) & {}) | (() => number | import("dayjs").Dayjs) | ((new (...args: any[]) => (number | import("dayjs").Dayjs) & {}) | (() => number | import("dayjs").Dayjs))[], unknown, unknown>>;
|
|
65
|
+
readonly required: false;
|
|
66
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
67
|
+
__epPropKey: true;
|
|
68
|
+
};
|
|
69
|
+
readonly valueStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue) | ((new (...args: any[]) => import("vue").StyleValue & {}) | (() => import("vue").StyleValue))[], unknown, unknown, () => {}, boolean>;
|
|
70
|
+
}>> & {
|
|
71
|
+
onChange?: ((value: number) => any) | undefined;
|
|
72
|
+
onFinish?: (() => any) | undefined;
|
|
73
|
+
}, {
|
|
74
|
+
readonly title: import("element-plus/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
75
|
+
readonly prefix: string;
|
|
76
|
+
readonly suffix: string;
|
|
77
|
+
readonly format: string;
|
|
78
|
+
readonly valueStyle: import("vue").StyleValue;
|
|
79
|
+
}>;
|
|
80
|
+
export default _default;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var lodashUnified = require('lodash-unified');
|
|
7
|
+
require('../../../hooks/index.js');
|
|
8
|
+
require('../../../utils/index.js');
|
|
9
|
+
var countdown = require('./countdown.js');
|
|
10
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
11
|
+
var index = require('../../../hooks/use-namespace/index.js');
|
|
12
|
+
var core = require('@vueuse/core');
|
|
13
|
+
|
|
14
|
+
const REFRESH_INTERVAL = 1e3 / 30;
|
|
15
|
+
const __default__ = vue.defineComponent({
|
|
16
|
+
name: "ElCountdown"
|
|
17
|
+
});
|
|
18
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
19
|
+
...__default__,
|
|
20
|
+
props: countdown.countdownProps,
|
|
21
|
+
emits: countdown.countdownEmits,
|
|
22
|
+
setup(__props, { expose, emit }) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
vue.onBeforeUnmount(() => {
|
|
25
|
+
stopTimer();
|
|
26
|
+
});
|
|
27
|
+
const ns = index.useNamespace("statistic");
|
|
28
|
+
const disposeValue = vue.ref("");
|
|
29
|
+
let timer;
|
|
30
|
+
const getTime = (val) => {
|
|
31
|
+
return new Date(val).getTime();
|
|
32
|
+
};
|
|
33
|
+
const stopTimer = () => {
|
|
34
|
+
if (timer) {
|
|
35
|
+
clearInterval(timer);
|
|
36
|
+
timer = void 0;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const startTimer = () => {
|
|
40
|
+
const { value, format } = props;
|
|
41
|
+
if (lodashUnified.isNil(value)) {
|
|
42
|
+
disposeValue.value = "";
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const timestamp = getTime(core.isNumber(value) ? value : value.valueOf());
|
|
46
|
+
timer = setInterval(() => {
|
|
47
|
+
const diff = timestamp - Date.now();
|
|
48
|
+
emit("change", diff);
|
|
49
|
+
if (diff < 0) {
|
|
50
|
+
stopTimer();
|
|
51
|
+
emit("finish");
|
|
52
|
+
}
|
|
53
|
+
disposeValue.value = countdown.formatTimeStr(format, diff, value);
|
|
54
|
+
}, REFRESH_INTERVAL);
|
|
55
|
+
};
|
|
56
|
+
vue.watch(() => [props.value, props.format], () => {
|
|
57
|
+
stopTimer();
|
|
58
|
+
startTimer();
|
|
59
|
+
}, {
|
|
60
|
+
immediate: true
|
|
61
|
+
});
|
|
62
|
+
expose({
|
|
63
|
+
disposeValue
|
|
64
|
+
});
|
|
65
|
+
return (_ctx, _cache) => {
|
|
66
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
67
|
+
class: vue.normalizeClass(vue.unref(ns).b())
|
|
68
|
+
}, [
|
|
69
|
+
!!_ctx.$slots.title || _ctx.title ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
70
|
+
key: 0,
|
|
71
|
+
ref: "title",
|
|
72
|
+
class: vue.normalizeClass(vue.unref(ns).e("head"))
|
|
73
|
+
}, [
|
|
74
|
+
vue.createElementVNode("span", {
|
|
75
|
+
class: vue.normalizeClass(vue.unref(ns).e("title"))
|
|
76
|
+
}, [
|
|
77
|
+
vue.renderSlot(_ctx.$slots, "title", {}, () => [
|
|
78
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.title), 1)
|
|
79
|
+
])
|
|
80
|
+
], 2)
|
|
81
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
|
82
|
+
vue.createElementVNode("div", {
|
|
83
|
+
class: vue.normalizeClass(vue.unref(ns).e("content"))
|
|
84
|
+
}, [
|
|
85
|
+
!!_ctx.$slots.title || _ctx.prefix ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
86
|
+
key: 0,
|
|
87
|
+
class: vue.normalizeClass(vue.unref(ns).e("prefix"))
|
|
88
|
+
}, [
|
|
89
|
+
vue.renderSlot(_ctx.$slots, "prefix", {}, () => [
|
|
90
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.prefix), 1)
|
|
91
|
+
])
|
|
92
|
+
], 2)) : vue.createCommentVNode("v-if", true),
|
|
93
|
+
_ctx.value ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
94
|
+
key: 1,
|
|
95
|
+
class: vue.normalizeClass(vue.unref(ns).e("number")),
|
|
96
|
+
style: vue.normalizeStyle(_ctx.valueStyle)
|
|
97
|
+
}, [
|
|
98
|
+
vue.renderSlot(_ctx.$slots, "formatter", {}, () => [
|
|
99
|
+
vue.createTextVNode(vue.toDisplayString(disposeValue.value), 1)
|
|
100
|
+
])
|
|
101
|
+
], 6)) : vue.createCommentVNode("v-if", true),
|
|
102
|
+
!!_ctx.$slots.title || _ctx.suffix ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
103
|
+
key: 2,
|
|
104
|
+
class: vue.normalizeClass(vue.unref(ns).e("suffix"))
|
|
105
|
+
}, [
|
|
106
|
+
vue.renderSlot(_ctx.$slots, "suffix", {}, () => [
|
|
107
|
+
vue.createTextVNode(vue.toDisplayString(_ctx.suffix), 1)
|
|
108
|
+
])
|
|
109
|
+
], 2)) : vue.createCommentVNode("v-if", true)
|
|
110
|
+
], 2)
|
|
111
|
+
], 2);
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
var Countdown = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/statistic/src/countdown.vue"]]);
|
|
116
|
+
|
|
117
|
+
exports["default"] = Countdown;
|
|
118
|
+
//# sourceMappingURL=countdown2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"countdown2.js","sources":["../../../../../../packages/components/statistic/src/countdown.vue"],"sourcesContent":["<template>\n <div :class=\"ns.b()\">\n <div v-if=\"!!$slots.title || title\" ref=\"title\" :class=\"ns.e('head')\">\n <span :class=\"ns.e('title')\">\n <slot name=\"title\">\n {{ title }}\n </slot>\n </span>\n </div>\n <div :class=\"ns.e('content')\">\n <span v-if=\"!!$slots.title || prefix\" :class=\"ns.e('prefix')\">\n <slot name=\"prefix\">\n {{ prefix }}\n </slot>\n </span>\n <span v-if=\"value\" :class=\"ns.e('number')\" :style=\"valueStyle\">\n <slot name=\"formatter\"> {{ disposeValue }}</slot>\n </span>\n <span v-if=\"!!$slots.title || suffix\" :class=\"ns.e('suffix')\">\n <slot name=\"suffix\">\n {{ suffix }}\n </slot>\n </span>\n </div>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { onBeforeUnmount, ref, watch } from 'vue'\nimport { isNil } from 'lodash-unified'\nimport { useNamespace } from '@element-plus/hooks'\nimport { isNumber } from '@element-plus/utils'\nimport { countdownEmits, countdownProps, formatTimeStr } from './countdown'\n\nconst REFRESH_INTERVAL = 1000 / 30\n\ndefineOptions({\n name: 'ElCountdown',\n})\nonBeforeUnmount(() => {\n stopTimer()\n})\nconst props = defineProps(countdownProps)\nconst emit = defineEmits(countdownEmits)\nconst ns = useNamespace('statistic')\nconst disposeValue = ref('')\nlet timer: ReturnType<typeof setInterval> | undefined\n\nconst getTime = (val: number) => {\n return new Date(val).getTime()\n}\n\nconst stopTimer = () => {\n if (timer) {\n clearInterval(timer)\n timer = undefined\n }\n}\n\nconst startTimer = () => {\n const { value, format } = props\n if (isNil(value)) {\n disposeValue.value = ''\n return\n }\n const timestamp = getTime(isNumber(value) ? value : value.valueOf())\n timer = setInterval(() => {\n const diff = timestamp - Date.now()\n emit('change', diff)\n if (diff < 0) {\n stopTimer()\n emit('finish')\n }\n disposeValue.value = formatTimeStr(format, diff, value)\n }, REFRESH_INTERVAL)\n}\n\nwatch(\n () => [props.value, props.format],\n () => {\n stopTimer()\n startTimer()\n },\n {\n immediate: true,\n }\n)\n\ndefineExpose({\n disposeValue,\n})\n</script>\n"],"names":["onBeforeUnmount","useNamespace","ref","isNil","isNumber","formatTimeStr","watch"],"mappings":";;;;;;;;;;;;;;uCAmCc,CAAA;AAAA,EACZ,IAAM,EAAA,aAAA;AACR;;;;;;;AACA,IAAAA,mBAAA,CAAgB,MAAM;AACpB,MAAU,SAAA,EAAA,CAAA;AAAA,KACX,CAAA,CAAA;AAGD,IAAM,MAAA,EAAA,GAAKC,mBAAa,WAAW,CAAA,CAAA;AACnC,IAAM,MAAA,YAAA,GAAeC,QAAI,EAAE,CAAA,CAAA;AAC3B,IAAI,IAAA,KAAA,CAAA;AAEJ,IAAM,MAAA,OAAA,GAAU,CAAC,GAAgB,KAAA;AAC/B,MAAA,OAAO,IAAI,IAAA,CAAK,GAAG,CAAA,CAAE,OAAQ,EAAA,CAAA;AAAA,KAC/B,CAAA;AAEA,IAAA,MAAM,YAAY,MAAM;AACtB,MAAA,IAAI,KAAO,EAAA;AACT,QAAA,aAAA,CAAc,KAAK,CAAA,CAAA;AACnB,QAAQ,KAAA,GAAA,KAAA,CAAA,CAAA;AAAA,OACV;AAAA,KACF,CAAA;AAEA,IAAA,MAAM,aAAa,MAAM;AACvB,MAAM,MAAA,EAAE,OAAO,MAAW,EAAA,GAAA,KAAA,CAAA;AAC1B,MAAI,IAAAC,mBAAA,CAAM,KAAK,CAAG,EAAA;AAChB,QAAA,YAAA,CAAa,KAAQ,GAAA,EAAA,CAAA;AACrB,QAAA,OAAA;AAAA,OACF;AACA,MAAM,MAAA,SAAA,GAAY,QAAQC,aAAS,CAAA,KAAK,IAAI,KAAQ,GAAA,KAAA,CAAM,SAAS,CAAA,CAAA;AACnE,MAAA,KAAA,GAAQ,YAAY,MAAM;AACxB,QAAM,MAAA,IAAA,GAAO,SAAY,GAAA,IAAA,CAAK,GAAI,EAAA,CAAA;AAClC,QAAA,IAAA,CAAK,UAAU,IAAI,CAAA,CAAA;AACnB,QAAA,IAAI,OAAO,CAAG,EAAA;AACZ,UAAU,SAAA,EAAA,CAAA;AACV,UAAA,IAAA,CAAK,QAAQ,CAAA,CAAA;AAAA,SACf;AACA,QAAA,YAAA,CAAa,KAAQ,GAAAC,uBAAA,CAAc,MAAQ,EAAA,IAAA,EAAM,KAAK,CAAA,CAAA;AAAA,SACrD,gBAAgB,CAAA,CAAA;AAAA,KACrB,CAAA;AAEA,IAAAC,SAAA,CACE,MAAM,CAAC,KAAA,CAAM,OAAO,KAAM,CAAA,MAAM,GAChC,MAAM;AACJ,MAAU,SAAA,EAAA,CAAA;AACV,MAAW,UAAA,EAAA,CAAA;AAAA,KAEb,EAAA;AAAA,MACE,SAAW,EAAA,IAAA;AAAA,KAEf,CAAA,CAAA;AAEA,IAAa,MAAA,CAAA;AAAA,MACX,YAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { StyleValue } from 'vue';
|
|
2
|
+
import type Statistic from './statistic.vue';
|
|
3
|
+
export declare const statisticProps: {
|
|
4
|
+
readonly decimalSeparator: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, ".", boolean>;
|
|
5
|
+
readonly groupSeparator: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, ",", boolean>;
|
|
6
|
+
readonly precision: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, null, boolean>;
|
|
7
|
+
readonly formatter: {
|
|
8
|
+
readonly type: import("vue").PropType<(val: string | number) => string | number>;
|
|
9
|
+
readonly required: false;
|
|
10
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
11
|
+
__epPropKey: true;
|
|
12
|
+
};
|
|
13
|
+
readonly value: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, null, boolean>;
|
|
14
|
+
readonly prefix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
15
|
+
readonly suffix: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, null, boolean>;
|
|
16
|
+
readonly title: import("element-plus/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, "", boolean>;
|
|
17
|
+
readonly valueStyle: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => StyleValue & {}) | (() => StyleValue) | ((new (...args: any[]) => StyleValue & {}) | (() => StyleValue))[], unknown, unknown, () => {}, boolean>;
|
|
18
|
+
readonly rate: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 3, boolean>;
|
|
19
|
+
};
|
|
20
|
+
export declare const regroup: (target: any, _mulriple?: number, _groupSeparator?: string) => string;
|
|
21
|
+
export declare type StatisticInstance = InstanceType<typeof Statistic>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
require('../../../utils/index.js');
|
|
6
|
+
var runtime = require('../../../utils/vue/props/runtime.js');
|
|
7
|
+
|
|
8
|
+
const statisticProps = runtime.buildProps({
|
|
9
|
+
decimalSeparator: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "."
|
|
12
|
+
},
|
|
13
|
+
groupSeparator: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ","
|
|
16
|
+
},
|
|
17
|
+
precision: {
|
|
18
|
+
type: Number,
|
|
19
|
+
default: null
|
|
20
|
+
},
|
|
21
|
+
formatter: {
|
|
22
|
+
type: runtime.definePropType(Function)
|
|
23
|
+
},
|
|
24
|
+
value: {
|
|
25
|
+
type: [String, Number],
|
|
26
|
+
default: null
|
|
27
|
+
},
|
|
28
|
+
prefix: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ""
|
|
31
|
+
},
|
|
32
|
+
suffix: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: null
|
|
35
|
+
},
|
|
36
|
+
title: {
|
|
37
|
+
type: [String, Number],
|
|
38
|
+
default: ""
|
|
39
|
+
},
|
|
40
|
+
valueStyle: {
|
|
41
|
+
type: runtime.definePropType([String, Object]),
|
|
42
|
+
default: () => ({})
|
|
43
|
+
},
|
|
44
|
+
rate: {
|
|
45
|
+
type: Number,
|
|
46
|
+
default: 3
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const regroup = function(target, _mulriple = 3, _groupSeparator = ",") {
|
|
50
|
+
const reg = new RegExp(`\\B(?=(\\d{${_mulriple}})+(?!\\d))`, "g");
|
|
51
|
+
return String(target).replace(reg, _groupSeparator);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
exports.regroup = regroup;
|
|
55
|
+
exports.statisticProps = statisticProps;
|
|
56
|
+
//# sourceMappingURL=statistic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statistic.js","sources":["../../../../../../packages/components/statistic/src/statistic.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport type { StyleValue } from 'vue'\nimport type Statistic from './statistic.vue'\nexport const statisticProps = buildProps({\n decimalSeparator: {\n type: String,\n default: '.',\n },\n groupSeparator: {\n type: String,\n default: ',',\n },\n precision: {\n type: Number,\n default: null,\n },\n formatter: {\n type: definePropType<(val: string | number) => string | number>(Function),\n },\n value: {\n type: [String, Number],\n default: null,\n },\n prefix: {\n type: String,\n default: '',\n },\n suffix: {\n type: String,\n default: null,\n },\n title: {\n type: [String, Number],\n default: '',\n },\n valueStyle: {\n type: definePropType<StyleValue>([String, Object]),\n default: () => ({}),\n },\n rate: {\n type: Number,\n default: 3,\n },\n} as const)\nexport const regroup = function (\n target: any,\n _mulriple = 3,\n _groupSeparator = ','\n): string {\n const reg = new RegExp(`\\\\B(?=(\\\\d{${_mulriple}})+(?!\\\\d))`, 'g')\n return String(target).replace(reg, _groupSeparator)\n}\nexport type StatisticInstance = InstanceType<typeof Statistic>\n"],"names":["buildProps","definePropType"],"mappings":";;;;;;;AACY,MAAC,cAAc,GAAGA,kBAAU,CAAC;AACzC,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,cAAc,EAAE;AAClB,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,GAAG;AAChB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,IAAI,EAAEC,sBAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,MAAM,EAAE;AACV,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,IAAI;AACjB,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;AAC1B,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAEA,sBAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC1C,IAAI,OAAO,EAAE,OAAO,EAAE,CAAC;AACvB,GAAG;AACH,EAAE,IAAI,EAAE;AACR,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,OAAO,EAAE,CAAC;AACd,GAAG;AACH,CAAC,EAAE;AACS,MAAC,OAAO,GAAG,SAAS,MAAM,EAAE,SAAS,GAAG,CAAC,EAAE,eAAe,GAAG,GAAG,EAAE;AAC9E,EAAE,MAAM,GAAG,GAAG,IAAI,MAAM,CAAC,CAAC,WAAW,EAAE,SAAS,CAAC,WAAW,CAAC,EAAE,GAAG,CAAC,CAAC;AACpE,EAAE,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC;AACtD;;;;;"}
|