Sfoglia il codice sorgente

修复图元交互发送数据bug

Wind-Breaker1 1 anno fa
parent
commit
837b7c932c
2 ha cambiato i file con 3 aggiunte e 5 eliminazioni
  1. 1 1
      src/views/components/Actions.vue
  2. 2 4
      src/views/components/Network.vue

+ 1 - 1
src/views/components/Actions.vue

@@ -475,7 +475,7 @@ const onChangeAction = (action: any) => {
       action.targetType = 'id';
       break;
     case 15:
-      action.network = {data:{ type: 'publish', protocol: 'mqtt', options: {}} };
+      action.network = {data:{ protocol: 'mqtt', options: {}},type: 'publish', };
       action.params = '';
       action.value = {};
       action.targetType = 'id';

+ 2 - 4
src/views/components/Network.vue

@@ -30,7 +30,7 @@
               @click="() => onSelect(item)"
             >
               名称: {{ item.name }}
-              <div class="desc">地址: {{ item.url }}</div>
+              <div class="desc">地址: {{ item.data.url }}</div>
 
               <span class="del" @click.stop="onDelNetWork(item, i)">
                 <t-icon name="delete" />
@@ -247,9 +247,7 @@ const onInput = (text: string) => {
 // 请求我的数据源接口
 const getNetworks = async () => {
   const body: any = {
-    query: {
-      type: modelValue.data.type,
-    },
+    type: modelValue.type,
     projection: "id,data,name",
   };
   if (modelValue.name) {