Cuando hago clic en Launch centered modal , espero que el modal oculte los botones x , cancel y showButton ok falso.
Después de hacer clic en el show button , se debe mostrar el botón del modal porque ahora el showButton es verdadero.
¿Cómo debería hacerlo?
aplicación.vue
<template> <div id="app"> <b-button vb-modal.modal-center>Launch centered modal</b-button> <b-modal id="modal-center" centered title="BootstrapVue"> <p class="my-4">Vertically centered modal!</p> <button @click="setShowButton">Show Button</button> </b-modal> </div> </template> <script> export default { name: "App", data() { return { showButton: false, }; }, methods: { setShowButton() { this.showButton = true; }, }, }; </script> <style> #app { text-align: center; color: #2c3e50; margin-top: 60px; } </style> codigosandbox
https://codesandbox.io/s/flamboyant-herschel-62wpt?file=/src/App.vue:0-587
Puede utilizar las propiedades hide-header-close y hide-footer . Documentado aquí. Documentos modales
<template> <div id="app"> <b-button vb-modal.modal-center>Launch centered modal</b-button> <b-modal id="modal-center" centered title="BootstrapVue" :hide-header-close="!this.showButton" :hide-footer="!this.showButton" > <p class="my-4">Vertically centered modal!</p> <button @click="setShowButton">Show Button</button> </b-modal> </div> </template> <script> export default { name: "App", data() { return { showButton: false, }; }, methods: { setShowButton() { this.showButton = true; }, }, }; </script> <style> #app { text-align: center; color: #2c3e50; margin-top: 60px; } </style>Ejemplo https://codesandbox.io/s/hungry-architecture-zrcqj?file=/src/App.vue