RaoMeng 5 лет назад
Родитель
Сommit
38d46f4e2a

+ 2 - 2
uas-office-web/uas-mobile/src/pages/private/approval/components/LoadingMore.jsx

@@ -4,7 +4,7 @@
  */
 
 import React, { Component } from 'react'
-import { Icon } from 'antd'
+import { LoadingOutlined } from '@ant-design/icons'
 
 export default class LoadingMore extends Component {
 
@@ -20,7 +20,7 @@ export default class LoadingMore extends Component {
   render () {
     return (
       <div className='common-load-more'>
-        <Icon type="loading" theme="outlined"/>
+        <LoadingOutlined/>
         <span style={{ marginLeft: '10px' }}>正在加载</span>
       </div>
     )

+ 0 - 35
uas-office-web/uas-mobile/src/pages/private/approval/components/PageLoading.jsx

@@ -1,35 +0,0 @@
-/**
- * Created by RaoMeng on 2020/3/4
- * Desc: 页面加载组件
- */
-
-import React, { Component } from 'react'
-import { ActivityIndicator } from 'antd-mobile'
-
-export default class PageLoading extends Component {
-
-  constructor () {
-    super()
-
-    this.state = {}
-  }
-
-  componentDidMount () {
-  }
-
-  render () {
-    return (
-      <div style={{
-        width: '100%',
-        height: '100%',
-        display: 'flex',
-        flexDirection: 'column',
-        alignItems: 'center',
-        justifyContent: 'center',
-      }}>
-        <ActivityIndicator size="large"/>
-        <span style={{ marginTop: 8 }}>页面加载中</span>
-      </div>
-    )
-  }
-}

+ 0 - 72
uas-office-web/uas-mobile/src/pages/private/approval/components/RefreshLayout.jsx

@@ -1,72 +0,0 @@
-/**
- * Created by RaoMeng on 2018/12/1
- * Desc: antd刷新组件二次封装
- */
-
-import React, {Component} from 'react'
-import {PullToRefresh} from "antd-mobile";
-import PropTypes from 'prop-types'
-
-export default class RefreshLayout extends Component {
-
-    static propTypes = {
-        direction: PropTypes.string,//刷新方向:up或down,默认up
-        refreshing: PropTypes.bool.isRequired,//是否正在刷新
-        style: PropTypes.object,//样式,有默认样式一般可以不传
-        onRefresh: PropTypes.func.isRequired,//加载方法,必传
-        damping: PropTypes.number,//加载距离,不用传
-        distanceToRefresh: PropTypes.number,//可拉动距离,不用传
-        height:PropTypes.number,//组件高度,一般不用传
-    }
-
-    static defaultProps = {
-        direction: 'up',
-        damping: 120,
-        distanceToRefresh: 30
-    }
-
-    constructor() {
-        super()
-
-        this.state = {
-            height: document.documentElement.clientHeight
-        }
-    }
-
-    componentDidMount() {
-        setTimeout(() => {
-            if (this.props.height) {
-                this.setState({
-                    height: this.props.height,
-                })
-            } else {
-                // const hei = this.state.height - ReactDOM.findDOMNode(this.ptr).offsetTop;
-                // this.setState({
-                //     height: hei
-                // })
-            }
-        }, 0);
-    }
-
-    render() {
-        const {height} = this.state
-        const {direction, refreshing,style, onRefresh, damping, distanceToRefresh} = this.props
-
-        return (
-            <PullToRefresh
-                direction={direction}
-                refreshing={refreshing}
-                ref={el => this.ptr = el}
-                style={{
-                    height: height,
-                    overflow: 'auto',
-                    ...style
-                }}
-                damping={damping}
-                distanceToRefresh={distanceToRefresh}
-                onRefresh={onRefresh}>
-                {this.props.children}
-            </PullToRefresh>
-        )
-    }
-}