在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML/ 如何在我這種情況下,讓vue-router傳入多個(gè)參數(shù)?

如何在我這種情況下,讓vue-router傳入多個(gè)參數(shù)?

我有一個(gè)下面的配置,如果頁面跳轉(zhuǎn),那么path這里就會傳入一個(gè)true過去。

{
    icon: 'ios-barcode',
    size: '30',
    color: '#ff9900',
    path: '/home/aftersale_physicalserver_workpanel/true',
    name: '已使用' + ' (' + used_count + ') ',  // 已使用的實(shí)體服務(wù)器
  },
  

我的問題是,這里只能傳入一個(gè)參數(shù)。

這樣的配置vue-router如何傳遞多個(gè)參數(shù)?


編輯1

我在模板中使用的時(shí)候,是這樣的,router-link的跳轉(zhuǎn):

                  <router-link :to="item.path">
                    <span class="icon">
                      <Icon :type="item.icon" :size='item.size' :color='item.color'></Icon>
                    </span>
                    <div class="icon-title">
                      <h3>{{item.name}}</h3>
                    </div>
                  </router-link>



  
回答
編輯回答
傻叼
2018年4月14日 21:57
編輯回答
維他命

想要傳輸多個(gè)參數(shù)建議使用編程式的導(dǎo)航
比如我想跳轉(zhuǎn)到詳情頁,傳輸no和name兩個(gè)參數(shù)

this.$router.push({ path: '/index/detail', query: { no: "10001",name:"xiaoming" } })
2018年5月8日 02:49