mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-02 15:27:18 +00:00
34 lines
994 B
JavaScript
34 lines
994 B
JavaScript
import ConfigProvider from '../config-provider';
|
|
import Progress from './view/progress';
|
|
|
|
export default ConfigProvider.config(Progress, {
|
|
transform: /* istanbul ignore next */ (props, deprecated) => {
|
|
if ('type' in props) {
|
|
deprecated('type', 'progressive', 'Progress');
|
|
|
|
const { type, ...others } = props;
|
|
props = { progressive: type === 'progressive', ...others };
|
|
}
|
|
|
|
if ('showInfo' in props) {
|
|
deprecated('showInfo', 'textRender', 'Progress');
|
|
|
|
const { showInfo, ...others } = props;
|
|
if (showInfo) {
|
|
props = others;
|
|
} else {
|
|
props = { textRender: () => false, ...others };
|
|
}
|
|
}
|
|
|
|
if ('suffix' in props) {
|
|
deprecated('suffix', 'textRender', 'Progress');
|
|
|
|
const { suffix, ...others } = props;
|
|
props = { textRender: () => suffix, ...others };
|
|
}
|
|
|
|
return props;
|
|
},
|
|
});
|