Commit 0bfca16 1 parent bc100b8 commit 0bfca16 Copy full SHA for 0bfca16
File tree 4 files changed +13
-7
lines changed
4 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -58,8 +58,8 @@ export default {
58
58
this .isOpen = this .isOpen .map ((val , ind ) => (ind !== index ? false : ! val));
59
59
},
60
60
/* When item clicked, emit a launch event */
61
- launchApp (url ) {
62
- this .$emit (' launch-app' , url );
61
+ launchApp (options ) {
62
+ this .$emit (' launch-app' , options );
63
63
},
64
64
/* If an initial URL is specified, then open relevant section */
65
65
openDefaultSection () {
Original file line number Diff line number Diff line change @@ -17,14 +17,15 @@ export default {
17
17
icon: String ,
18
18
title: String ,
19
19
url: String ,
20
+ target: String ,
20
21
click: Function ,
21
22
},
22
23
components: {
23
24
Icon,
24
25
},
25
26
methods: {
26
27
itemClicked () {
27
- if (this .url ) this .$emit (' launch-app' , this .url );
28
+ if (this .url ) this .$emit (' launch-app' , { url : this .url , target : this . target } );
28
29
},
29
30
},
30
31
data () {
Original file line number Diff line number Diff line change 6
6
:icon =" item.icon"
7
7
:title =" item.title"
8
8
:url =" item.url"
9
+ :target =" item.target"
9
10
@launch-app =" launchApp"
10
11
/>
11
12
</div >
@@ -26,8 +27,8 @@ export default {
26
27
SideBarItem,
27
28
},
28
29
methods: {
29
- launchApp (url ) {
30
- this .$emit (' launch-app' , url );
30
+ launchApp (options ) {
31
+ this .$emit (' launch-app' , options );
31
32
},
32
33
},
33
34
};
Original file line number Diff line number Diff line change @@ -37,8 +37,12 @@ export default {
37
37
MultiTaskingWebComtent,
38
38
},
39
39
methods: {
40
- launchApp (url ) {
41
- this .url = url;
40
+ launchApp (options ) {
41
+ if (options .target === ' newtab' ) {
42
+ window .open (options .url , ' _blank' );
43
+ } else {
44
+ this .url = options .url ;
45
+ }
42
46
},
43
47
setTheme () {
44
48
const theme = this .GetTheme ();
You can’t perform that action at this time.
0 commit comments