Vue.js知识点汇集

1.页面传值:

源页面:

 showScreen(){
  let routeData = this.$router.resolve({path:'/company-show',query:{companyId:this.companyId,year:this.year}});
  window.open(routeData.href, '_blank');
 }

 

目标页面:

 mounted() {
      this.companyId = this.$route.query.companyId;
      this.year = this.$route.query.year;
    },

2.定时器:

 mounted() {
     this.timer=setInterval(this.loadIndustryOrderChart,30000);
    },
beforeDestroy(){
clearInterval(this.timer);
}
 

3.引入echarts

const echarts = require('echarts')

 

上一篇:bootstrapValidator使用时遇到的问题


下一篇:vue 混合器mixins