【发布时间】:2017-09-14 10:31:33
【问题描述】:
我正在尝试打印一个对象,但出现上述错误。 这是我的代码:
<Modal
mask={false}
title={that.state.selectedDbName}
visible={statsmodalVisible}
onCancel={that.handleOtherCancel}
style={{ minWidth: '75%', textAlign: 'center',}}
footer = {
[<Button type="primary" key="modalDismissButton"
onClick={this.handleOtherCancel}> Dismiss</Button>]
}
>
{data}
</Modal>
这里 data 是我试图在模式中显示的对象。
我也试过这个,data.toString() 但是输出是[object Object]
谁能指出我正确的方向。
【问题讨论】:
-
JSON.stringify(data)
-
@bennygenel 感谢这个作品.. 但不是 100% 正确。有其他选择吗?
-
如果您没有提供 100% 正确的信息来说明您正在尝试做什么以及究竟是什么问题,那么您将无法获得 100% 正确工作的答案。请查看How to Ask 了解更多信息
-
@bennygenel 问题与 ant 设计模式有关,因为内容超出了该模式。所以,与这个问题无关。对不起