I have a simple bootstrap-vue modal
that contains an input text
. I want the Ok
button to not automatically close when I press it, so I use "prevent". Then I do some validation and then want to close it using the "hide" method. But doesn't work for me. The strange thing is that the show method works completely fine. I checked the documentation and can't find where the error is. How do I make the hide method work for me at that point? Here is my code.
Guardar gráfica personalizada Debe asignar un nombre a la gráfica personalizada que desea guardar.
我尝试的语法:
this.$refs.grfSaveModal.hide(); this.$refs['grfSaveModal'].hide(); this.$bvModal.hide('grfSaveModal');
Edit: Did you use v-model? Pass data to v-model and update it if needed
You have another option.
Or you can use the v-model attribute to control the Bootstrap Vue modal box.
Please checkDocumentation.
The problem is that you are trying to close it at the same moment while preventing it from closing.
You can solve this problem by deferring the hidden method to the next moment using
this.$nextTick
.