欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

vue跳轉(zhuǎn)頁面攜帶參數(shù)并且立即執(zhí)行方法

 更新時間:2023年10月12日 10:23:10   作者:時間不會賴著不走  
這篇文章主要介紹了vue跳轉(zhuǎn)頁面攜帶參數(shù)并且立即執(zhí)行方法,首先定義跳轉(zhuǎn)函數(shù),結(jié)合實例代碼給大家介紹的非常詳細(xì),需要的朋友參考下吧

vue跳轉(zhuǎn)頁面的幾種方法(推薦)

vue中如何攜帶參數(shù)跳轉(zhuǎn)頁面

vue使用window.open()跳轉(zhuǎn)頁面的代碼案例

1.首先定義跳轉(zhuǎn)函數(shù)

這個是鏈接跳轉(zhuǎn)

<a href="javascript:void(0)" rel="external nofollow"  onclick="openPage()">位移變化趨勢圖</a></td></tr>
			</table>
 methods: {
    openPage(){
              // this.$router.push('/dis/show');
        this.$router.push({path: '/dis/show',
        query: {
          searchObj: { type:"monitoring1" ,data:"data_real",begin:"2018-12-20",end:"2018-12-29"}
                 }              
               });

2.跳轉(zhuǎn)頁面接收參數(shù)

 data() {
        return {
          searchObj:{},
          btnDisabled:false
        }
    },
    created(){
   this.getParams(),
    this.showChart() 
  },
    methods:{
      getParams(){
    // 取到路由帶過來的參數(shù)賦值給searchObj
    this.searchObj = this.$route.query.searchObj
   },

3.跳轉(zhuǎn)后直接執(zhí)行方法

在這里插入圖片描述

就是在跳轉(zhuǎn)頁面直接執(zhí)行

到此這篇關(guān)于vue跳轉(zhuǎn)頁面攜帶參數(shù)并且立即執(zhí)行方法的文章就介紹到這了,更多相關(guān)vue跳轉(zhuǎn)頁面攜帶參數(shù)內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評論