full screen loading
npm install simple-fs-loading
import sfsLoading from 'simple-fs-loading';
// show
sfsLoading.show(options);
// hide
sfsLoading.hide(options);
// getState :boolean
sfsLoading.isShow();
sfsLoading.setDefault(options);
options = {
imgSrc:string,
message:string,
zIndex:number,
transitionTime:number,
style:{
imgWidth:string,
imgHeight:string,
fontSize:string,
fontFamily:string,
color:string,
backgroundColor:string,
},
}
引数は必須ではありません。
使いたい画像のurl
表示させたいメッセージ
表示する領域のz-indexの値
表示切り替え時のアニメーション時間。msで入力。
画像の横幅
画像の縦幅
メッセージのfont-size
メッセージのfont-family
メッセージの色
表示領域の色
dom操作を行うので、サーバーサイドで使おうとするとバグります。
nuxt.jsなどのSSRモードのアプリケーションで使うときは
if(process.browser){
const sfsLoading = require('simple-fs-loading');
}
のように回避してください。
Released under the MIT License