houyaf 3 년 전
부모
커밋
91a9c151a0
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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!',
   }