1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/open-hand-choerodon-ui

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
placement.md 1.3 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
HughHzWu Отправлено 3 лет назад 8ceb2be
order title
4
zh-CN en-US
消息位置
Message Placement

zh-CN

定义消息位置

en-US

Message Placement

import { message, Button } from 'choerodon-ui';

const handleClick = (placement) => {
  message.destroy();
  message.config({
    top: 100,
    bottom: 100,
    duration: 5,
  });
  message.success(placement, undefined, undefined, placement);
};

ReactDOM.render(
  <div>
    <Button onClick={() => { handleClick('topLeft'); }}>topLeft</Button>
    <Button onClick={() => { handleClick('top'); }}>top</Button>
    <Button onClick={() => { handleClick('topRight'); }}>topRight</Button>
    <Button onClick={() => { handleClick('leftTop'); }}>leftTop</Button>
    <Button onClick={() => { handleClick('left'); }}>left</Button>
    <Button onClick={() => { handleClick('leftBottom'); }}>leftBottom</Button>
    <Button onClick={() => { handleClick('rightTop'); }}>rightTop</Button>
    <Button onClick={() => { handleClick('right'); }}>right</Button>
    <Button onClick={() => { handleClick('rightBottom'); }}>rightBottom</Button>
    <Button onClick={() => { handleClick('bottomLeft'); }}>bottomLeft</Button>
    <Button onClick={() => { handleClick('bottom'); }}>bottom</Button>
    <Button onClick={() => { handleClick('bottomRight'); }}>bottomRight</Button>
  </div>,
  mountNode);

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/open-hand-choerodon-ui.git
git@gitlife.ru:oschina-mirror/open-hand-choerodon-ui.git
oschina-mirror
open-hand-choerodon-ui
open-hand-choerodon-ui
master