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(); },
相关推荐
wikiwater 2020-10-27
IdeaElements 2020-08-19
Sophiego 2020-08-16
Kakoola 2020-08-01
Kakoola 2020-07-29
ELEMENTS爱乐冬雨 2020-07-18
ELEMENTS爱乐小超 2020-07-04
ELEMENTS爱乐小超 2020-07-04
Kakoola 2020-06-28
Feastaw 2020-06-18
Wmeng0 2020-06-14
ELEMENTS爱乐冬雨 2020-06-14
云之高水之远 2020-06-14
哈喽elements 2020-06-14
Feastaw 2020-06-11