vue-stack-tabs 0.1.6 → 0.1.7
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/vue-stack-tabs.es.js +743 -741
- package/dist/vue-stack-tabs.umd.js +5 -5
- package/package.json +1 -1
- package/src/lib/components/OverlayLoading/{js/Component.vue → Component.vue} +5 -2
- package/src/lib/components/OverlayLoading/{js/api.ts → api.ts} +3 -2
- package/src/lib/components/OverlayLoading/{js/helpers.ts → helpers.ts} +7 -2
- package/src/lib/components/OverlayLoading/index.ts +2 -2
package/package.json
CHANGED
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
watch
|
|
35
35
|
} from 'vue'
|
|
36
36
|
import { removeElement } from './helpers'
|
|
37
|
-
import Loaders from '
|
|
37
|
+
import Loaders from './loaders'
|
|
38
38
|
|
|
39
39
|
const props = withDefaults(
|
|
40
40
|
defineProps<{
|
|
@@ -42,7 +42,7 @@ const props = withDefaults(
|
|
|
42
42
|
programmatic: boolean
|
|
43
43
|
container: HTMLElement | Object | Function
|
|
44
44
|
isFullPage: boolean
|
|
45
|
-
enforceFocus
|
|
45
|
+
enforceFocus?: boolean
|
|
46
46
|
lockScroll: boolean
|
|
47
47
|
transition: string
|
|
48
48
|
/**
|
|
@@ -182,4 +182,7 @@ onBeforeUnmount(() => {
|
|
|
182
182
|
document.removeEventListener('keyup', keyPress)
|
|
183
183
|
document.removeEventListener('focusin', focusIn)
|
|
184
184
|
})
|
|
185
|
+
defineExpose({
|
|
186
|
+
hide
|
|
187
|
+
})
|
|
185
188
|
</script>
|
|
@@ -12,8 +12,9 @@ export const useLoading = (globalProps = {}, globalSlots = {}) => {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
const propsData = { ...globalProps, ...props, ...forceProps }
|
|
15
|
+
// @ts-ignore
|
|
15
16
|
let container = propsData.container
|
|
16
|
-
|
|
17
|
+
// @ts-ignore
|
|
17
18
|
if (!propsData.container) {
|
|
18
19
|
container = document.body
|
|
19
20
|
propsData.isFullPage = true
|
|
@@ -23,7 +24,7 @@ export const useLoading = (globalProps = {}, globalSlots = {}) => {
|
|
|
23
24
|
const instance = createComponent(LoadingComponent, propsData, container, mergedSlots)
|
|
24
25
|
|
|
25
26
|
return {
|
|
26
|
-
hide: instance
|
|
27
|
+
hide: instance!.exposed!.hide
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
30
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, render } from 'vue'
|
|
2
2
|
|
|
3
|
-
export const removeElement = (el) => {
|
|
3
|
+
export const removeElement = (el: HTMLElement) => {
|
|
4
4
|
if (typeof el.remove !== 'undefined') {
|
|
5
5
|
el.remove()
|
|
6
6
|
} else {
|
|
@@ -9,7 +9,12 @@ export const removeElement = (el) => {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
// Taken from https://github.com/moyoujun/vue3-loading-overlay/blob/master/src/index.ts
|
|
12
|
-
export function createComponent(
|
|
12
|
+
export function createComponent(
|
|
13
|
+
component: any,
|
|
14
|
+
props: any,
|
|
15
|
+
parentContainer: HTMLElement,
|
|
16
|
+
slots = {}
|
|
17
|
+
) {
|
|
13
18
|
const vNode = h(component, props, slots)
|
|
14
19
|
const container = document.createElement('div')
|
|
15
20
|
container.classList.add('vld-container')
|