Bootstrap

vue全局参数

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>',
  data:function(){
      return{
          wbWinList: []   // 定义的变量,全局参数
      }
  },
})
//使用全局参数
// this.$root.backgroundColor = 666;

其它页面如果想监听改变

  //监听全局变量,更新
  watch: {
    '$root.backgroundColor':{
        handler(){

        },
        deep: true
    },
  },

在这里插入图片描述
在这里插入图片描述

;