Commit afef2f2c by zhaochengxiang

封装notifaction

parent 9bf17f65
import React from "react";
import { message } from 'antd';
import { message, notification } from 'antd';
import { Redirect } from 'react-router-dom';
import { dispatchLatest, action } from '../model';
import { set_sess_state } from "../model/reducer";
......@@ -114,6 +114,15 @@ export const showMessage = function(action, content) {
}
}
export const showNotifaction = function(title, tip) {
notification.config({ prefixCls: "yy-notification" });
notification.open({
message: title||'提示',
description: <span dangerouslySetInnerHTML={{ __html: tip||''}} />,
duration: 0,
});
}
export function generateList(data,dataList){
if(data[0]===undefined)
return data
......
......@@ -3,6 +3,7 @@ import { Button, Table, Pagination, notification } from 'antd';
import { dispatchLatest } from '../../../model';
import ImportModal from './Component/ImportModal';
import { showNotifaction } from '../../../util';
import './index.less';
const Element = (props) => {
......@@ -84,12 +85,7 @@ const Element = (props) => {
}
if (tip && tip!== '') {
notification.config({ prefixCls: "yy-notification" });
notification.open({
message: '导入提示',
description: <span dangerouslySetInnerHTML={{ __html: tip||''}} />,
duration: 0,
});
showNotifaction('导入提示', tip);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment