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

OSCHINA-MIRROR/open-hand-choerodon-ui

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
placement.md 1.1 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
xuhailin Отправлено 7 лет назад f2f936e
order title
5
zh-CN en-US
位置
Placement

zh-CN

可以设置通知从右上角、右下角、左下角、左上角弹出。

en-US

A notification box can pop up from topRight or bottomRight or bottomLeft or topLeft.

import { Button, Select, notification } from 'choerodon-ui';

const { Option } = Select;
const options = ['topLeft', 'topRight', 'bottomLeft', 'bottomRight'];
const openNotification = () => {
  notification.open({
    message: 'Notification Title',
    description: 'This is the content of the notification. This is the content of the notification. This is the content of the notification.',
  });
};

ReactDOM.render(
  <div>
    <Select
      defaultValue="topRight"
      style={{ width: 120, marginRight: 10 }}
      onChange={(val) => {
        notification.config({
          placement: val,
        });
      }}
    >
      {options.map(val => <Option key={val} value={val}>{val}</Option>)}
    </Select>
    <Button
      type="primary"
      onClick={openNotification}
    >
      Open the notification box
    </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