|
1 |
| -import type { CSSProperties, ExtractPropTypes } from 'vue'; |
| 1 | +import type { CSSProperties } from 'vue'; |
2 | 2 | import { computed, defineComponent } from 'vue';
|
3 | 3 | import { presetPrimaryColors } from '@ant-design/colors';
|
4 | 4 | import { Circle as VCCircle } from '../vc-progress';
|
5 | 5 | import { getSuccessPercent, validProgress } from './utils';
|
| 6 | +import type { ProgressProps } from './props'; |
6 | 7 | import { progressProps } from './props';
|
7 |
| -import PropTypes from '../_util/vue-types'; |
8 | 8 |
|
9 |
| -const circleProps = { |
10 |
| - ...progressProps, |
11 |
| - prefixCls: PropTypes.string, |
12 |
| - // progressStatus: PropTypes.string, |
13 |
| -}; |
14 |
| -export type CircleProps = Partial<ExtractPropTypes<typeof circleProps>>; |
| 9 | +export type CircleProps = ProgressProps; |
15 | 10 |
|
16 | 11 | function getPercentage({ percent, success, successPercent }: CircleProps) {
|
17 | 12 | const realSuccessPercent = validProgress(getSuccessPercent({ success, successPercent }));
|
18 | 13 | return [realSuccessPercent, validProgress(validProgress(percent) - realSuccessPercent)];
|
19 | 14 | }
|
20 | 15 |
|
21 | 16 | export default defineComponent({
|
22 |
| - props: progressProps, |
23 | 17 | inheritAttrs: false,
|
| 18 | + props: progressProps(), |
24 | 19 | setup(props, { slots }) {
|
25 | 20 | const gapDeg = computed(() => {
|
26 | 21 | // Support gapDeg = 0 when type = 'dashboard'
|
|
0 commit comments