Przeglądaj źródła

fix: 修改诊断样式

sun-chaochao 3 lat temu
rodzic
commit
9477b7971f

+ 34 - 31
src/pages/device/Instance/Detail/Diagnose/index.less

@@ -1,37 +1,40 @@
-.header {
-  width: 100%;
-}
-.header-message {
-  width: 100%;
-  background: url('/images/diagnose/back.png') no-repeat;
-  background-size: 100% 100%;
-}
+.diagnose {
+  .header {
+    width: 100%;
+  }
 
-.container {
-  margin-top: 20px;
-}
+  .header-message {
+    width: 100%;
+    background: url('/images/diagnose/back.png') no-repeat;
+    background-size: 100% 100%;
+  }
 
-.item-box {
-  width: 100%;
-  padding: 10px;
-  background-repeat: no-repeat;
-  background-size: 100% 100%;
-  cursor: pointer;
-}
+  .container {
+    margin-top: 20px;
+  }
 
-.item-title {
-  font-weight: 700;
-  font-size: 14px;
-}
+  .item-box {
+    width: 100%;
+    padding: 10px;
+    background-repeat: no-repeat;
+    background-size: 100% 100%;
+    cursor: pointer;
+  }
 
-.item-context {
-  height: 40px;
-  font-weight: 700;
-  font-size: 24px;
-}
+  .item-title {
+    font-weight: 700;
+    font-size: 14px;
+  }
+
+  .item-context {
+    height: 40px;
+    font-weight: 700;
+    font-size: 24px;
+  }
 
-.item-message {
-  color: rgba(0, 0, 0, 0.85);
-  font-weight: 400;
-  font-size: 14px;
+  .item-message {
+    color: rgba(0, 0, 0, 0.85);
+    font-weight: 400;
+    font-size: 14px;
+  }
 }

+ 2 - 2
src/pages/device/Instance/Detail/Diagnose/index.tsx

@@ -131,9 +131,9 @@ const Diagnose = () => {
     };
   }, []);
   return (
-    <Card>
+    <Card className="diagnose">
       <div className={current === 'message' ? 'header-message' : 'header'}>
-        <Row gutter={24} style={{ padding: 10 }}>
+        <Row gutter={24} style={{ padding: 10, width: '100%' }}>
           {list.map((item: ListProps) => (
             <Col
               span={8}

+ 5 - 3
src/pages/device/Instance/Detail/Running/Property/PropertyCard.tsx

@@ -70,9 +70,11 @@ const Property = (props: Props) => {
                 />
               </Tooltip>
             )}
-          <Tooltip placement="top" title="获取最新属性值">
-            <SyncOutlined onClick={refreshProperty} />
-          </Tooltip>
+          {data.expands?.type.includes('read') && (
+            <Tooltip placement="top" title="获取最新属性值">
+              <SyncOutlined onClick={refreshProperty} />
+            </Tooltip>
+          )}
           <Tooltip placement="top" title="详情">
             <UnorderedListOutlined
               onClick={() => {