فهرست منبع

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>();