chore: update mqtt v4 (#1024)

* fix: change mqtt to version 4
This commit is contained in:
EchoByte
2024-03-24 20:59:46 +08:00
committed by GitHub
parent 69bc6602d0
commit e38610ff67
3 changed files with 90 additions and 140 deletions

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
// vue 3 + vite use MQTT.js refer to https://github.com/mqttjs/MQTT.js/issues/1269
import mqtt from "mqtt";
import * as mqtt from "mqtt/dist/mqtt.min";
import { reactive, ref, onUnmounted } from "vue";
const protocol = location.protocol === "https:" ? "wss" : "ws";