Kaynağa Gözat

uas手机版
应用红点

RaoMeng 5 yıl önce
ebeveyn
işleme
b2c2593dce

+ 6 - 5
uas-office-web/uas-mobile/src/components/common/func/FuncItem.jsx

@@ -29,11 +29,6 @@ class FuncItem extends Component {
 
   componentDidMount () {
     let { funcObj, supAble, supValue } = this.props
-    if (supValue) {
-      this.setState({
-        supState: supValue,
-      })
-    }
 
     if (supAble && !isObjEmpty(funcObj.countUrl)) {
       fetchGet(funcObj.countUrl).then(response => {
@@ -54,6 +49,12 @@ class FuncItem extends Component {
         supState: 0,
       })
     }
+
+    if (supValue) {
+      this.setState({
+        supState: supValue,
+      })
+    }
   }
 
   shouldComponentUpdate (nextProps, nextState, nextContext) {