index.vue 1.3 KB

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