# 打开新窗口tabs
//注意,如果需要每次打开tabs页面获取参数,请配置禁用页面缓存,见上面:禁用页面缓存
/*打开tabs实际也是执行的路由跳转,需要打开的tabs必须是一个路由页面*/
//手动打开tabs,
/*
* text打开的tab显示的名称
* path路由path
* query跳转的参数,可选,如果需要建议使用query
*/
this.$tabs.open({
text: '个人中心',
path: '/userinfo',
query: {a:1,b:2}//参数名
});
//手动关闭tabs,参数为路由path
this.$tabs.close('/userinfo');
//如果写的是vue3语法,请在script里第一行代码加上
//import {getCurrentInstance} from 'vue';
//vue3语法使用
import { getCurrentInstance } from 'vue';
const { proxy } = getCurrentInstance();
proxy.$tabs.open({}); //参数同上
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26