Browse Source

uas手机版
应用红点

RaoMeng 5 years ago
parent
commit
7c58300bf0

+ 2 - 2
uas-office-web/uas-mobile/src/components/common/func/FuncGroup.jsx

@@ -42,7 +42,7 @@ export default class FuncGroup extends Component {
       onFuncDataChange,
       lineCount,//菜单item标题行数
       card,//是否以卡片形式显示
-      sup,//是否展示角标
+      supAble,//是否展示角标
     } = this.props
 
     let funcItems = []
@@ -63,7 +63,7 @@ export default class FuncGroup extends Component {
             onOperationClick={onOperationClick}
             onFuncDataChange={onFuncDataChange}
             lineCount={lineCount}
-            sup={sup && funcItem.sup}
+            supAble={supAble}
             key={'funcChild' + funcIndex}/>,
         )
       })

+ 8 - 7
uas-office-web/uas-mobile/src/components/common/func/FuncItem.jsx

@@ -28,15 +28,15 @@ class FuncItem extends Component {
   }
 
   componentDidMount () {
-    let { funcObj, sup } = this.props
-    if (sup) {
+    let { funcObj, supAble, supValue } = this.props
+    if (supValue) {
       this.setState({
-        supState: sup,
+        supState: supValue,
       })
     }
 
-    if (!isObjEmpty(funcObj.countUrl)) {
-      fetchGet( funcObj.countUrl).then(response => {
+    if (supAble && !isObjEmpty(funcObj.countUrl)) {
+      fetchGet(funcObj.countUrl).then(response => {
         funcObj.sup = response.data
         this.props.onFuncDataChange && this.props.onFuncDataChange(funcObj)
         this.setState({
@@ -69,7 +69,8 @@ class FuncItem extends Component {
     let {
       funcObj,
       operation,//右上角操作图标
-      sup,//角标
+      supAble,//是否展示角标
+      supValue,//角标值
       lineCount,//标题行数
     } = this.props
     const { supState } = this.state
@@ -107,7 +108,7 @@ class FuncItem extends Component {
             style={funcTextStyle}
           >{funcObj.name}</span>
           {
-            (supState) ?
+            ((supAble || supValue) && supState) ?
               <sup
                 className='func-func-sup'
                 style={{

+ 1 - 1
uas-office-web/uas-mobile/src/components/common/mainHeader/MainHeader.jsx

@@ -60,7 +60,7 @@ class MainHeader extends Component {
       homeHeaderList.push(
         <FuncItem
           funcObj={item}
-          sup={item.sup}
+          supValue={item.sup}
           onFuncClick={this.onFuncClick.bind(this)}
           onFuncDataChange={this.onFuncDataChange.bind(this)}
           key={index}/>,

+ 1 - 1
uas-office-web/uas-mobile/src/pages/private/homePage/DocRoot.jsx

@@ -45,7 +45,7 @@ class DocRoot extends Component {
             // line
             card
             key={'docFuncGroup' + index}
-            // sup
+            supAble
             onFuncDataChange={this.onFuncDataChange.bind(this)}
           />,
         )

+ 1 - 1
uas-office-web/uas-mobile/src/pages/private/homePage/MainRoot.jsx

@@ -60,7 +60,7 @@ class MainRoot extends Component {
         <FuncGroup
           funcGroup={oftenFunc}
           rightIcon={'uas-edit'}
-          // sup
+          supAble
           onRightClick={this.onOftenManage}
         />
         {/* 首页看板展示 */}