first commit
This commit is contained in:
16
node_modules/vant/es/composables/on-popup-reopen.mjs
generated
vendored
Normal file
16
node_modules/vant/es/composables/on-popup-reopen.mjs
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { inject, watch } from "vue";
|
||||
const POPUP_TOGGLE_KEY = Symbol();
|
||||
function onPopupReopen(callback) {
|
||||
const popupToggleStatus = inject(POPUP_TOGGLE_KEY, null);
|
||||
if (popupToggleStatus) {
|
||||
watch(popupToggleStatus, (show) => {
|
||||
if (show) {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
export {
|
||||
POPUP_TOGGLE_KEY,
|
||||
onPopupReopen
|
||||
};
|
||||
Reference in New Issue
Block a user