1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- import React from "react";
- import { Spin, Button, Tabs, Table, message, Modal } from "antd";
- const ShowModal = React.createClass({
- getInitialState() {
- return {
- newVisible: false
- };
- },
- componentWillReceiveProps(nextProps) {
- this.setState({
- newVisible: nextProps.ShowModal
- });
- },
- handleOk() {
- this.setState({
- newVisible: false
- });
- // window.setTimeout( () => {
- // this.setState({
- // newVisible: true
- // });
- // },)
- },
- render() {
- return (
- <Modal
- style={{ position: "relative" }}
- title="消息提醒"
- visible={this.state.newVisible}
- closable={false}
- footer={null}
- destroyOnClose={true}
- >
- <div style={{ textAlign: "center" }}>
- 您有新消息尚未查看,请及时查看信息!
- <a href={"/admin/index.html#normal"}
- onClick={() => {
- !!this.props.seeInfo && this.props.seeInfo()
- }}
- >点我查看信息</a>
- </div>
- <Button
- onClick={this.handleOk}
- type={"primary"}
- style={{
- position: "relative",
- left: "50%",
- transform: "translateX(-50%)",
- bottom: -10
- }}
- >
- 关闭
- </Button>
- </Modal>
- );
- }
- });
- export default ShowModal;
|