HTML中:
<el-button type="primary" class="r" @click="getUrl">按钮</el-button>
methods中:
getUrl(){
let routeData = this.$router.resolve({ path: '/test' });
window.open(routeData.href, '_blank');
},
路由文件 router/index.js中:
{
path: '/test',
component: () => import('@/views/newPage/test'),
hidden: true
},
所有评论(0)