vue-mvvm / toast / useToastControl
useToastControl()
ts
function useToastControl<Options, Instance>(cls): Instance;Binds a ToastControl to the current View.
Type Parameters
Options
Options extends ToastOptions
Instance
Instance extends ToastControl<Options>
The type of the ToastControl.
Parameters
cls
ToastControlConstructor<Options, Instance>
The ViewModel class that should be bound.
Returns
Instance
The ToastControl instance passed to the component.
Throws
HookUsageError if called outside of a component's setup function.
Throws
MissingComponentMetadataError if the component is missing metadata.
Throws
DialogControlMismatchError if the provided control is not an instance of the given class.