1.0.3 • Published 3 years ago

react-schedule-ui v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

基于React的定时任务操作库

安装

npm install react-schedule-ui --save 

使用

import CronUI from 'react-schedule-ui/lib/cron';

class App extends React.Component {

    constructor() {
        super()
        this.state = {
            cronText: '* * * * * *',
        };

    }

    handleCronChange = (cronText) => {
        this.setState({
            cronText
        })
    }

    render() {
        return (
            <div>
                <CronUI
                    cronText="* * * * * *"
                    onCronChange = {this.handleCronChange}
                />
                <div style={{ width: '100%', display: 'flex', justifyContent: 'center', marginTop: '10px' }}>
                    <span>{this.state.cronText}</span>
                </div>
            </div>
        )
    }

}

cronText : cron表达式。 onCronChange: 界面发生改变后, 回调回来的cron表达式

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago