1、跳转外部链接并覆盖当前页
<el-button type="primary" @click="jump">跳转</el-button>
jump () {
window.location.href = 'https:\\www.baidu.com'
}
2、跳转不覆盖当前页面,在新窗口打开
<el-button type="primary" @click="jump">跳转</el-button>
jump () {
window.open = ('https:\\www.baidu.com','_blank')
}
3、页面中内部跳转
用this.$router.push()实现