code.js 703 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. Vue.component('modal', {
  2. methods: {
  3. },
  4. template: `
  5. <div class="modal is-active">
  6. <div class="modal-background"></div>
  7. <div class="modal-card">
  8. <header class="modal-card-head">
  9. <p class="modal-card-title">
  10. <slot name="header"></slot>
  11. </p>
  12. <button class="delete"></button>
  13. </header>
  14. <section class="modal-card-body">
  15. <slot>Default body</slot>
  16. </section>
  17. <footer class="modal-card-foot">
  18. <slot name="footer">
  19. <a class="button is-primary">OK</a>
  20. <a class="button">Cancel</a>
  21. </slot>
  22. </footer>
  23. </div>
  24. </div>
  25. `,
  26. });
  27. const app = new Vue({
  28. el: '#root',
  29. data: {
  30. },
  31. methods: {
  32. }
  33. });