react-ie8-loading
v1.0.33
Published
react ie8 loading
Downloads
3
Readme
react-ie8-loading
- AnimateCpt 接受两个参数
- show 参数显示隐藏bool类型
- defaultStyle 默认样式bool类型 「默认不显示」
- 自定义样式类名 「c__loading--size」
import { AnimateCpt } from 'react-ie8-loading';
import 'react-ie8-loading/lib/css/loading.css';
render () {
return (
<div style={{position: 'relative', width: '200px', height:'200px'}} className="test--parents">
<AnimateCpt show={true} defaultStyle={true}/>
</div>
)
}
暂时不能使用
需要添加蒙版的父级元素添加class
js__loading
react
componentDidMount
阶段使用 init 初始化fullShow
全屏显示fullClose
全屏关闭fullTargetShow
传入Dom显示fullTargetClose
传入Dom关闭
import {Loading} from 'react-ie8-loading'
import 'react-ie8-loading/css/loading.css'
componentDidMount () {
Loading.init()
}
fullTargetShow () {
Loading.fullTargetShow(document.querySelector('.trigger__target'))
}
fullTargetClose () {
Loading.fullTargetClose(document.querySelector('.trigger__target'))
}
render () {
return (
<div className="trigger__target js__loading">
在显示的区域添加 js__loading 类名
</div>
<button onClick={() => this.fullTargetShow()}>fullShow</button>
<button onClick={() => this.fullTargetClose()}>fullClose</button>
)
}