当前位置:网站首页>跳转打开新窗口
跳转打开新窗口
2022-06-29 20:28:00 【Y4258】
1.功能实现:点击按钮打开一个新的页面
<a target="_blank" href="">{
{
item.project_name }}</a>
const params = {
path: '/programMenu/program',
query: {
id: 12
}
}
window.open(this.$router.resolve(params).href, '_blank')
这样就可以打开新的页面
2.遇到的问题:
这样做是可以跳转,但是如果你的路由设置的首页是 空 时 跳转 ‘/’,你执行点击跳转时会打开两个页面。
解决办法:1.让你的跳转为空时不跳转首页
2.把href为空时添加判断
边栏推荐
- 一次 Keepalived 高可用的事故,让我重学了一遍它!
- Deploy web using gunicorn Py application
- Flume配置4——自定義Source+Sink
- fastadmin后台设置单选按钮
- What is a database? Database detailed notes! Take you into the database ~ you want to know everything here!
- 2021 CCPC Harbin J. local minimum (thinking question)
- Talk about the delta configuration of Eureka
- How to set a pod to run on a specified node
- Leading by 11%, Huawei cloud sky chip AI solver once again topped the international authoritative list
- Stm32cubemx learning (6) external interrupt experiment
猜你喜欢

Flume理论

mysql中explain语句查询sql是否走索引,extra中的几种类型整理汇总

Cmake开发-多目录工程

. NETCORE unified authentication authorization learning - first authorization (2)
![[fishing artifact] code tool for lowering the seconds of UI Library -- form part (I) design](/img/ad/0efd744334bf648b149aa1841b58af.png)
[fishing artifact] code tool for lowering the seconds of UI Library -- form part (I) design

Stm32cubemx learning (6) external interrupt experiment

Lock4j -- distributed lock Middleware -- customize the logic of lock acquisition failure

A great open source image watermarking solution

AI scene Storage Optimization: yunzhisheng supercomputing platform storage practice based on juicefs

Bigder:自动化测试工程师
随机推荐
「运维有小邓」审核并分析文件和文件夹访问权限
Koa source code analysis
2021 CCPC 哈尔滨 E. Power and Modulo (思维题)
liunx指令
文件包含漏洞
输入年份与月份,求该月共有多少天
【编译原理】语法分析
Set up your own website (12)
Linux安装MySQL5
Etcd database source code analysis - put process of server
Startservice() procedure
.NetCore统一认证授权学习——第一次授权(2)
[compilation principle] semantic analysis
Codeforces Global Round 21 C D E
Lexin interview process
Mysql Json 数据类型&函数
Chainsafe cross chain bridge deployment tutorial
Command execution (RCE) vulnerability
SSH command and instructions
[notes] take notes again -- learn by doing Verilog HDL – 014