Ver código fonte

fix: 参数判断导致服务记录无编辑操作

lanjianrong 4 anos atrás
pai
commit
9be9658f61
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      src/components/TimeLineList/ServiceLogItem.tsx

+ 2 - 1
src/components/TimeLineList/ServiceLogItem.tsx

@@ -7,6 +7,7 @@ import {
   updateCustomerService
   updateCustomerService
 } from '@/services/customer'
 } from '@/services/customer'
 import { isDevMode } from '@/utils/env'
 import { isDevMode } from '@/utils/env'
+import { isUnDef } from '@/utils/is'
 import { dayjsFormat } from '@/utils/utils'
 import { dayjsFormat } from '@/utils/utils'
 import { useDispatch, useRequest } from '@umijs/max'
 import { useDispatch, useRequest } from '@umijs/max'
 import { Button, Popconfirm } from 'antd'
 import { Button, Popconfirm } from 'antd'
@@ -94,7 +95,7 @@ const ServiceLogItem: React.FC<ServiceLogItemProps> = ({ item, logType, updatePa
         <div className="bg-white bg-opacity-80 rounded-sm text-black text-opacity-60 text-sm mt-3 p-2 whitespace-pre-line">
         <div className="bg-white bg-opacity-80 rounded-sm text-black text-opacity-60 text-sm mt-3 p-2 whitespace-pre-line">
           {item.mark}
           {item.mark}
         </div>
         </div>
-        {logType && item.isOperation ? (
+        {!isUnDef(logType) && item.isOperation ? (
           <div className="mt-2">
           <div className="mt-2">
             <Button size="small" onClick={() => handleOnEdit(item)}>
             <Button size="small" onClick={() => handleOnEdit(item)}>
               编辑
               编辑