金诚优选前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

66 lines
1.1 KiB

  1. <template>
  2. <view class="content" v-if="value">
  3. <view class="box">
  4. <image class="img" src="https://picsum.photos/200" mode="aspectFill" @click="clickAd"></image>
  5. <view class="close" @click="close">
  6. <text class="lf-iconfont icon-shanchu"></text>
  7. </view>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. props: {
  14. value: {
  15. type: Boolean,
  16. default: true
  17. }
  18. },
  19. created(){
  20. },
  21. methods: {
  22. clickAd(){
  23. this.$msg('您点击了广告图')
  24. },
  25. close(){
  26. this.$emit('update:value', false);
  27. }
  28. }
  29. }
  30. </script>
  31. <style lang="scss" scoped="scoped">
  32. .content{
  33. width: 100vw;
  34. height: 100vh;
  35. display: flex;
  36. justify-content: center;
  37. align-items: center;
  38. position: fixed;
  39. left: 0;
  40. top: 0;
  41. .box{
  42. width: 600rpx;
  43. height: max-content;
  44. .img{
  45. width: 600rpx;
  46. height: 840rpx;
  47. border: 1rpx solid #979797;
  48. }
  49. .close{
  50. width: 70rpx;
  51. height: 70rpx;
  52. margin: 34rpx auto 0;
  53. border-radius: 50%;
  54. display: flex;
  55. justify-content: center;
  56. align-items: center;
  57. text{
  58. font-size: 80rpx;
  59. }
  60. }
  61. }
  62. }
  63. </style>