<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
import { mapGetters } from "vuex";

export default {
  name: "App",
  computed: {
    ...mapGetters(["token"]),
  },
  watch: {
    token: {
      handler: function (val) {
        if (val) {
          this.signalr.start();  //todo 如果token发生更替 重启signal
        }
      },
      deep: true,
      immediate: true,
    },
  },
};
</script>
<style lang="stylus">
@import "./style/base.styl"
</style>
