未验证 提交 1f0d074c 编写于 作者: T Tom Xu 提交者: GitHub

refactor(image): improve code (#27087)

上级 41d520ab
import * as React from 'react';
import RcImage, { ImageProps } from 'rc-image';
import { ConfigConsumerProps, ConfigContext } from '../config-provider';
import { ConfigContext } from '../config-provider';
const Image: React.FC<ImageProps> = ({ prefixCls: customizePrefixCls, ...otherProps }) => {
const { getPrefixCls }: ConfigConsumerProps = React.useContext(ConfigContext);
const { getPrefixCls } = React.useContext(ConfigContext);
const prefixCls = getPrefixCls('image', customizePrefixCls);
return <RcImage prefixCls={prefixCls} {...otherProps} />;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册