Explorar o código

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

lanjianrong %!s(int64=4) %!d(string=hai) anos
pai
achega
9be9658f61
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/components/TimeLineList/ServiceLogItem.tsx

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

@@ -7,6 +7,7 @@ import {
   updateCustomerService
 } from '@/services/customer'
 import { isDevMode } from '@/utils/env'
+import { isUnDef } from '@/utils/is'
 import { dayjsFormat } from '@/utils/utils'
 import { useDispatch, useRequest } from '@umijs/max'
 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">
           {item.mark}
         </div>
-        {logType && item.isOperation ? (
+        {!isUnDef(logType) && item.isOperation ? (
           <div className="mt-2">
             <Button size="small" onClick={() => handleOnEdit(item)}>
               编辑