# react-relogin

> react re-login dialog component

Latest version **1.0.5** (published 2020-06-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-relogin
pnpm add react-relogin
yarn add react-relogin
bun add react-relogin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2020-06-05 |
| First published | 2020-05-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 7.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | zengzijian |
| Maintainers | zengzijian |

## Links

- npm: https://www.npmjs.com/package/react-relogin
- Repository: http://zengzijian@192.168.0.72:9091/workbench/workbench-npm
- npm.io page: https://npm.io/package/react-relogin

## Dependencies (5)

- [antd](https://npm.io/package/antd.md) ^3.22.0
- [less](https://npm.io/package/less.md) ^3.11.1
- [react](https://npm.io/package/react.md) 16.7.0
- [react-dom](https://npm.io/package/react-dom.md) 16.7.0
- [prop-types](https://npm.io/package/prop-types.md) 15.6.0

## Recent versions

- 1.0.5 (latest) — 2020-06-05
- 1.0.4 — 2020-05-28
- 1.0.3 — 2020-05-27
- 1.0.2 — 2020-05-27
- 1.0.0 — 2020-05-27
- 1.0.1 — 2020-05-26

## README

<!--
 * @Author: zengzijian
 * @Date: 2020-05-26 10:26:42
 * @LastEditTime: 2020-05-27 15:48:50
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \react-relogin\README.md
--> 
## Install

```
npm i react-relogin
```

## Usage

```
import React from 'react'
import Relogin from 'react-relogin'

class Demo extends React.Component {
    constructor() {
        super();
        this.state = {
            visible: false,
            account: 'admin'，
            leftTime： 9999999
        }
    }
    
    login = (data) => {
        if (common.isEmpty(data.password)) {
            message.warn("请输入密码");
            return
        }
        const data = { "username": data.account, "password": data.password }
        // todo login
    }

    render() {
        const reloginProps = {
            visible: this.state.visible,
            account: this.state.account,
            leftTime: this.state.leftTime,
            onOk: (data) => { this.login(data) },
            onCancel: () => {
                this.setState({ visible: false }, () => this.props.history.push("/login") )
            },
            leftTimeCallback: () => {
                this.setState({ visible: true })
            }
        }
        return <Relogin {...reloginProps} />
    }
}

export default Demo;

```

---
_Source: https://npm.io/package/react-relogin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
