|
|
@@ -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!',
|
|
|
}
|