JumpWeb.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <template>
  2. <div class="iframeContent" v-show="show">
  3. <div class="back" @click="back"></div>
  4. <iframe :src="url" frameborder="0"></iframe>
  5. </div>
  6. </template>
  7. <script>
  8. export default {
  9. data() {
  10. return {
  11. url: '',
  12. show: false
  13. }
  14. },
  15. methods: {
  16. back() {
  17. this.$store.commit("changeJumpUrl", "");
  18. this.$store.commit("changeIframeJudge", false);
  19. }
  20. },
  21. computed: {
  22. storeUrl() {
  23. return this.$store.state.jumpUrl
  24. },
  25. iframeJudge() {
  26. return this.$store.state.iframeJudge
  27. }
  28. },
  29. watch: {
  30. storeUrl(newVal, oldVal) {
  31. this.url = newVal;
  32. },
  33. iframeJudge(newVal, oldVal) {
  34. this.show = newVal;
  35. }
  36. }
  37. }
  38. </script>
  39. <style lang="less" scoped>
  40. .iframeContent {
  41. position: absolute;
  42. top: 0px;
  43. left: 0px;
  44. width: 100%;
  45. height: 100%;
  46. z-index: 100;
  47. background: #ffffff;
  48. iframe {
  49. width: 100%;
  50. height: 100%;
  51. }
  52. .back {
  53. width: 32px;
  54. height: 32px;
  55. margin: 10px 20px;
  56. background: #c5c5c5 url(~@/assets/img/tool/close.png) center center / 60% 60% no-repeat;
  57. position: absolute;
  58. top: 0px;
  59. right: 0px;
  60. z-index: 999;
  61. border-radius: 32px;
  62. }
  63. }
  64. </style>