export type PublicOrPrivateProps = {
publicOrPrivate: PublicOrPrivateT
};
export default ({ publicOrPrivate }: PublicOrPrivateProps) => <Box>{publicOrPrivate}</Box>;
我试图像这样导入:
import type PublicOrPrivate, { PublicOrPrivateProps } from 'components/newrfq/reviewRFQ/PublicOrPrivate';
但它失败并出现以下错误:
从值位置引用的类型
答案 0 :(得分:0)
您可以在名称列表中写下class StandardData {
Q_GADGET
public:
int EmpId;
QString Name;
};
// You still have to call qRegisterMetaType if used for queued signals or
// as property.
qRegisterMetaType<StandardData>();
,例如
type
此语法已在Flow 0.38.0中添加。