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

<el-button>點(diǎn)擊后如何跳轉(zhuǎn)指定url鏈接

 更新時(shí)間:2023年04月13日 10:20:33   作者:Hemist  
這篇文章主要介紹了<el-button>點(diǎn)擊后如何跳轉(zhuǎn)指定url鏈接問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教

<el-button>點(diǎn)擊后跳轉(zhuǎn)指定url鏈接

Vue + elementUI 的項(xiàng)目前端遇到了這樣一個(gè)問(wèn)題:

如何實(shí)現(xiàn)點(diǎn)擊 button 后,直接跳轉(zhuǎn)到指定的 web_url ?

這里提供一個(gè)解決方案,僅供學(xué)習(xí)和參考。

<el-button size="small" >
?? ?<a :href="this.webUrl" rel="external nofollow"  target="_blank" style="text-decoration: none">
?? ??? ?進(jìn)入團(tuán)隊(duì)項(xiàng)目組
?? ?</a>
</el-button>

其中:

  • ① this.webUrl 是 web url 鏈接;
  • ② target=“_blank” 規(guī)定在新的頁(yè)面中打開(kāi)鏈接;
  • ③ style=“text-decoration: none” 去除超鏈接的下劃線。

用el-button跳轉(zhuǎn)頁(yè)面

1.el-button綁定點(diǎn)擊事件

<el-button type="primary" @click="Jump" class="detailed">跳轉(zhuǎn)</el-button>

2.在methods內(nèi)寫(xiě)入方法

注:data即使不需要傳數(shù)據(jù),也必須return,否則會(huì)報(bào)錯(cuò)

<script>
export default {
data () {
? ? return {}
? ? ?},
methods: {
? jump () {
? ? ? this.$router.push('/頁(yè)面地址')
? ? }
}
?
}
</script>

總結(jié)

以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論