@saooti/octopus-sdk 33.2.1 → 33.2.3

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "33.2.1",
3
+ "version": "33.2.3",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -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,19 @@ 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((myElement as HTMLAnchorElement).host !== window.location.host){
111
+ return;
112
+ }
113
+ await this.$router.push((myElement as any).pathname);
114
+ }
109
115
  this.$nextTick(() => {
110
116
  this.isClick = false;
111
117
  this.clearData();
@@ -135,6 +135,10 @@ export default defineComponent({
135
135
  align-items: center;
136
136
  justify-content: flex-end;
137
137
  padding: 1rem;
138
+ flex-wrap
139
+ button{
140
+ margin: 0.1rem;
141
+ }
138
142
  }
139
143
  }
140
144
  </style>