mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
chore(Toast): improve clear method
This commit is contained in:
parent
6e6cfe5c65
commit
4ddf4e7018
@ -42,11 +42,7 @@ function createInstance() {
|
||||
const { instance, unmount } = mountComponent({
|
||||
setup() {
|
||||
const message = ref();
|
||||
const { open, state, toggle } = usePopupState();
|
||||
|
||||
const clear = () => {
|
||||
toggle(false);
|
||||
};
|
||||
const { open, state, close, toggle } = usePopupState();
|
||||
|
||||
const onClosed = () => {
|
||||
if (allowMultiple) {
|
||||
@ -61,8 +57,8 @@ function createInstance() {
|
||||
|
||||
return {
|
||||
open,
|
||||
clear,
|
||||
state,
|
||||
clear: close,
|
||||
toggle,
|
||||
message,
|
||||
onClosed,
|
||||
|
@ -26,6 +26,7 @@ export function usePopupState() {
|
||||
|
||||
return {
|
||||
open,
|
||||
close,
|
||||
state,
|
||||
toggle,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user