@skyservice-developers/vue-dev-kit 1.5.10 → 1.5.11
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/dist/vue2/style.css +1 -1
- package/dist/vue2/vue-dev-kit.cjs +1 -1
- package/dist/vue2/vue-dev-kit.js +142 -139
- package/dist/vue3/style.css +1 -1
- package/dist/vue3/vue-dev-kit.cjs +1 -1
- package/dist/vue3/vue-dev-kit.js +648 -645
- package/package.json +1 -1
- package/src/shared/utils/parentBridge.js +4 -0
- package/src/vue2/components/Header.vue +6 -2
- package/src/vue3/components/Header.vue +6 -2
- package/src/vue3/components/SkySelect.vue +20 -15
package/package.json
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
|
|
72
72
|
<script>
|
|
73
73
|
import { isInIframe } from '../../shared/utils/webviewCheck'
|
|
74
|
-
import { getParentLocalStorage, sendToParent, setSenderId, getSenderId } from '../../shared/utils/parentBridge'
|
|
74
|
+
import { getParentLocalStorage, setParentLocalStorage, sendToParent, setSenderId, getSenderId } from '../../shared/utils/parentBridge'
|
|
75
75
|
|
|
76
76
|
export default {
|
|
77
77
|
name: 'Header',
|
|
@@ -150,8 +150,12 @@ export default {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
// Set rocketMode
|
|
153
|
-
getParentLocalStorage('rocketMode').then((value) => {
|
|
153
|
+
getParentLocalStorage('rocketMode').then(async (value) => {
|
|
154
154
|
this.previousRocketMode = value
|
|
155
|
+
const existingFallback = await getParentLocalStorage('fallbackRocketMode')
|
|
156
|
+
if (existingFallback === null) {
|
|
157
|
+
setParentLocalStorage('fallbackRocketMode', value === true || value === 'true' ? 'true' : 'false')
|
|
158
|
+
}
|
|
155
159
|
sendToParent({ type: 'setRocketMode', value: true })
|
|
156
160
|
})
|
|
157
161
|
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
<script setup>
|
|
81
81
|
import { ref, computed, onMounted, onUnmounted } from 'vue'
|
|
82
82
|
import { isInIframe } from '../../shared/utils/webviewCheck'
|
|
83
|
-
import { getParentLocalStorage, getParentWindowValue, sendToParent, setSenderId, getSenderId } from '../../shared/utils/parentBridge'
|
|
83
|
+
import { getParentLocalStorage, getParentWindowValue, setParentLocalStorage, sendToParent, setSenderId, getSenderId } from '../../shared/utils/parentBridge'
|
|
84
84
|
|
|
85
85
|
const props = defineProps({
|
|
86
86
|
title: {
|
|
@@ -153,8 +153,12 @@ if (isInIframe() && props.trackPageName) {
|
|
|
153
153
|
const previousRocketMode = ref(null)
|
|
154
154
|
|
|
155
155
|
if (isInIframe()) {
|
|
156
|
-
getParentLocalStorage('rocketMode').then((value) => {
|
|
156
|
+
getParentLocalStorage('rocketMode').then(async (value) => {
|
|
157
157
|
previousRocketMode.value = value
|
|
158
|
+
const existingFallback = await getParentLocalStorage('fallbackRocketMode')
|
|
159
|
+
if (existingFallback === null) {
|
|
160
|
+
setParentLocalStorage('fallbackRocketMode', value === true || value === 'true' ? 'true' : 'false')
|
|
161
|
+
}
|
|
158
162
|
sendToParent({ type: 'setRocketMode', value: true })
|
|
159
163
|
})
|
|
160
164
|
}
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
<template v-if="open">
|
|
41
41
|
<Teleport v-if="teleport" to="body">
|
|
42
42
|
<div
|
|
43
|
-
|
|
43
|
+
ref="dropdownEl"
|
|
44
|
+
class="sky-select-dropdown-teleported"
|
|
44
45
|
:style="dropdownStyle"
|
|
45
46
|
>
|
|
46
47
|
<div
|
|
@@ -139,6 +140,7 @@ const props = defineProps({
|
|
|
139
140
|
const emit = defineEmits(["update:modelValue"]);
|
|
140
141
|
|
|
141
142
|
const root = ref(null);
|
|
143
|
+
const dropdownEl = ref(null);
|
|
142
144
|
const open = ref(false);
|
|
143
145
|
const focusedIdx = ref(-1);
|
|
144
146
|
const dropdownStyle = ref({});
|
|
@@ -158,11 +160,9 @@ function calcDropdownStyle() {
|
|
|
158
160
|
if (!props.teleport || !root.value) return;
|
|
159
161
|
const rect = root.value.getBoundingClientRect();
|
|
160
162
|
dropdownStyle.value = {
|
|
161
|
-
position: "fixed",
|
|
162
163
|
top: `${rect.bottom + 4}px`,
|
|
163
164
|
left: `${rect.left}px`,
|
|
164
165
|
width: `${rect.width}px`,
|
|
165
|
-
zIndex: "var(--sky-select-dropdown-z-index, 9999)",
|
|
166
166
|
};
|
|
167
167
|
}
|
|
168
168
|
|
|
@@ -197,7 +197,9 @@ function select(option) {
|
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
function onOutsideClick(e) {
|
|
200
|
-
if (
|
|
200
|
+
if (root.value?.contains(e.target)) return;
|
|
201
|
+
if (dropdownEl.value?.contains(e.target)) return;
|
|
202
|
+
close();
|
|
201
203
|
}
|
|
202
204
|
|
|
203
205
|
function onScrollOrResize() {
|
|
@@ -237,6 +239,20 @@ onBeforeUnmount(() => {
|
|
|
237
239
|
});
|
|
238
240
|
</script>
|
|
239
241
|
|
|
242
|
+
<style>
|
|
243
|
+
.sky-select-dropdown-teleported {
|
|
244
|
+
position: fixed;
|
|
245
|
+
z-index: var(--sky-select-dropdown-z-index, 9999);
|
|
246
|
+
background: var(--sky-select-dropdown-bg, #fff);
|
|
247
|
+
border: var(--sky-select-dropdown-border, 1px solid #d1d5db);
|
|
248
|
+
border-radius: var(--sky-select-dropdown-radius, 6px);
|
|
249
|
+
box-shadow: var(--sky-select-dropdown-shadow, 0 4px 12px rgba(0, 0, 0, 0.1));
|
|
250
|
+
max-height: var(--sky-select-dropdown-max-height, 220px);
|
|
251
|
+
overflow-y: auto;
|
|
252
|
+
padding: 4px;
|
|
253
|
+
}
|
|
254
|
+
</style>
|
|
255
|
+
|
|
240
256
|
<style scoped>
|
|
241
257
|
.sky-select {
|
|
242
258
|
position: relative;
|
|
@@ -333,17 +349,6 @@ onBeforeUnmount(() => {
|
|
|
333
349
|
padding: 4px;
|
|
334
350
|
}
|
|
335
351
|
|
|
336
|
-
.sky-select-dropdown-teleported {
|
|
337
|
-
position: fixed;
|
|
338
|
-
background: var(--sky-select-dropdown-bg, #fff);
|
|
339
|
-
border: var(--sky-select-dropdown-border, 1px solid #d1d5db);
|
|
340
|
-
border-radius: var(--sky-select-dropdown-radius, 6px);
|
|
341
|
-
box-shadow: var(--sky-select-dropdown-shadow, 0 4px 12px rgba(0, 0, 0, 0.1));
|
|
342
|
-
max-height: var(--sky-select-dropdown-max-height, 220px);
|
|
343
|
-
overflow-y: auto;
|
|
344
|
-
padding: 4px;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
352
|
/* Option */
|
|
348
353
|
.sky-select-option {
|
|
349
354
|
display: flex;
|