mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-13 15:21:33 +00:00
19 lines
489 B
JavaScript
19 lines
489 B
JavaScript
import ConfigProvider from '../config-provider';
|
|
import Rating from './rating';
|
|
|
|
export default ConfigProvider.config(Rating, {
|
|
transform: /* istanbul ignore next */ (props, deprecated) => {
|
|
if ('type' in props) {
|
|
deprecated('type', 'showGrade', 'Rating');
|
|
|
|
const { type, ...others } = props;
|
|
props = { showGrade: type === 'grade', ...others };
|
|
}
|
|
|
|
const { disabled, readOnly } = props;
|
|
props.disabled = disabled || readOnly;
|
|
|
|
return props;
|
|
},
|
|
});
|