Drupal 8 Site using Vue
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
446 B

  1. document.addEventListener('DOMContentLoaded', () => {
  2. 'use strict';
  3. drupalSettings.modal = new Vue({ // eslint-disable-line no-unused-vars, no-undef, max-len
  4. el: '#vue-modal',
  5. data: {
  6. showModal: false,
  7. content: 'Default Modal Text',
  8. },
  9. methods: {
  10. show(content) {
  11. this.showModal = true;
  12. this.content = content;
  13. },
  14. close() {
  15. this.showModal = false;
  16. }
  17. }
  18. });
  19. });