Closed xyy7260 closed 10 months ago
你这里不是已经自定义 labelWidget 吗
@lhbxs labelWidget 不能获取到 Object 和array。 所以labelwidget 不行
import { I18n } from '@/components/i18';
const styles = {
color: '#00000073',
lineHeight: '22px',
marginLeft: '5px',
fontWeight: '400',
fontSize: '14px',
};
const CustomLabel = (props: any) => {
const { schema } = props;
console.log(props) // 不能获取到 Object 和array 信息
return (
<div>
{I18n(schema.title)}
{schema.description ? <span style={styles}>{`(${I18n(schema.description)})`}</span> : null}
</div>
);
};
export default CustomLabel;
import { I18n } from '@/components/i18'; const styles = { color: '#00000073', lineHeight: '22px', marginLeft: '5px', fontWeight: '400', fontSize: '14px', }; const CustomLabel = (props: any) => { const { schema } = props; console.log(props) // 不能获取到 Object 和array 信息 return ( <div> {I18n(schema.title)} {schema.description ? <span style={styles}>{`(${I18n(schema.description)})`}</span> : null} </div> ); }; export default CustomLabel;
建议自己实现tableList吧,框架层面没有适配
目前想到 一个方法 自定义 Object 和 array widget, 如果没有好的方式我就关闭此问题了
因为我们产品要国际化所以 要把i18加入进去。