فهرست منبع

feat: 统计-锁用量上层图表在小屏下不显示

lanjianrong 4 سال پیش
والد
کامیت
886521058a
1فایلهای تغییر یافته به همراه11 افزوده شده و 7 حذف شده
  1. 11 7
      src/pages/Statistic/Software/Usage/index.jsx

+ 11 - 7
src/pages/Statistic/Software/Usage/index.jsx

@@ -6,6 +6,7 @@ import consts from '@/consts'
 import { useDebounceFn } from 'ahooks'
 import dayjs from 'dayjs'
 import { Pie } from '@ant-design/charts'
+import { isMobile } from '@/utils/is'
 
 const { Text } = Typography
 const opMap = {
@@ -165,14 +166,17 @@ const Usage = () => {
 
   return (
     <div className="flex flex-col">
-      <div className="flex flex-row justify-between mb-4">
-        <div className="card-transition  w-1/2 bg-white mr-2">
-          {pieData.pieLeft ? <Pie {...leftConfig} /> : null}
+      {!isMobile() && (
+        <div className="flex flex-row justify-between mb-4">
+          <div className="card-transition  w-1/2 bg-white mr-2">
+            {pieData.pieLeft ? <Pie {...leftConfig} /> : null}
+          </div>
+          <div className="card-transition w-1/2 bg-white ml-2">
+            {pieData.pieRight ? <Pie {...rightConfig} /> : null}
+          </div>
         </div>
-        <div className="card-transition w-1/2 bg-white ml-2">
-          {pieData.pieRight ? <Pie {...rightConfig} /> : null}
-        </div>
-      </div>
+      )}
+
       <BasicTable
         manualRequest
         search={false}