html一个页面链接携带参数跳转另一个页面基于vue2.0的element框架


来给生活比个耶!

1.按钮

   <el-button @click="albumList(scope.row.id)" size="mini" type="primary" size="small">相册列表</el-button>

2.js函数

   albumList (id){
                location.href=`album_list.html?id=`+id /*跳转页面传递id值*/
            },

3.钩子函数 加载截取参数id

   created(){
            var Ohref=window.location.href;
            var ids=Ohref.split("?id=");
            var id1 = ids[1];
            this.edit1(id1);
            console.log(id1+'接收参数id');
            this.fetchData();
        },


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM