|
|
@ -1,4 +1,4 @@ |
|
|
import { VNode, defineComponent, createVNode, render, reactive, h } from 'vue'; |
|
|
import { createVNode, defineComponent, h, reactive, render, VNode } from 'vue'; |
|
|
import type { LoadingProps } from './typing'; |
|
|
import type { LoadingProps } from './typing'; |
|
|
|
|
|
|
|
|
import Loading from './Loading.vue'; |
|
|
import Loading from './Loading.vue'; |
|
|
@ -41,7 +41,7 @@ export function createLoading(props?: Partial<LoadingProps>, target?: HTMLElemen |
|
|
target.appendChild(vm.el as HTMLElement); |
|
|
target.appendChild(vm.el as HTMLElement); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function destory() { |
|
|
function destroy() { |
|
|
container && render(null, container); |
|
|
container && render(null, container); |
|
|
container = vm = null; |
|
|
container = vm = null; |
|
|
} |
|
|
} |
|
|
@ -53,7 +53,7 @@ export function createLoading(props?: Partial<LoadingProps>, target?: HTMLElemen |
|
|
vm, |
|
|
vm, |
|
|
close, |
|
|
close, |
|
|
open, |
|
|
open, |
|
|
destory, |
|
|
destroy, |
|
|
setTip: (tip: string) => { |
|
|
setTip: (tip: string) => { |
|
|
data.tip = tip; |
|
|
data.tip = tip; |
|
|
}, |
|
|
}, |
|
|
|