@saooti/octopus-sdk 33.2.2 → 33.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
<a
|
|
25
25
|
class="octopus-dropdown-item"
|
|
26
26
|
href="/sso/login"
|
|
27
|
+
realLink="true"
|
|
27
28
|
>
|
|
28
29
|
{{ $t('Login') }}
|
|
29
30
|
</a>
|
|
@@ -59,6 +60,7 @@
|
|
|
59
60
|
class="octopus-dropdown-item"
|
|
60
61
|
rel="noopener"
|
|
61
62
|
target="_blank"
|
|
63
|
+
realLink="true"
|
|
62
64
|
>
|
|
63
65
|
{{ helpLink.title }}
|
|
64
66
|
</a>
|
|
@@ -68,6 +70,7 @@
|
|
|
68
70
|
<a
|
|
69
71
|
class="octopus-dropdown-item"
|
|
70
72
|
href="/sso/logout"
|
|
73
|
+
realLink="true"
|
|
71
74
|
>
|
|
72
75
|
{{ $t('Logout') }}
|
|
73
76
|
</a>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<ul class="octopus-nav">
|
|
2
|
+
<ul class="octopus-nav" :class="light?'light':''">
|
|
3
3
|
<li
|
|
4
4
|
v-for="index in tabNumber"
|
|
5
5
|
v-show="hasSlot(index-1)"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
class="octopus-tab-pane"
|
|
24
24
|
:class="activeTab === (index-1)? 'active':''"
|
|
25
25
|
>
|
|
26
|
-
<slot :name="'tab'+(index-1)" />
|
|
26
|
+
<slot :name="'tab'+(index-1)" :isActive="activeTab === (index-1)" />
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
29
29
|
</template>
|
|
@@ -36,6 +36,7 @@ export default defineComponent({
|
|
|
36
36
|
tabNumber: { default: 0, type: Number},
|
|
37
37
|
activeTab: { default: 0, type: Number},
|
|
38
38
|
transparent:{ default: false, type: Boolean},
|
|
39
|
+
light: { default: false, type: Boolean},
|
|
39
40
|
},
|
|
40
41
|
emits:['update:activeTab'],
|
|
41
42
|
methods:{
|
|
@@ -57,6 +58,9 @@ export default defineComponent({
|
|
|
57
58
|
margin-top: 0;
|
|
58
59
|
list-style: none;
|
|
59
60
|
border-bottom: 0.05rem solid #ddd;
|
|
61
|
+
&.light{
|
|
62
|
+
border: 0;
|
|
63
|
+
}
|
|
60
64
|
}
|
|
61
65
|
.octopus-nav-item{
|
|
62
66
|
border-right: solid 1px rgb(222,226,230);
|
|
@@ -68,6 +72,10 @@ export default defineComponent({
|
|
|
68
72
|
flex-grow: 1;
|
|
69
73
|
text-align: center;
|
|
70
74
|
}
|
|
75
|
+
.octopus-nav.light .octopus-nav-item{
|
|
76
|
+
border: 0;
|
|
77
|
+
flex-grow: 0;
|
|
78
|
+
}
|
|
71
79
|
.octopus-nav-link{
|
|
72
80
|
display: block;
|
|
73
81
|
padding: 0.5rem 1rem;
|
|
@@ -80,6 +88,12 @@ export default defineComponent({
|
|
|
80
88
|
color: $octopus-primary-color;
|
|
81
89
|
}
|
|
82
90
|
}
|
|
91
|
+
.octopus-nav.light .octopus-nav-link{
|
|
92
|
+
border-top: 0 !important;
|
|
93
|
+
border-right: 0 !important;
|
|
94
|
+
border-left: 0 !important;
|
|
95
|
+
font-weight: bold;
|
|
96
|
+
}
|
|
83
97
|
.octopus-tab-content{
|
|
84
98
|
border-right: solid 1px rgb(222,226,230);
|
|
85
99
|
border-left: solid 1px rgb(222,226,230);
|
|
@@ -99,13 +99,20 @@ export default defineComponent({
|
|
|
99
99
|
this.posY = rectElement.bottom + (this.isFixed ? 0 : window.scrollY)+ 5;
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
|
-
clearDataBlur (e: FocusEvent) {
|
|
102
|
+
async clearDataBlur (e: FocusEvent) {
|
|
103
103
|
if(e.relatedTarget){
|
|
104
104
|
const myElement = e.relatedTarget as HTMLElement;
|
|
105
105
|
if(this.popoverId===myElement.id){return;}
|
|
106
106
|
const parent = this.$refs.popover as HTMLElement;
|
|
107
107
|
if (null!==parent && parent.contains(myElement)) {
|
|
108
108
|
if(null!==myElement.classList && myElement.classList.contains('octopus-dropdown-item')){
|
|
109
|
+
if((myElement as HTMLAnchorElement).href ?? false){
|
|
110
|
+
if("true"===myElement.getAttribute('reallink')){
|
|
111
|
+
await myElement.click();
|
|
112
|
+
}else{
|
|
113
|
+
await this.$router.push((myElement as any).pathname);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
109
116
|
this.$nextTick(() => {
|
|
110
117
|
this.isClick = false;
|
|
111
118
|
this.clearData();
|