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