<dy-wait>

Example

import { waitLoading } from '@duoyun-fe/duoyun-ui/elements/wait';

function onClick() {
  waitLoading(new Promise((res) => setTimeout(res, 1500)), {
    position: 'center',
    text: 'Loading',
    color: 'black',
  });
}

API

Shadow DOM; Extends GemElement

Constructor DuoyunWaitElement()

Params Type
initState State

Static Properties

Property Type
instance DuoyunWaitElement | undefined
wait <T>(promise: Promise<T> | T, options?: WaitOptions & Partial<State>) => Promise<T>
close () => Promise<void>
change (newState: Partial<State>) => void

Instance Properties

Property(Attribute) Reactive Type
removed Promise<unknown>

Other

Type Value
CSS State modal