vue.js中点击按钮跳转到链接地址并打开新页面(不传递参数)
在本页面打开链接<template><div><el-button @click="handle(scope.row.url)">打印</el-button></div></template><script>handle(url) {window.location.href = 'url'}</script&
·
- 在本页面打开链接
<template> <div> <el-button @click="handle(scope.row.url)">打印</el-button> </div> </template> <script> handle(url) { window.location.href = 'url' } </script>
- 在新页面打开链接
<template> <div> <el-button @click="handle(scope.row.url)">打印</el-button> </div> </template> <script> handle(url) { window.open('url', '_blank') } </script>
更多推荐
已为社区贡献1条内容
所有评论(0)