소스 검색

fix(views): 修复协议类型错误的问题

wangcong 3 달 전
부모
커밋
63efa96d21
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 2
      src/types/index.ts
  2. 1 1
      src/views/setup-protocol/CustomParams.vue

+ 2 - 2
src/types/index.ts

@@ -117,11 +117,11 @@ export interface CustomParamsForm {
 }
 
 export interface ProtocolBaseInfo {
-  id: number;
+  id?: number;
   protocolName: string;
   protocolType: string;
   deviceType: string;
-  deviceTypeId: number;
+  deviceTypeId: number | null;
   dataBit: 5 | 6 | 7 | 8;
   parityBit: 'N' | 'O' | 'E';
   stopBit: '1' | '1.5' | '2';

+ 1 - 1
src/views/setup-protocol/CustomParams.vue

@@ -14,7 +14,7 @@ import type { DefaultOptionType, SelectValue } from 'ant-design-vue/es/select';
 import type { FormRules, ProtocolParamInfo } from '@/types';
 
 interface Props {
-  protocolId: number;
+  protocolId?: number;
 }
 
 const props = defineProps<Props>();