2015-06-24 19:20:47 +08:00
|
|
|
# 位置
|
|
|
|
|
|
|
|
- order: 1
|
|
|
|
|
|
|
|
位置有四个方向。
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
````jsx
|
|
|
|
var Popconfirm = antd.Popconfirm;
|
2015-07-17 00:25:03 +08:00
|
|
|
var message = antd.message;
|
2015-07-20 11:03:38 +08:00
|
|
|
var text = '确定要删除这个任务吗?';
|
2015-06-24 19:20:47 +08:00
|
|
|
|
|
|
|
function confirm() {
|
2015-07-17 00:25:03 +08:00
|
|
|
message.info('点击了确定');
|
2015-06-24 19:20:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
React.render(<div>
|
|
|
|
<Popconfirm placement="left" title={text} onConfirm={confirm}>
|
2015-06-26 10:22:08 +08:00
|
|
|
<a href="javascript:;">左边</a>
|
2015-06-24 19:20:47 +08:00
|
|
|
</Popconfirm>
|
|
|
|
<Popconfirm placement="top" title={text} onConfirm={confirm}>
|
2015-06-26 10:22:08 +08:00
|
|
|
<a href="javascript:;">上边</a>
|
2015-06-24 19:20:47 +08:00
|
|
|
</Popconfirm>
|
|
|
|
<Popconfirm placement="bottom" title={text} onConfirm={confirm}>
|
2015-06-26 10:22:08 +08:00
|
|
|
<a href="javascript:;">下边</a>
|
2015-06-24 19:20:47 +08:00
|
|
|
</Popconfirm>
|
2015-08-17 17:55:39 +08:00
|
|
|
<Popconfirm placement="right" title={text} onConfirm={confirm}>
|
|
|
|
<a href="javascript:;">右边</a>
|
|
|
|
</Popconfirm>
|
2015-06-24 19:20:47 +08:00
|
|
|
</div>, document.getElementById('components-popconfirm-demo-placement'));
|
|
|
|
````
|
|
|
|
|
|
|
|
<style>
|
2015-06-26 10:22:08 +08:00
|
|
|
.code-box-demo .ant-popover-wrap > a {
|
2015-06-24 19:20:47 +08:00
|
|
|
margin-right: 1em;
|
|
|
|
}
|
|
|
|
</style>
|