浏览代码

Merge branch 'master' of http://182.92.126.35:3000/hrx/mky-vent-base

lxh 14 小时之前
父节点
当前提交
4c4cfa8da6

+ 3 - 1
src/views/vent/home/configurable/components/header.vue

@@ -67,7 +67,9 @@
     () => props.data,
     (d) => {
       init(d);
-      selectHandler({ key: options.value[0]?.value });
+      if (!selectedDeviceID.value) {
+        selectHandler({ key: options.value[0]?.value });
+      }
     },
     {
       immediate: true,

+ 3 - 3
src/views/vent/home/configurable/hooks/useInit.ts

@@ -211,10 +211,10 @@ export function useInitConfigs() {
 
 /**
  * 根据模块的配置初始化基准 Module 组件需要的数据,包括选择框、设备等信息
- * @param data api 返回的数据
- * @param config 本模块的配置
+ * @param deviceType 本模块的设备类型
+ * @param moduleData 本模块的配置项
  */
-export function useInitModule(deviceType: string, moduleData: Config['moduleData']) {
+export function useInitModule(deviceType: Config['deviceType'], moduleData: Config['moduleData']) {
   const { header, mock } = moduleData;
   const devices = ref<Record<string, any>[]>([]);
   const options = ref<{ label: string; value: string }[]>([]);