How to use the antd.notification.open function in antd

To help you get started, we’ve selected a few antd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pedsm / liveCup / src / components / News.js View on Github external
notify() {
        const { news } = this.props
        console.log(this.props.news[0])
        notification.config({
            placement: "bottomLeft"
        })
        notification.open({
            message: 'New Article published',
            description: (
                
                    <p>{this.props.news[0].news_title}</p>
                    <a href="{this.props.news[0].news_link}">Open in new tab</a>
                
            ),
            icon: ,
            duration: 15
        }); 
    }
    componentDidUpdate() {
github didilinkin / react-admin-antd / src / modules / PROPERTY / components / Contract / PropertyContractAdded.jsx View on Github external
}
            console.log(JSON.stringify(json))
            let map = ''
            if (this.props.id &gt; 0) {
                json['id'] = this.props.id
                map = await apiPost(
                    '/contract/updatePmContract',
                    json
                )
            } else {
                map = await apiPost(
                    '/contract/insertPmContract',
                    json
                )
            }
            notification.open({
                message: map.data,
                icon: 
            })
            this.setState({
                visible: false,
                isFirst: true,
                none1: '',
                none2: 'none',
                rooms: [],
                current: 0
            })
            this.props.refreshTable()
        }
    }
    handleCancel = () =&gt; {
github padraic-X / augesco / src / components / appComponents / count.js View on Github external
contractStore.listen("Counter", "Decrement", {}, (async (err, event) =&gt; {
      this.setState({
        count: await contractStore.call("Counter", "getCount", [])
      })

      notification.open({
        key: "event-decrement",
        message: event.event,
        description: "Contract event fired : Count has decremented",
        duration: 5,
        placement: "bottomLeft",
        icon: 
      });
    }))
github didilinkin / react-admin-antd / src / modules / CLIENT / components / Complaint / NoticeAdd.jsx View on Github external
handleSave = async (editContent) =&gt; {
        let json = []
        this.setState({
            view: false,
            flag: 2
        })
        json['content'] = editContent
        json['title'] = this.title
        if (this.props.id &gt; 0) {
            let result = await apiPost(
                'complaint/updateNotice',
                json
            )
            this.props.close()
            notification.open({
                message: result.data,
                icon: 
            })
        } else {
            await apiPost(
                'complaint/insertNotice',
                json
            )
            this.props.close()
            notification.open({
                message: '添加成功',
                icon: 
            })
        }

        this.isFirst = true
github 0xbug / SQLiScanner / public / src / components / Tasks / SqlInjectScan / Result.js View on Github external
const vulNotification = (target) =&gt; {
    const poc = `sqlmap -u "${target.scan_options.url}" --data="${target.scan_options.data}" --dbms=${target.scan_data[0].value[0].dbms} --method=${target.scan_options.method} --cookie="${target.scan_options.cookie}"`;

    const key = target.task_id;
    const btnClick = () =&gt; {
        copy(poc);
        notification.close(key);
    };
    const btn = (
        <button size="small" type="primary">
            sqlmap 命令
        </button>
    );
    notification.open({
        message: '发现注入',
        description: `链接: ${target.target_url},
                        注入点:${target.scan_data[0].value[0].parameter}`,
        btn,
        key,
        duration: 2,
    });
};
github didilinkin / react-admin-antd / src / views / Financial / pages / Details / RentFinishAndLate.jsx View on Github external
invoiceRent = async () =&gt; {
        await apiPost(
            '/collectRent/updateCollectRentVoByInvoiceRent',
            {id: this.props.match.params.id,
                invoiceRentStatus: 1}
        )
        notification.open({
            message: '租金开票成功',
            icon: 
        })
        location.href = '/financial/RentFinishAndLate/' + this.props.match.params.id
    }
    invoiceLate = async () =&gt; {
github didilinkin / react-admin-antd / src / views / Charge / pages / components / PaidConfirm.jsx View on Github external
handleSubmit = async () =&gt; {
        let json = this.props.form.getFieldsValue()
        await apiPost(
            '/collectRent/updateCollectRentVoByCommit',
            json
        )
        notification.open({
            message: '收租成功',
            icon: 
        })
        this.props.refreshTable()
        this.setState({visible: false,
            isFirst: true })
    }
    handleCancel = (e) =&gt; {
github insiight / ant-design-theme-builder / src / components / notification / duration / index.js View on Github external
const openNotification = () => {
  const args = {
    message: 'Notification Title',
    description: 'I will never close automatically. I will be close automatically. I will never close automatically.',
    duration: 0,
  };
  notification.open(args);
};
github didilinkin / react-admin-antd / src / modules / FINANCE / components / CashDeposit / CashdepsitReceipt.jsx View on Github external
} else {
                    adopt = true
                }
            },
        )
        if (adopt) {
            let json = this.props.form.getFieldsValue()
            json['id'] = this.state.data.id
            json['cashDepositId'] = this.state.data.cashDepositId
            json['currentBalance'] = json.operateMoney
            json['auditStatus'] = 1
            await apiPost(
                '/cashDeposit/updateCashDepositByReceipt',
                json
            )
            notification.open({
                message: '收款成功',
                icon: 
            })
            this.props.close()
            this.props.refreshTable()
            this.setState({
                visible: false,
                isFirst: true
            })
        }
    }
    handleCancel = (e) =&gt; {
github didilinkin / react-admin-antd / src / modules / PROPERTY / containers / PropertyFee / PropertyFeeFail.jsx View on Github external
handleDelete = async (id) =&gt; {
        await apiPost(
            '/propertyFee/updatePropertyFee',
            {id: id,
                delFlag: 1,
                order: this.state.order,
                sort: this.state.sort}
        )
        notification.open({
            message: '删除成功',
            icon: 
        })
        this.refresh()
    }
    async initialRemarks () {