houyaf 3 éve
szülő
commit
91a9c151a0
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      src/utils/mqtt.ts

+ 2 - 2
src/utils/mqtt.ts

@@ -1,4 +1,4 @@
-import * as mqtt from 'mqtt/dist/mqtt.min'
+import mqtt from 'mqtt'
 import type { App } from 'vue'
 import mqttUseStore from '@/store/modules/mqtt'
 const mqttStore = mqttUseStore()
@@ -6,7 +6,7 @@ export function initMqtt(app: App<Element>) {
   const options = {
     clean: true,
     connectTimeout: 4000,
-    clientId: new Date().getTime(),
+    clientId: new Date().getTime().toString(),
     username: 'admin',
     password: 'houyaf1!',
   }