Some needed js shortcuts and functionalities for any kind of applications. It is good to have this in your backpack.
Use the package manager npm to install xaxpack.
npm install xaxpack --save
npm update xaxpack
// git commit and push
npm run p
//or
npm version patch
npm publish
Can be use like this:
window.axios = require('axios')
window.toastr = require('toastr')
import { aMixins, printMsg } from 'xaxpack'
Vue.mixin(aMixins)
printMsg()
import { loadingToastr } from 'xaxpack'
in Vue, you may want to write this.
mounted () {
this.xaxPackInit()
...
}
xaxPackInit: //initial
set: //reactive set
selfromdataf: //vue selectbox
objSearch: //
objFilter: //
// setState: //vuex mutation
con: //console.log
isEmpty: //
// trans: //
urlSegment: //
delayed: //delay it
daterangepickerGlobal: //
datepickerGlobal: //
// waitForSocket: //
post: //api post
scrollToBot: //scroll
tc: //try catch
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.