2018-03-07 13:36:15 +00:00
|
|
|
|
<script>
|
2019-01-12 03:33:27 +00:00
|
|
|
|
import Async from './async';
|
|
|
|
|
import Basic from './basic';
|
|
|
|
|
import ConfirmPromise from './confirm-promise';
|
|
|
|
|
import Confirm from './confirm';
|
|
|
|
|
import Footer from './footer';
|
|
|
|
|
import Info from './info';
|
|
|
|
|
import Locale from './locale';
|
|
|
|
|
import Manual from './manual';
|
|
|
|
|
import Position from './position';
|
|
|
|
|
import ButtonProps from './button-props';
|
2019-04-17 02:21:28 +00:00
|
|
|
|
import ConfirmRouter from './confirm-router';
|
2018-03-07 13:36:15 +00:00
|
|
|
|
|
2019-01-12 03:33:27 +00:00
|
|
|
|
import CN from '../index.zh-CN.md';
|
|
|
|
|
import US from '../index.en-US.md';
|
2018-03-07 13:36:15 +00:00
|
|
|
|
const md = {
|
|
|
|
|
cn: `# Modal 对话框
|
|
|
|
|
模态对话框。
|
|
|
|
|
## 何时使用
|
|
|
|
|
需要用户处理事务,又不希望跳转页面以致打断工作流程时,可以使用 \`Modal\` 在当前页面正中打开一个浮层,承载相应的操作。
|
2019-04-17 02:21:28 +00:00
|
|
|
|
另外当需要一个简洁的确认框询问用户时,可以使用 \`Modal.confirm()\` 等语法糖方法。
|
2018-03-07 13:36:15 +00:00
|
|
|
|
## 代码演示`,
|
|
|
|
|
us: `# Modal
|
|
|
|
|
Modal dialogs.
|
|
|
|
|
## When To Use
|
|
|
|
|
When requiring users to interact with the application, but without jumping to a new page and interrupting
|
|
|
|
|
the user's workflow, you can use \`Modal\` to create a new floating layer over the current page to get user
|
|
|
|
|
feedback or display information.
|
|
|
|
|
Additionally, if you need show a simple confirmation dialog, you can use \`antd.Modal.confirm()\`,
|
|
|
|
|
and so on.
|
2018-09-05 13:28:54 +00:00
|
|
|
|
## Examples
|
2018-03-07 13:36:15 +00:00
|
|
|
|
`,
|
2019-01-12 03:33:27 +00:00
|
|
|
|
};
|
2018-03-07 13:36:15 +00:00
|
|
|
|
export default {
|
|
|
|
|
type: 'Feedback',
|
|
|
|
|
category: 'Components',
|
|
|
|
|
subtitle: '对话框',
|
|
|
|
|
title: 'Modal',
|
|
|
|
|
render () {
|
|
|
|
|
return (
|
2018-03-09 04:20:21 +00:00
|
|
|
|
<div id='components-modal-demo'>
|
2018-03-07 13:36:15 +00:00
|
|
|
|
<md cn={md.cn} us={md.us}/>
|
|
|
|
|
<Async/>
|
|
|
|
|
<Basic/>
|
|
|
|
|
<ConfirmPromise/>
|
|
|
|
|
<Confirm/>
|
|
|
|
|
<Footer/>
|
|
|
|
|
<Info/>
|
|
|
|
|
<Locale/>
|
|
|
|
|
<Manual/>
|
|
|
|
|
<Position/>
|
2018-09-05 13:28:54 +00:00
|
|
|
|
<ButtonProps />
|
2019-04-17 02:21:28 +00:00
|
|
|
|
<ConfirmRouter />
|
2018-03-07 13:36:15 +00:00
|
|
|
|
<api>
|
|
|
|
|
<CN slot='cn' />
|
|
|
|
|
<US/>
|
|
|
|
|
</api>
|
|
|
|
|
</div>
|
2019-01-12 03:33:27 +00:00
|
|
|
|
);
|
2018-03-07 13:36:15 +00:00
|
|
|
|
},
|
2019-01-12 03:33:27 +00:00
|
|
|
|
};
|
2018-03-07 13:36:15 +00:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
2018-03-09 04:20:21 +00:00
|
|
|
|
#components-modal-demo .ant-btn {
|
2018-03-07 13:36:15 +00:00
|
|
|
|
margin-right: 8px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|