prince_rule.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <view class="cu-modal" :class="{'show': visible}">
  3. <view class="mask" @click="close"></view>
  4. <view class="cu-dialog" style="background-color: transparent; width:100%">
  5. <view class="relative wrapper">
  6. <image :src="resource.prince_rule_1" webp class="image" mode="widthFix" />
  7. </view>
  8. <view class="paddingT30 flex-align-center">
  9. <image :src="resource.close" class="x" @click="close" />
  10. </view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. import resource from '@/utils/resource'
  16. export default {
  17. data() {
  18. return {
  19. resource,
  20. visible: false
  21. }
  22. },
  23. methods: {
  24. show() {
  25. this.visible = true
  26. this.$parent.$parent.$parent.lock = true
  27. },
  28. close() {
  29. this.visible = false
  30. this.$parent.$parent.$parent.lock = false
  31. }
  32. }
  33. }
  34. </script>
  35. <style lang="scss" scoped>
  36. .mask {
  37. position: absolute;
  38. left: 0;
  39. right: 0;
  40. top: 0;
  41. bottom: 0;
  42. }
  43. .wrapper {
  44. z-index: 1001;
  45. margin: 0 56rpx;
  46. .image {
  47. width: 100%;
  48. }
  49. }
  50. .x {
  51. width: 60rpx;
  52. height: 60rpx;
  53. }
  54. </style>