반응형
Bootstrap-vue 모달 3회 오픈
bootstrap-vue 패키지를 사용하고 있습니다.일부 컴포넌트에는 3개의 카드 플립 컴포넌트가 있습니다.
<b-row>
<b-col lg="4">
<card-flip :order="'fifth'"></card-flip>
</b-col>
<b-col lg="4">
<card-flip :order="'sixth'"></card-flip>
</b-col>
<b-col lg="4">
<card-flip :order="'seventh'"></card-flip>
</b-col>
</b-row>
그리고 이 카드 플립 컴포넌트 안에는 3개의 다른 버튼이 표시됩니다.:order
소품:
<template>
<!-- some not related content -->
<template v-if="order === 'fifth'">
<button class="card-flip__button card-flip__button--2"
v-b-modal.modalStandard="">
Sprawdź ofertę1
</button>
</template>
<template v-if="order === 'sixth'">
<button class="card-flip__button card-flip__button--2"
v-b-modal.modalPremium="">
Sprawdź ofertę2
</button>
</template>
<template v-if="order === 'seventh'">
<button class="card-flip__button card-flip__button--2"
v-b-modal.modalPremiumPlus="">
Sprawdź ofertę3
</button>
</template>
<modal-standard></modal-standard>
<modal-premium></modal-premium>
<modal-premium-plus></modal-premium-plus>
</template>
나 이거 쓰고 있어template
불필요한 div를 생성하지 않도록 구문을 지정합니다.
그리고 문제는 이 버튼 중 몇 개를 클릭하면 이전 버튼 위에 올바른 모달(modal)이 3번 열린다는 것입니다.
에 올바른 ID를 추가합니다.<b-modal>
그 안에modal-*
구성 요소들.
이것은 각 모달은 카드 플립마다 1개씩 3회 렌더링되기 때문입니다.또한 다음 항목을 추가해야 합니다.v-if="order === 'fifth'"
각 모달에 대해서도, 카드 교환 템플릿의 각 모달에 대해 etc를 참조해 주세요.
언급URL : https://stackoverflow.com/questions/52173978/bootstrap-vue-modal-open-three-times
반응형
'programing' 카테고리의 다른 글
디스패치 수신이 값으로 정의되지 않았습니다. (0) | 2022.06.27 |
---|---|
파일에 대해 DragEnd 이벤트가 발생하지 않음 (0) | 2022.06.27 |
Java에서는 선행 0을 유지하면서 바이트 배열을 16진수 문자열로 변환하려면 어떻게 해야 합니까? (0) | 2022.06.27 |
Vue.js를 사용한 계산 상태 및 변환 상태 문제 (0) | 2022.06.27 |
컴파일 시 -pthread 플래그의 중요성 (0) | 2022.06.27 |