From 11478f086522a9ffe38e62f3db77273b38304ed7 Mon Sep 17 00:00:00 2001
From: afeiship <1290657123@qq.com>
Date: Wed, 31 Jul 2019 15:14:42 +0800
Subject: [PATCH] docs: new
---
README.md | 115 +++++++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 92 insertions(+), 23 deletions(-)
diff --git a/README.md b/README.md
index ee2883c..81114d0 100644
--- a/README.md
+++ b/README.md
@@ -16,35 +16,104 @@ npm install -S afeiship/react-status-manager
```
2. import js
```js
- import React from 'react';
+ import ReactStatusManager from '../src/main';
import ReactDOM from 'react-dom';
- import ReactStatusManager from 'react-status-manager';
-
- // your app:
- class App extends React.Component{
- render(){
+ import React from 'react';
+ import './assets/style.scss';
+
+ class App extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ value: 'init',
+ smvalue: 'N',
+ step: 0
+ };
+ }
+
+ click1 = (e) => {
+ this.setState({ value: 'init' });
+ console.log('click1');
+ };
+ click2 = (e) => {
+ this.setState({ value: 'active' });
+ console.log('click2');
+ };
+ click3 = (e) => {
+ this.setState({ value: 'running' });
+ console.log('click3');
+ };
+ click4 = (e) => {
+ this.setState({ value: 'finish' });
+ console.log('click4');
+ };
+
+ _click5 = (e) => {
+ this.setState({
+ smvalue: 'A'
+ });
+ };
+
+ _clickStep = (e) => {
+ let step = this.state.step;
+ this.setState({
+ step: step === 3 ? 0 : step + 1
+ });
+ };
+
+ render() {
return (
-