Basically, I'm trying to add a confirmation before closing an ant modal in Vue to make sure user wants to discard the changes made. so, the idea is to disable the default behavior of closing the modal and trigger in only in certain scenarios.
I tried the following:
on the a-modal tag: @cancel="handleCancel"
a-modal
@cancel="handleCancel"
and in the methods: handleCancel(e) { e.stopPropagation(); e.preventDefault(); } but didn't seem to work
handleCancel(e) { e.stopPropagation(); e.preventDefault(); }
2.1m questions
2.1m answers
60 comments
57.0k users