index.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <el-dialog
  3. title="超链接"
  4. :visible.sync="iframeDialog"
  5. :width="dialogW"
  6. :modal="true"
  7. :modal-append-to-body="false"
  8. :appen-to-body="true"
  9. class="bs-dialog-wrap bs-el-dialog"
  10. @close="close"
  11. >
  12. <div class="el-dialog-div" :style="{height: dialogH}">
  13. <iframe
  14. :src="url"
  15. width="100%"
  16. height="100%"
  17. style="border: none;margin: -2px 0"
  18. />
  19. </div>
  20. </el-dialog>
  21. </template>
  22. <script>
  23. import { mapMutations } from 'vuex'
  24. export default {
  25. name: 'Iframe',
  26. props: {
  27. },
  28. data () {
  29. return {
  30. }
  31. },
  32. computed: {
  33. config: {
  34. get () {
  35. return this.$store.state.bigScreen.activeItemConfig
  36. },
  37. set () {
  38. }
  39. },
  40. url () {
  41. return this.config?.customize?.url || ''
  42. },
  43. dialogW () {
  44. return this.config?.customize?.dialogW + 'px' || '1000px'
  45. },
  46. dialogH () {
  47. return this.config?.customize?.dialogH + 'px' || '500px'
  48. },
  49. iframeDialog: {
  50. get () {
  51. return this.$store.state.bigScreen.iframeDialog
  52. },
  53. set () {
  54. }
  55. }
  56. },
  57. mounted () {
  58. },
  59. methods: {
  60. ...mapMutations('bigScreen', ['changeIframeDialog']),
  61. close () {
  62. this.changeIframeDialog(false)
  63. }
  64. }
  65. }
  66. </script>
  67. <style lang="scss" scoped>
  68. .el-dialog-div{
  69. overflow: auto;
  70. }
  71. </style>