소스 검색

feat: merge

xieyonghong 3 년 전
부모
커밋
bd93ea3920
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/pages/device/Instance/Detail/Modbus/index.tsx

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

@@ -314,9 +314,9 @@ export default (props: Props) => {
         );
         if ((field as Field).modified) {
           const readIndex = field.query(path).get('value');
-          const dataLength = field.query(path).get('dataSource')?.length - 1;
+          const dataLength = field.query(path).get('dataSource')?.length;
           const length = lengthMap.get(value) + readIndex;
-          console.log(length, dataLength);
+          console.log(length, dataLength, readIndex);
           if (length > dataLength) {
             field.selfErrors = '数据类型对应的长度和起始位置加起来不能超过数据长度';
           } else {