更改signalR连接

This commit is contained in:
不做码农
2022-02-28 18:36:06 +08:00
parent 748b9065db
commit c067951d50
2 changed files with 25 additions and 5 deletions

View File

@@ -5,7 +5,23 @@
</template>
<script>
import { mapGetters } from "vuex";
export default {
name: "App",
computed: {
...mapGetters(["token"]),
},
watch: {
token: {
handler: function (val) {
if (val) {
this.signalr.start();
}
},
deep: true,
immediate: true,
},
},
};
</script>