inbound_info_modal.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {{define "inboundInfoModal"}}
  2. {{template "component/inboundInfo"}}
  3. <a-modal id="inbound-info-modal" v-model="infoModal.visible" title="详细信息" @ok="infoModal.ok"
  4. :closable="true" :mask-closable="true"
  5. ok-text="复制链接" cancel-text='{{ i18n "close" }}'>
  6. <inbound-info :db-inbound="dbInbound" :inbound="inbound"></inbound-info>
  7. </a-modal>
  8. <script>
  9. const infoModal = {
  10. visible: false,
  11. inbound: new Inbound(),
  12. dbInbound: new DBInbound(),
  13. ok() {
  14. },
  15. show(dbInbound) {
  16. this.inbound = dbInbound.toInbound();
  17. this.dbInbound = new DBInbound(dbInbound);
  18. this.visible = true;
  19. },
  20. close() {
  21. infoModal.visible = false;
  22. },
  23. };
  24. new Vue({
  25. delimiters: ['[[', ']]'],
  26. el: '#inbound-info-modal',
  27. data: {
  28. infoModal,
  29. get dbInbound() {
  30. return this.infoModal.dbInbound;
  31. },
  32. get inbound() {
  33. return this.infoModal.inbound;
  34. }
  35. },
  36. });
  37. </script>
  38. {{end}}