Closed xiongmao86 closed 2 years ago
Hi, @asvae, bootstrap-vue
is using plugin to implement and wire up modal message box. I try to wire up using plugin, and intent to implement vaModal building function using CreateVNode, Am I doing correctly?
Hi, @xiongmao86! We have similar logic in VaToast. You can find an example here.
We have been refactored plugins we use for better tree-shaking and SSR support. I think you can rebase to release/v1.4.0
branch.
Thank you @m0ksem, I was not sure that implementation is not regarded as using plugins.
We also need a composition hook for this feature.
@m0ksem, it seems modelValue
is turned into a Ref by setting stateful
prop as true. But once I click the triggering button, and either click OK
or Cancel
, or just click outside the modal, the modal will disappear. And when I click the triggering button again, it failed to response. It's strange.
@m0ksem, it seems
modelValue
is turned into a Ref by settingstateful
prop as true. But once I click the triggering button, and either clickOK
orCancel
, or just click outside the modal, the modal will disappear. And when I click the triggering button again, it failed to response. It's strange.
You can try to call show/hide methods instead of dealing with modelValue in stateful mode.
Sorry, @m0ksem, I don't know how to call show/hide method, and I wanted to put component under a parent component, but I don't know how to get a parent element of button triggering $vaModal.init
either. Can you help me with that?
@RVitaly1978, Thanks for finishing the pr, I really don't know how to implement it.
Description
Requesting va-modal with method, user can choose between to ways of using
va-modal
, for example you can bind building function as event listener, or adding inside .close #1216 close #1849
VaModalPlugin
useModal
hookTypes of changes