I have this code :
JavaScript
x
16
16
1
<sepa-modal
2
ref="sepaModal"
3
/>
4
<b-card
5
id="show-btn"
6
class="card-modal"
7
@click="openSepaModal()"
8
>
9
</b-card>
10
11
12
openSepaModal() {
13
console.log(this.$refs);
14
this.$refs.sepaModal.show();
15
},
16
SepaModal :
JavaScript
1
12
12
1
<b-modal
2
class="sepa-modal-edit"
3
id="sepaModal"
4
centered
5
top
6
no-fade
7
static
8
size="lg"
9
ref="modal"
10
hide-footer>
11
..
12
I have the error : Error in v-on handler: "TypeError: this.$refs.sepaModal.open is not a function"
. I tried with this.$refs.sepaModal.show();
(the same error). Very strange bacause I put a console.log and I have sepaModal
in refs
. Can you help me please ? Thx in advance
Advertisement
Answer
JavaScript
1
2
1
this.$refs.sepaModal.$refs.modal.show();
2