dejs
v0.7.5
Published
A collection of utility libraries used by other DataEye JS projects.
Downloads
51
Readme
#dejs
A collection of utility libraries used by other DataEye JS projects.
Component List
- ajax (based on superagent)
- chart (build charts more easier, based on highcharts)
- error (an error tip for react)
- footer
- loading (a react component for display loading effect)
- mock (baseon on superagent-mocker)
- no-data (no data tips for query result)
- redux-ajax-middleware
- reduxis (help us build redux based component easily)
- timer
- utils
Usage
import reduxis from 'dejs/lib/reduxis'
import Loading from 'dejs/lib/loading'
import ajax, {get, post} from 'dejs/lib/ajax'
// jQuery like
ajax({
url: '/',
data: {},
success: (json, res) => {
// success
},
error: (err, res) => {
// error
},
complete: () => {
// complete
}
})
// Promise
ajax({
url: '/',
method: 'post'
}).then(function(res) {
console.log(res.body)
})