基本信息
源码名称:vue-router 实例源码下载(Vue.js + Seajs)
源码大小:0.15M
文件格式:.rar
开发语言:js
更新时间:2017-07-13
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 2 元 
   源码介绍

 /**
 * Created by 彬彬 on 2016/12/18.
 */
 define(function (require, exports, module) {
     var sTpl = require('templates/teacher.html');
     require("js/components/myCom.js");

     var vueComponent=Vue.extend({
         template:sTpl,
         data:function(){
             return{
                 msg:'老师信息页面',
                 params1:"",
                 params2:""
             }
         },
         ready:function(){
             this.params1=this.$route.params.params1;
             this.params2=this.$route.params.params2;
         },
         route:{
             data:function(transition){
                 return{
                     params1:transition.to.params.params1,
                     params2:transition.to.params.params2
                 }
             }
         },
         watch:{
             'params2':function(val,oldVal){
                 console.log(JSON.stringify(this.$data));
             }
         },
         methods:{
             click1:function(){
                 this.msg='点击后的值';
             }
         }
     });

     module.exports=vueComponent;
 });