half way there
This commit is contained in:
parent
47ae19653a
commit
4a08cbf38d
2 changed files with 18 additions and 3 deletions
|
|
@ -91,11 +91,11 @@ export default {
|
||||||
},
|
},
|
||||||
openModal() {
|
openModal() {
|
||||||
const modal = Modal.getOrCreateInstance(document.getElementById(this.modalId));
|
const modal = Modal.getOrCreateInstance(document.getElementById(this.modalId));
|
||||||
modal.show();
|
modal?.show();
|
||||||
},
|
},
|
||||||
closeModal() {
|
closeModal() {
|
||||||
const modal = Modal.getInstance(document.getElementById(this.modalId));
|
const modal = Modal.getInstance(document.getElementById(this.modalId));
|
||||||
modal.hide();
|
modal?.hide();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
here
|
here
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<a href="#!" data-bs-toggle="modal" data-bs-target="#ModalName" aria-label="Modal window">Wow!!</a>
|
<a id="test" href="#!" aria-label="Modal window">Wow!!</a>
|
||||||
<siteFooter
|
<siteFooter
|
||||||
cmsWidgetName="SiteFooterWidget"
|
cmsWidgetName="SiteFooterWidget"
|
||||||
:isForwardActionDisabled="!meta.valid"
|
:isForwardActionDisabled="!meta.valid"
|
||||||
|
|
@ -64,6 +64,21 @@ export default {
|
||||||
alert("you clicked me!");
|
alert("you clicked me!");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/* mounted: (
|
||||||
|
() => {
|
||||||
|
const element = document.getElementById("test");
|
||||||
|
element.addEventListener("click", () => app.openModal("ModalName") )
|
||||||
|
}
|
||||||
|
),
|
||||||
|
*/
|
||||||
|
mounted() {
|
||||||
|
console.log(document.getElementById("test"))
|
||||||
|
console.log(this.openModal);
|
||||||
|
const element = document.getElementById("test");
|
||||||
|
const modalname = "ModalName";
|
||||||
|
const openModal = this.openModal;
|
||||||
|
element.addEventListener("click", () => openModal(modalname) )
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
bodyText() {
|
bodyText() {
|
||||||
return this.getCmsContent("ModalLink", "BodyText");
|
return this.getCmsContent("ModalLink", "BodyText");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue