cosey 0.6.12 → 0.6.14
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/components/index.js +3 -1
- package/components/media-card/media-card.api.d.ts +2 -1
- package/components/media-card-group/index.d.ts +25 -6
- package/components/media-card-group/index.js +2 -1
- package/components/media-card-group/media-card-group.api.d.ts +19 -0
- package/components/media-card-group/media-card-group.api.js +11 -0
- package/components/media-card-group/media-card-group.d.ts +16 -12
- package/components/media-card-group/media-card-group.js +51 -0
- package/components/{panel/style/index.d.ts → media-card-group/media-card-group.style.d.ts} +1 -1
- package/components/media-card-group/{style/index.js → media-card-group.style.js} +1 -1
- package/components/number-format/index.d.ts +105 -23
- package/components/number-format/index.js +2 -2
- package/components/number-format/number-format.api.d.ts +41 -0
- package/components/number-format/number-format.api.js +34 -0
- package/components/number-format/number-format.d.ts +69 -18
- package/components/number-format/number-format.js +38 -8
- package/components/panel/index.d.ts +25 -6
- package/components/panel/index.js +2 -1
- package/components/panel/panel.api.d.ts +18 -0
- package/components/panel/panel.api.js +11 -0
- package/components/panel/panel.d.ts +16 -8
- package/components/panel/panel.js +36 -0
- package/components/{media-card-group/style/index.d.ts → panel/panel.style.d.ts} +1 -1
- package/components/panel/{style/index.js → panel.style.js} +1 -1
- package/package.json +1 -1
- package/components/media-card-group/media-card-group.vue.d.ts +0 -10
- package/components/media-card-group/media-card-group.vue.js +0 -71
- package/components/number-format/number-format.vue.d.ts +0 -19
- package/components/number-format/number-format.vue.js +0 -79
- package/components/panel/panel.vue.d.ts +0 -10
- package/components/panel/panel.vue.js +0 -53
package/components/index.js
CHANGED
|
@@ -83,8 +83,10 @@ export { defaultInputNumberRangeProps } from './input-number-range/input-number-
|
|
|
83
83
|
export { defaultLongTextProps } from './long-text/long-text.js';
|
|
84
84
|
export { maskEmits } from './mask/mask.api.js';
|
|
85
85
|
export { mediaCardBaseProps, mediaCardProps, mediaCardSlots } from './media-card/media-card.api.js';
|
|
86
|
+
export { mediaCardGroupProps, mediaCardGroupSlots } from './media-card-group/media-card-group.api.js';
|
|
86
87
|
export { mediaViewerBaseEmits, mediaViewerBaseProps, mediaViewerEmits, mediaViewerProps } from './media-viewer/media-viewer.api.js';
|
|
87
|
-
export {
|
|
88
|
+
export { numberFormatProps, numberFormatSlots } from './number-format/number-format.api.js';
|
|
89
|
+
export { panelProps, panelSlots } from './panel/panel.api.js';
|
|
88
90
|
export { remoteSelectEmits, remoteSelectProps, remoteSelectSlots } from './remote-select/remote-select.api.js';
|
|
89
91
|
export { defaultBreakpoints, defaultRowProps, generateAlgorithms, rowColumns, rowContextSymbol, rowSizes } from './row/row.js';
|
|
90
92
|
export { snugMenuContextSymbol } from './snug-menu/snug-menu.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SlotsType, PropType, ExtractPropTypes, ExtractPublicPropTypes } from 'vue';
|
|
2
2
|
export declare const mediaCardBaseProps: {
|
|
3
3
|
src: {
|
|
4
4
|
type: StringConstructor;
|
|
@@ -21,6 +21,7 @@ export declare const mediaCardBaseProps: {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
export type MediaCardBaseProps = ExtractPropTypes<typeof mediaCardBaseProps>;
|
|
24
|
+
export type MediaCardBasePublicProps = ExtractPublicPropTypes<typeof mediaCardBaseProps>;
|
|
24
25
|
export declare const mediaCardProps: {
|
|
25
26
|
src: {
|
|
26
27
|
type: StringConstructor;
|
|
@@ -1,18 +1,37 @@
|
|
|
1
|
-
export * from './media-card-group';
|
|
1
|
+
export * from './media-card-group.api';
|
|
2
2
|
declare const _MediaCardGroup: {
|
|
3
|
-
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("
|
|
3
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
4
|
+
srcset: {
|
|
5
|
+
type: import("vue").PropType<string | (import("..").MediaCardBasePublicProps | string)[]>;
|
|
6
|
+
};
|
|
7
|
+
size: {
|
|
8
|
+
type: import("vue").PropType<import("..").MediaCardBasePublicProps["size"]>;
|
|
9
|
+
};
|
|
10
|
+
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, true, {}, import("vue").SlotsType<import("./media-card-group.api").MediaCardGroupSlots>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
4
11
|
P: {};
|
|
5
12
|
B: {};
|
|
6
13
|
D: {};
|
|
7
14
|
C: {};
|
|
8
15
|
M: {};
|
|
9
16
|
Defaults: {};
|
|
10
|
-
}, Readonly<import("
|
|
17
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
srcset: {
|
|
19
|
+
type: import("vue").PropType<string | (import("..").MediaCardBasePublicProps | string)[]>;
|
|
20
|
+
};
|
|
21
|
+
size: {
|
|
22
|
+
type: import("vue").PropType<import("..").MediaCardBasePublicProps["size"]>;
|
|
23
|
+
};
|
|
24
|
+
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {}>;
|
|
11
25
|
__isFragment?: never;
|
|
12
26
|
__isTeleport?: never;
|
|
13
27
|
__isSuspense?: never;
|
|
14
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("
|
|
15
|
-
|
|
16
|
-
|
|
28
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
srcset: {
|
|
30
|
+
type: import("vue").PropType<string | (import("..").MediaCardBasePublicProps | string)[]>;
|
|
31
|
+
};
|
|
32
|
+
size: {
|
|
33
|
+
type: import("vue").PropType<import("..").MediaCardBasePublicProps["size"]>;
|
|
34
|
+
};
|
|
35
|
+
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, import("vue").SlotsType<import("./media-card-group.api").MediaCardGroupSlots>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin;
|
|
17
36
|
export { _MediaCardGroup as MediaCardGroup };
|
|
18
37
|
export default _MediaCardGroup;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { withInstall } from '../utils.js';
|
|
2
|
-
import stdin_default$1 from './media-card-group.
|
|
2
|
+
import stdin_default$1 from './media-card-group.js';
|
|
3
|
+
export { mediaCardGroupProps, mediaCardGroupSlots } from './media-card-group.api.js';
|
|
3
4
|
|
|
4
5
|
const _MediaCardGroup = withInstall(stdin_default$1);
|
|
5
6
|
var stdin_default = _MediaCardGroup;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType, SlotsType } from 'vue';
|
|
2
|
+
import type { MediaCardBasePublicProps } from '../media-card/media-card.api';
|
|
3
|
+
export declare const mediaCardGroupProps: {
|
|
4
|
+
srcset: {
|
|
5
|
+
type: PropType<string | (MediaCardBasePublicProps | string)[]>;
|
|
6
|
+
};
|
|
7
|
+
size: {
|
|
8
|
+
type: PropType<MediaCardBasePublicProps["size"]>;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export type MediaCardGroupProps = ExtractPropTypes<typeof mediaCardGroupProps>;
|
|
12
|
+
export interface MediaCardGroupSlots {
|
|
13
|
+
default: {};
|
|
14
|
+
}
|
|
15
|
+
export declare const mediaCardGroupSlots: SlotsType<MediaCardGroupSlots>;
|
|
16
|
+
export interface MediaCardGroupEmits {
|
|
17
|
+
}
|
|
18
|
+
export interface MediaCardGroupExpose {
|
|
19
|
+
}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
srcset: {
|
|
3
|
+
type: import("vue").PropType<string | (import("..").MediaCardBasePublicProps | string)[]>;
|
|
4
|
+
};
|
|
5
|
+
size: {
|
|
6
|
+
type: import("vue").PropType<import("..").MediaCardBasePublicProps["size"]>;
|
|
7
|
+
};
|
|
8
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
srcset: {
|
|
10
|
+
type: import("vue").PropType<string | (import("..").MediaCardBasePublicProps | string)[]>;
|
|
11
|
+
};
|
|
12
|
+
size: {
|
|
13
|
+
type: import("vue").PropType<import("..").MediaCardBasePublicProps["size"]>;
|
|
14
|
+
};
|
|
15
|
+
}>> & Readonly<{}>, {}, import("vue").SlotsType<import("./media-card-group.api").MediaCardGroupSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
16
|
+
export default _default;
|
|
@@ -1 +1,52 @@
|
|
|
1
|
+
import { defineComponent, computed, createVNode, mergeProps } from 'vue';
|
|
2
|
+
import { mediaCardGroupSlots, mediaCardGroupProps } from './media-card-group.api.js';
|
|
3
|
+
import stdin_default$1 from './media-card-group.style.js';
|
|
4
|
+
import stdin_default$2 from '../media-card/media-card.js';
|
|
5
|
+
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
6
|
+
import { isString } from '../../utils/is.js';
|
|
1
7
|
|
|
8
|
+
var stdin_default = defineComponent({
|
|
9
|
+
name: "CoMediaCardGroup",
|
|
10
|
+
props: mediaCardGroupProps,
|
|
11
|
+
slots: mediaCardGroupSlots,
|
|
12
|
+
setup(props) {
|
|
13
|
+
const {
|
|
14
|
+
prefixCls
|
|
15
|
+
} = useComponentConfig("media-card-group", props);
|
|
16
|
+
const {
|
|
17
|
+
hashId
|
|
18
|
+
} = stdin_default$1(prefixCls);
|
|
19
|
+
const mergedSrcset = computed(() => {
|
|
20
|
+
if (isString(props.srcset)) {
|
|
21
|
+
return [{
|
|
22
|
+
src: props.srcset
|
|
23
|
+
}];
|
|
24
|
+
}
|
|
25
|
+
if (Array.isArray(props.srcset)) {
|
|
26
|
+
return props.srcset.map(item => {
|
|
27
|
+
if (isString(item)) {
|
|
28
|
+
return {
|
|
29
|
+
src: item
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return item;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return [];
|
|
36
|
+
});
|
|
37
|
+
const srcList = computed(() => mergedSrcset.value.map(item => item.src).filter(Boolean));
|
|
38
|
+
return () => {
|
|
39
|
+
return createVNode("div", {
|
|
40
|
+
"class": [hashId.value, prefixCls.value]
|
|
41
|
+
}, [mergedSrcset.value.map(item => {
|
|
42
|
+
return createVNode(stdin_default$2, mergeProps(item, {
|
|
43
|
+
"key": item.src,
|
|
44
|
+
"size": props.size,
|
|
45
|
+
"srcList": srcList.value
|
|
46
|
+
}), null);
|
|
47
|
+
})]);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export { stdin_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
|
@@ -1,45 +1,127 @@
|
|
|
1
|
-
export * from './number-format';
|
|
1
|
+
export * from './number-format.api';
|
|
2
2
|
declare const _NumberFormat: {
|
|
3
|
-
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("
|
|
4
|
-
value:
|
|
5
|
-
|
|
3
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
4
|
+
value: {
|
|
5
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
6
|
+
};
|
|
7
|
+
precision: {
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
default: number;
|
|
10
|
+
};
|
|
11
|
+
animate: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
};
|
|
14
|
+
duration: {
|
|
15
|
+
type: NumberConstructor;
|
|
16
|
+
default: number;
|
|
17
|
+
};
|
|
18
|
+
locales: {
|
|
19
|
+
type: import("vue").PropType<"zh-Hans" | "en-US" | (string & {})>;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
type: {
|
|
23
|
+
type: import("vue").PropType<"currency" | "decimal" | "percent">;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
currency: {
|
|
27
|
+
type: import("vue").PropType<"CNY" | "USD" | (string & {})>;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
beforeDisplay: {
|
|
31
|
+
type: import("vue").PropType<(value: string) => string>;
|
|
32
|
+
};
|
|
33
|
+
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
34
|
+
type: "decimal" | "percent" | "currency";
|
|
6
35
|
animate: boolean;
|
|
7
36
|
duration: number;
|
|
8
37
|
precision: number;
|
|
9
|
-
currency: "CNY" | "USD"
|
|
10
|
-
locales: "zh-Hans" | "en-US"
|
|
11
|
-
|
|
12
|
-
}, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
38
|
+
currency: (string & {}) | "CNY" | "USD";
|
|
39
|
+
locales: (string & {}) | "zh-Hans" | "en-US";
|
|
40
|
+
}, true, {}, import("vue").SlotsType<import("./number-format.api").NumberFormatSlots>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
13
41
|
P: {};
|
|
14
42
|
B: {};
|
|
15
43
|
D: {};
|
|
16
44
|
C: {};
|
|
17
45
|
M: {};
|
|
18
46
|
Defaults: {};
|
|
19
|
-
}, Readonly<import("
|
|
20
|
-
value:
|
|
21
|
-
|
|
47
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
48
|
+
value: {
|
|
49
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
50
|
+
};
|
|
51
|
+
precision: {
|
|
52
|
+
type: NumberConstructor;
|
|
53
|
+
default: number;
|
|
54
|
+
};
|
|
55
|
+
animate: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
};
|
|
58
|
+
duration: {
|
|
59
|
+
type: NumberConstructor;
|
|
60
|
+
default: number;
|
|
61
|
+
};
|
|
62
|
+
locales: {
|
|
63
|
+
type: import("vue").PropType<"zh-Hans" | "en-US" | (string & {})>;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
type: {
|
|
67
|
+
type: import("vue").PropType<"currency" | "decimal" | "percent">;
|
|
68
|
+
default: string;
|
|
69
|
+
};
|
|
70
|
+
currency: {
|
|
71
|
+
type: import("vue").PropType<"CNY" | "USD" | (string & {})>;
|
|
72
|
+
default: string;
|
|
73
|
+
};
|
|
74
|
+
beforeDisplay: {
|
|
75
|
+
type: import("vue").PropType<(value: string) => string>;
|
|
76
|
+
};
|
|
77
|
+
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
78
|
+
type: "decimal" | "percent" | "currency";
|
|
22
79
|
animate: boolean;
|
|
23
80
|
duration: number;
|
|
24
81
|
precision: number;
|
|
25
|
-
currency: "CNY" | "USD"
|
|
26
|
-
locales: "zh-Hans" | "en-US"
|
|
27
|
-
beforeDisplay: (value: string) => string;
|
|
82
|
+
currency: (string & {}) | "CNY" | "USD";
|
|
83
|
+
locales: (string & {}) | "zh-Hans" | "en-US";
|
|
28
84
|
}>;
|
|
29
85
|
__isFragment?: never;
|
|
30
86
|
__isTeleport?: never;
|
|
31
87
|
__isSuspense?: never;
|
|
32
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("
|
|
33
|
-
value:
|
|
34
|
-
|
|
88
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
89
|
+
value: {
|
|
90
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
91
|
+
};
|
|
92
|
+
precision: {
|
|
93
|
+
type: NumberConstructor;
|
|
94
|
+
default: number;
|
|
95
|
+
};
|
|
96
|
+
animate: {
|
|
97
|
+
type: BooleanConstructor;
|
|
98
|
+
};
|
|
99
|
+
duration: {
|
|
100
|
+
type: NumberConstructor;
|
|
101
|
+
default: number;
|
|
102
|
+
};
|
|
103
|
+
locales: {
|
|
104
|
+
type: import("vue").PropType<"zh-Hans" | "en-US" | (string & {})>;
|
|
105
|
+
default: string;
|
|
106
|
+
};
|
|
107
|
+
type: {
|
|
108
|
+
type: import("vue").PropType<"currency" | "decimal" | "percent">;
|
|
109
|
+
default: string;
|
|
110
|
+
};
|
|
111
|
+
currency: {
|
|
112
|
+
type: import("vue").PropType<"CNY" | "USD" | (string & {})>;
|
|
113
|
+
default: string;
|
|
114
|
+
};
|
|
115
|
+
beforeDisplay: {
|
|
116
|
+
type: import("vue").PropType<(value: string) => string>;
|
|
117
|
+
};
|
|
118
|
+
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
119
|
+
type: "decimal" | "percent" | "currency";
|
|
35
120
|
animate: boolean;
|
|
36
121
|
duration: number;
|
|
37
122
|
precision: number;
|
|
38
|
-
currency: "CNY" | "USD"
|
|
39
|
-
locales: "zh-Hans" | "en-US"
|
|
40
|
-
|
|
41
|
-
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
42
|
-
$slots: import("./number-format").NumberFormatSlots;
|
|
43
|
-
}) & import("vue").Plugin;
|
|
123
|
+
currency: (string & {}) | "CNY" | "USD";
|
|
124
|
+
locales: (string & {}) | "zh-Hans" | "en-US";
|
|
125
|
+
}, {}, string, import("vue").SlotsType<import("./number-format.api").NumberFormatSlots>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin;
|
|
44
126
|
export { _NumberFormat as NumberFormat };
|
|
45
127
|
export default _NumberFormat;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { withInstall } from '../utils.js';
|
|
2
|
-
import stdin_default$1 from './number-format.
|
|
3
|
-
export {
|
|
2
|
+
import stdin_default$1 from './number-format.js';
|
|
3
|
+
export { numberFormatProps, numberFormatSlots } from './number-format.api.js';
|
|
4
4
|
|
|
5
5
|
const _NumberFormat = withInstall(stdin_default$1);
|
|
6
6
|
var stdin_default = _NumberFormat;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ExtractPropTypes, PropType, SlotsType } from 'vue';
|
|
2
|
+
export declare const numberFormatProps: {
|
|
3
|
+
value: {
|
|
4
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
5
|
+
};
|
|
6
|
+
precision: {
|
|
7
|
+
type: NumberConstructor;
|
|
8
|
+
default: number;
|
|
9
|
+
};
|
|
10
|
+
animate: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
};
|
|
13
|
+
duration: {
|
|
14
|
+
type: NumberConstructor;
|
|
15
|
+
default: number;
|
|
16
|
+
};
|
|
17
|
+
locales: {
|
|
18
|
+
type: PropType<"zh-Hans" | "en-US" | (string & {})>;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
type: {
|
|
22
|
+
type: PropType<"currency" | "decimal" | "percent">;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
currency: {
|
|
26
|
+
type: PropType<"CNY" | "USD" | (string & {})>;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
beforeDisplay: {
|
|
30
|
+
type: PropType<(value: string) => string>;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export type NumberFormatProps = ExtractPropTypes<typeof numberFormatProps>;
|
|
34
|
+
export interface NumberFormatSlots {
|
|
35
|
+
default: {};
|
|
36
|
+
}
|
|
37
|
+
export declare const numberFormatSlots: SlotsType<NumberFormatSlots>;
|
|
38
|
+
export interface NumberFormatEmits {
|
|
39
|
+
}
|
|
40
|
+
export interface NumberFormatExpose {
|
|
41
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const numberFormatProps = {
|
|
2
|
+
value: {
|
|
3
|
+
type: [Number, String]
|
|
4
|
+
},
|
|
5
|
+
precision: {
|
|
6
|
+
type: Number,
|
|
7
|
+
default: 0
|
|
8
|
+
},
|
|
9
|
+
animate: {
|
|
10
|
+
type: Boolean
|
|
11
|
+
},
|
|
12
|
+
duration: {
|
|
13
|
+
type: Number,
|
|
14
|
+
default: 1500
|
|
15
|
+
},
|
|
16
|
+
locales: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "zh-Hans"
|
|
19
|
+
},
|
|
20
|
+
type: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: "decimal"
|
|
23
|
+
},
|
|
24
|
+
currency: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: "CNY"
|
|
27
|
+
},
|
|
28
|
+
beforeDisplay: {
|
|
29
|
+
type: Function
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const numberFormatSlots = {};
|
|
33
|
+
|
|
34
|
+
export { numberFormatProps, numberFormatSlots };
|
|
@@ -1,18 +1,69 @@
|
|
|
1
|
-
|
|
2
|
-
value
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
value: {
|
|
3
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
4
|
+
};
|
|
5
|
+
precision: {
|
|
6
|
+
type: NumberConstructor;
|
|
7
|
+
default: number;
|
|
8
|
+
};
|
|
9
|
+
animate: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
};
|
|
12
|
+
duration: {
|
|
13
|
+
type: NumberConstructor;
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
16
|
+
locales: {
|
|
17
|
+
type: import("vue").PropType<"zh-Hans" | "en-US" | (string & {})>;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
type: {
|
|
21
|
+
type: import("vue").PropType<"currency" | "decimal" | "percent">;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
currency: {
|
|
25
|
+
type: import("vue").PropType<"CNY" | "USD" | (string & {})>;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
beforeDisplay: {
|
|
29
|
+
type: import("vue").PropType<(value: string) => string>;
|
|
30
|
+
};
|
|
31
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
32
|
+
value: {
|
|
33
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
34
|
+
};
|
|
35
|
+
precision: {
|
|
36
|
+
type: NumberConstructor;
|
|
37
|
+
default: number;
|
|
38
|
+
};
|
|
39
|
+
animate: {
|
|
40
|
+
type: BooleanConstructor;
|
|
41
|
+
};
|
|
42
|
+
duration: {
|
|
43
|
+
type: NumberConstructor;
|
|
44
|
+
default: number;
|
|
45
|
+
};
|
|
46
|
+
locales: {
|
|
47
|
+
type: import("vue").PropType<"zh-Hans" | "en-US" | (string & {})>;
|
|
48
|
+
default: string;
|
|
49
|
+
};
|
|
50
|
+
type: {
|
|
51
|
+
type: import("vue").PropType<"currency" | "decimal" | "percent">;
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
currency: {
|
|
55
|
+
type: import("vue").PropType<"CNY" | "USD" | (string & {})>;
|
|
56
|
+
default: string;
|
|
57
|
+
};
|
|
58
|
+
beforeDisplay: {
|
|
59
|
+
type: import("vue").PropType<(value: string) => string>;
|
|
60
|
+
};
|
|
61
|
+
}>> & Readonly<{}>, {
|
|
62
|
+
type: "decimal" | "percent" | "currency";
|
|
63
|
+
animate: boolean;
|
|
64
|
+
duration: number;
|
|
65
|
+
precision: number;
|
|
66
|
+
currency: (string & {}) | "CNY" | "USD";
|
|
67
|
+
locales: (string & {}) | "zh-Hans" | "en-US";
|
|
68
|
+
}, import("vue").SlotsType<import("./number-format.api").NumberFormatSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
69
|
+
export default _default;
|
|
@@ -1,9 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
locales: "zh-Hans",
|
|
5
|
-
type: "decimal",
|
|
6
|
-
currency: "CNY"
|
|
7
|
-
};
|
|
1
|
+
import { defineComponent, ref, watch, nextTick, reactive, toRef, computed, createVNode } from 'vue';
|
|
2
|
+
import { numberFormatSlots, numberFormatProps } from './number-format.api.js';
|
|
3
|
+
import { useTransition, TransitionPresets } from '@vueuse/core';
|
|
8
4
|
|
|
9
|
-
|
|
5
|
+
var stdin_default = defineComponent({
|
|
6
|
+
name: "CoNumberFormat",
|
|
7
|
+
props: numberFormatProps,
|
|
8
|
+
slots: numberFormatSlots,
|
|
9
|
+
setup(props) {
|
|
10
|
+
const numValue = ref(0);
|
|
11
|
+
watch(() => props.value, () => {
|
|
12
|
+
nextTick(() => {
|
|
13
|
+
numValue.value = Number(props.value) || 0;
|
|
14
|
+
});
|
|
15
|
+
}, {
|
|
16
|
+
immediate: true
|
|
17
|
+
});
|
|
18
|
+
const animatedValue = useTransition(numValue, reactive({
|
|
19
|
+
duration: toRef(() => props.duration),
|
|
20
|
+
disabled: toRef(() => !props.animate),
|
|
21
|
+
transition: TransitionPresets.easeInOutQuint
|
|
22
|
+
}));
|
|
23
|
+
const displayValue = computed(() => {
|
|
24
|
+
let value = Intl.NumberFormat(props.locales, {
|
|
25
|
+
style: props.type,
|
|
26
|
+
currency: props.currency
|
|
27
|
+
}).format(animatedValue.value);
|
|
28
|
+
const [integer, decimal = ""] = value.split(".");
|
|
29
|
+
const _decimal = decimal.padEnd(props.precision, "0").slice(0, props.precision);
|
|
30
|
+
value = [integer, _decimal].join(_decimal ? "." : "");
|
|
31
|
+
return props.beforeDisplay ? props.beforeDisplay(value) : value;
|
|
32
|
+
});
|
|
33
|
+
return () => {
|
|
34
|
+
return createVNode("span", null, [displayValue.value]);
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export { stdin_default as default };
|
|
@@ -1,18 +1,37 @@
|
|
|
1
|
-
export * from './panel';
|
|
1
|
+
export * from './panel.api';
|
|
2
2
|
declare const _Panel: {
|
|
3
|
-
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("
|
|
3
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
4
|
+
maxHeight: {
|
|
5
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
6
|
+
};
|
|
7
|
+
header: {
|
|
8
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
9
|
+
};
|
|
10
|
+
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {}, true, {}, import("vue").SlotsType<import("./panel.api").PanelSlots>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
4
11
|
P: {};
|
|
5
12
|
B: {};
|
|
6
13
|
D: {};
|
|
7
14
|
C: {};
|
|
8
15
|
M: {};
|
|
9
16
|
Defaults: {};
|
|
10
|
-
}, Readonly<import("
|
|
17
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
maxHeight: {
|
|
19
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
20
|
+
};
|
|
21
|
+
header: {
|
|
22
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
23
|
+
};
|
|
24
|
+
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {}>;
|
|
11
25
|
__isFragment?: never;
|
|
12
26
|
__isTeleport?: never;
|
|
13
27
|
__isSuspense?: never;
|
|
14
|
-
} & import("vue").ComponentOptionsBase<Readonly<import("
|
|
15
|
-
|
|
16
|
-
|
|
28
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
29
|
+
maxHeight: {
|
|
30
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
31
|
+
};
|
|
32
|
+
header: {
|
|
33
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
34
|
+
};
|
|
35
|
+
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string, import("vue").SlotsType<import("./panel.api").PanelSlots>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin;
|
|
17
36
|
export { _Panel as Panel };
|
|
18
37
|
export default _Panel;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { withInstall } from '../utils.js';
|
|
2
|
-
import stdin_default$1 from './panel.
|
|
2
|
+
import stdin_default$1 from './panel.js';
|
|
3
|
+
export { panelProps, panelSlots } from './panel.api.js';
|
|
3
4
|
|
|
4
5
|
const _Panel = withInstall(stdin_default$1);
|
|
5
6
|
var stdin_default = _Panel;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SlotsType } from 'vue';
|
|
2
|
+
export interface PanelProps {
|
|
3
|
+
maxHeight?: string | number;
|
|
4
|
+
header?: string | number;
|
|
5
|
+
}
|
|
6
|
+
export declare const panelProps: {
|
|
7
|
+
maxHeight: {
|
|
8
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
9
|
+
};
|
|
10
|
+
header: {
|
|
11
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export interface PanelSlots {
|
|
15
|
+
default?: {};
|
|
16
|
+
header?: {};
|
|
17
|
+
}
|
|
18
|
+
export declare const panelSlots: SlotsType<PanelSlots>;
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
maxHeight
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
1
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
maxHeight: {
|
|
3
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
4
|
+
};
|
|
5
|
+
header: {
|
|
6
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
7
|
+
};
|
|
8
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
9
|
+
maxHeight: {
|
|
10
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
11
|
+
};
|
|
12
|
+
header: {
|
|
13
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
14
|
+
};
|
|
15
|
+
}>> & Readonly<{}>, {}, import("vue").SlotsType<import("./panel.api").PanelSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
16
|
+
export default _default;
|
|
@@ -1 +1,37 @@
|
|
|
1
|
+
import { defineComponent, createVNode } from 'vue';
|
|
2
|
+
import { ElScrollbar } from 'element-plus';
|
|
3
|
+
import { panelSlots, panelProps } from './panel.api.js';
|
|
4
|
+
import stdin_default$1 from './panel.style.js';
|
|
5
|
+
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
1
6
|
|
|
7
|
+
var stdin_default = defineComponent({
|
|
8
|
+
name: "CoPanel",
|
|
9
|
+
props: panelProps,
|
|
10
|
+
slots: panelSlots,
|
|
11
|
+
setup(props, {
|
|
12
|
+
slots
|
|
13
|
+
}) {
|
|
14
|
+
const {
|
|
15
|
+
prefixCls
|
|
16
|
+
} = useComponentConfig("panel", props);
|
|
17
|
+
const {
|
|
18
|
+
hashId
|
|
19
|
+
} = stdin_default$1(prefixCls);
|
|
20
|
+
return () => {
|
|
21
|
+
return createVNode("div", {
|
|
22
|
+
"class": [hashId.value, prefixCls.value]
|
|
23
|
+
}, [(slots.header || props.header) && createVNode("div", {
|
|
24
|
+
"class": `${prefixCls.value}-header`
|
|
25
|
+
}, [slots.header ? slots.header() : props.header]), createVNode(ElScrollbar, {
|
|
26
|
+
"always": true,
|
|
27
|
+
"maxHeight": props.maxHeight
|
|
28
|
+
}, {
|
|
29
|
+
default: () => [createVNode("div", {
|
|
30
|
+
"class": `${prefixCls.value}-body`
|
|
31
|
+
}, [slots.default?.()])]
|
|
32
|
+
})]);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export { stdin_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("
|
|
1
|
+
declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../theme/theme-context").ThemeManager) => {
|
|
2
2
|
hashId: import("vue").Ref<string, string>;
|
|
3
3
|
};
|
|
4
4
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type MediaCardGroupProps, type MediaCardGroupSlots } from './media-card-group';
|
|
2
|
-
type __VLS_Slots = MediaCardGroupSlots;
|
|
3
|
-
declare const __VLS_component: import("vue").DefineComponent<MediaCardGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<MediaCardGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
|
-
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
5
|
-
export default _default;
|
|
6
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
7
|
-
new (): {
|
|
8
|
-
$slots: S;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createBlock, mergeProps } from 'vue';
|
|
2
|
-
import stdin_default$1 from './style/index.js';
|
|
3
|
-
import stdin_default$2 from '../media-card/media-card.js';
|
|
4
|
-
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
5
|
-
import { isString } from '../../utils/is.js';
|
|
6
|
-
|
|
7
|
-
var stdin_default = /* @__PURE__ */defineComponent({
|
|
8
|
-
...{
|
|
9
|
-
name: "CoMediaCardGroup"
|
|
10
|
-
},
|
|
11
|
-
__name: "media-card-group",
|
|
12
|
-
props: {
|
|
13
|
-
srcset: {
|
|
14
|
-
type: [String, Array],
|
|
15
|
-
required: false
|
|
16
|
-
},
|
|
17
|
-
size: {
|
|
18
|
-
type: null,
|
|
19
|
-
required: false
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
setup(__props, {
|
|
23
|
-
expose: __expose
|
|
24
|
-
}) {
|
|
25
|
-
const props = __props;
|
|
26
|
-
const {
|
|
27
|
-
prefixCls
|
|
28
|
-
} = useComponentConfig("media-card-group", props);
|
|
29
|
-
const {
|
|
30
|
-
hashId
|
|
31
|
-
} = stdin_default$1(prefixCls);
|
|
32
|
-
const mergedSrcset = computed(() => {
|
|
33
|
-
if (isString(props.srcset)) {
|
|
34
|
-
return [{
|
|
35
|
-
src: props.srcset
|
|
36
|
-
}];
|
|
37
|
-
}
|
|
38
|
-
if (Array.isArray(props.srcset)) {
|
|
39
|
-
return props.srcset.map(item => {
|
|
40
|
-
if (isString(item)) {
|
|
41
|
-
return {
|
|
42
|
-
src: item
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
return item;
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
return [];
|
|
49
|
-
});
|
|
50
|
-
const srcList = computed(() => mergedSrcset.value.map(item => item.src).filter(Boolean));
|
|
51
|
-
__expose();
|
|
52
|
-
return (_ctx, _cache) => {
|
|
53
|
-
return openBlock(), createElementBlock("div", {
|
|
54
|
-
class: normalizeClass([unref(hashId), unref(prefixCls)])
|
|
55
|
-
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(mergedSrcset.value, item => {
|
|
56
|
-
return openBlock(), createBlock(unref(stdin_default$2), mergeProps({
|
|
57
|
-
key: item.src
|
|
58
|
-
}, {
|
|
59
|
-
ref_for: true
|
|
60
|
-
}, item, {
|
|
61
|
-
size: _ctx.size,
|
|
62
|
-
"src-list": srcList.value
|
|
63
|
-
}), null, 16, ["size", "src-list"]);
|
|
64
|
-
}), 128
|
|
65
|
-
/* KEYED_FRAGMENT */))], 2
|
|
66
|
-
/* CLASS */);
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
export { stdin_default as default };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type NumberFormatProps, type NumberFormatSlots } from './number-format';
|
|
2
|
-
type __VLS_Slots = NumberFormatSlots;
|
|
3
|
-
declare const __VLS_component: import("vue").DefineComponent<NumberFormatProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NumberFormatProps> & Readonly<{}>, {
|
|
4
|
-
value: number | string;
|
|
5
|
-
type: "currency" | "decimal" | "percent";
|
|
6
|
-
animate: boolean;
|
|
7
|
-
duration: number;
|
|
8
|
-
precision: number;
|
|
9
|
-
currency: "CNY" | "USD" | (string & {});
|
|
10
|
-
locales: "zh-Hans" | "en-US" | (string & {});
|
|
11
|
-
beforeDisplay: (value: string) => string;
|
|
12
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
-
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
14
|
-
export default _default;
|
|
15
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
-
new (): {
|
|
17
|
-
$slots: S;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { defineComponent, mergeDefaults, ref, watch, nextTick, reactive, toRef, computed, createElementBlock, openBlock, toDisplayString } from 'vue';
|
|
2
|
-
import { defaultNumberFormatProps } from './number-format.js';
|
|
3
|
-
import { useTransition, TransitionPresets } from '@vueuse/core';
|
|
4
|
-
|
|
5
|
-
var stdin_default = /* @__PURE__ */defineComponent({
|
|
6
|
-
...{
|
|
7
|
-
name: "CoNumberFormat"
|
|
8
|
-
},
|
|
9
|
-
__name: "number-format",
|
|
10
|
-
props: /* @__PURE__ */mergeDefaults({
|
|
11
|
-
value: {
|
|
12
|
-
type: [Number, String],
|
|
13
|
-
required: false
|
|
14
|
-
},
|
|
15
|
-
precision: {
|
|
16
|
-
type: Number,
|
|
17
|
-
required: false
|
|
18
|
-
},
|
|
19
|
-
animate: {
|
|
20
|
-
type: Boolean,
|
|
21
|
-
required: false
|
|
22
|
-
},
|
|
23
|
-
duration: {
|
|
24
|
-
type: Number,
|
|
25
|
-
required: false
|
|
26
|
-
},
|
|
27
|
-
locales: {
|
|
28
|
-
type: [String, Object],
|
|
29
|
-
required: false
|
|
30
|
-
},
|
|
31
|
-
type: {
|
|
32
|
-
type: String,
|
|
33
|
-
required: false
|
|
34
|
-
},
|
|
35
|
-
currency: {
|
|
36
|
-
type: [String, Object],
|
|
37
|
-
required: false
|
|
38
|
-
},
|
|
39
|
-
beforeDisplay: {
|
|
40
|
-
type: Function,
|
|
41
|
-
required: false
|
|
42
|
-
}
|
|
43
|
-
}, defaultNumberFormatProps),
|
|
44
|
-
setup(__props, {
|
|
45
|
-
expose: __expose
|
|
46
|
-
}) {
|
|
47
|
-
const props = __props;
|
|
48
|
-
const numValue = ref(0);
|
|
49
|
-
watch(() => props.value, () => {
|
|
50
|
-
nextTick(() => {
|
|
51
|
-
numValue.value = Number(props.value) || 0;
|
|
52
|
-
});
|
|
53
|
-
}, {
|
|
54
|
-
immediate: true
|
|
55
|
-
});
|
|
56
|
-
const animatedValue = useTransition(numValue, reactive({
|
|
57
|
-
duration: toRef(() => props.duration),
|
|
58
|
-
disabled: toRef(() => !props.animate),
|
|
59
|
-
transition: TransitionPresets.easeInOutQuint
|
|
60
|
-
}));
|
|
61
|
-
const displayValue = computed(() => {
|
|
62
|
-
let value = Intl.NumberFormat(props.locales, {
|
|
63
|
-
style: props.type,
|
|
64
|
-
currency: props.currency
|
|
65
|
-
}).format(animatedValue.value);
|
|
66
|
-
let [integer, decimal = ""] = value.split(".");
|
|
67
|
-
decimal = decimal.padEnd(props.precision, "0").slice(0, props.precision);
|
|
68
|
-
value = [integer, decimal].join(decimal ? "." : "");
|
|
69
|
-
return props.beforeDisplay ? props.beforeDisplay(value) : value;
|
|
70
|
-
});
|
|
71
|
-
__expose();
|
|
72
|
-
return (_ctx, _cache) => {
|
|
73
|
-
return openBlock(), createElementBlock("span", null, toDisplayString(displayValue.value), 1
|
|
74
|
-
/* TEXT */);
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
export { stdin_default as default };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type PanelProps, type PanelSlots } from './panel';
|
|
2
|
-
type __VLS_Slots = PanelSlots;
|
|
3
|
-
declare const __VLS_component: import("vue").DefineComponent<PanelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<PanelProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
4
|
-
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
5
|
-
export default _default;
|
|
6
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
7
|
-
new (): {
|
|
8
|
-
$slots: S;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { defineComponent, resolveComponent, createElementBlock, openBlock, normalizeClass, unref, createCommentVNode, createVNode, renderSlot, createTextVNode, toDisplayString, withCtx, createElementVNode } from 'vue';
|
|
2
|
-
import stdin_default$1 from './style/index.js';
|
|
3
|
-
import { useComponentConfig } from '../config-provider/config-provider.api.js';
|
|
4
|
-
|
|
5
|
-
var stdin_default = /* @__PURE__ */defineComponent({
|
|
6
|
-
...{
|
|
7
|
-
name: "CoPanel"
|
|
8
|
-
},
|
|
9
|
-
__name: "panel",
|
|
10
|
-
props: {
|
|
11
|
-
maxHeight: {
|
|
12
|
-
type: [String, Number],
|
|
13
|
-
required: false
|
|
14
|
-
},
|
|
15
|
-
header: {
|
|
16
|
-
type: [String, Number],
|
|
17
|
-
required: false
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
setup(__props) {
|
|
21
|
-
const props = __props;
|
|
22
|
-
const {
|
|
23
|
-
prefixCls
|
|
24
|
-
} = useComponentConfig("panel", props);
|
|
25
|
-
const {
|
|
26
|
-
hashId
|
|
27
|
-
} = stdin_default$1(prefixCls);
|
|
28
|
-
return (_ctx, _cache) => {
|
|
29
|
-
const _component_el_scrollbar = resolveComponent("el-scrollbar");
|
|
30
|
-
return openBlock(), createElementBlock("div", {
|
|
31
|
-
class: normalizeClass([unref(hashId), unref(prefixCls)])
|
|
32
|
-
}, [_ctx.$slots.header || _ctx.header ? (openBlock(), createElementBlock("div", {
|
|
33
|
-
key: 0,
|
|
34
|
-
class: normalizeClass(`${unref(prefixCls)}-header`)
|
|
35
|
-
}, [renderSlot(_ctx.$slots, "header", {}, () => [createTextVNode(toDisplayString(_ctx.header), 1
|
|
36
|
-
/* TEXT */)])], 2
|
|
37
|
-
/* CLASS */)) : createCommentVNode("v-if", true), createVNode(_component_el_scrollbar, {
|
|
38
|
-
always: "",
|
|
39
|
-
"max-height": _ctx.maxHeight
|
|
40
|
-
}, {
|
|
41
|
-
default: withCtx(() => [createElementVNode("div", {
|
|
42
|
-
class: normalizeClass(`${unref(prefixCls)}-body`)
|
|
43
|
-
}, [renderSlot(_ctx.$slots, "default")], 2
|
|
44
|
-
/* CLASS */)]),
|
|
45
|
-
_: 3
|
|
46
|
-
/* FORWARDED */
|
|
47
|
-
}, 8, ["max-height"])], 2
|
|
48
|
-
/* CLASS */);
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
export { stdin_default as default };
|