0👍
Your question is hard to understand.
What will the 2 second buttons do? using v-show
and v-if/else
<template>
<section>
<div v-show="showModal" class="modal">
<button @click="save">Save</button>
</div>
<div v-if="saved">
<button>button Return</button>
<button>button on sale</button>
</div>
<div else>
<button @click="toggleModal">On-progress</button>
</div>
</section>
</template>
<script>
export default {
data() {
return {
saved: false,
showModal: false,
};
},
methods: {
toggleModal() {
this.showModal = !this.showModal;
},
save() {
this.saved = true;
this.toggleModal();
},
},
};
</script>
Source:stackexchange.com