javascript - Antd Modal confirm确认框的content内容允许换行么?
伊谢尔伦
伊谢尔伦 2017-04-11 09:42:38
0
1
2322

Antd Modal

import { Modal, Button } from 'antd';
const confirm = Modal.confirm;

function showConfirm() {
  confirm({
    title: 'Want to delete these items?',
    content: 'some descriptions',
    onOk() {
      console.log('OK');
    },
    onCancel() {},
  });
}

ReactDOM.render(
  <Button onClick={showConfirm}>
    confirmation modal dialog
  </Button>
, mountNode);

content内容是否允许多行。
比如

content: "hello \n world";

或者

content: "hello<br/>world"

这样尝试发现不行?

应该怎么做呢?

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

répondre à tous(1)
左手右手慢动作

文档中已经说明了content的类型是element or string, 因此可以:

content: (<p>Hello <br /> world.</p>)

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!