混凝土运输管理微信小程序、替班
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.

101 lines
1.6 KiB

1 week ago
  1. <template>
  2. <view class="b-relative">
  3. <view class="mask" :class="{ 'active':!!show }" @click="close" v-if="!!show"></view>
  4. <view class="iu b-relative" :class="{ 'active':!!show }">
  5. <view class="it">查看示例</view>
  6. <view class="itc" @click="close">关闭</view>
  7. <view class="ii" v-if="!url"></view>
  8. <view class="ii" v-if="url">
  9. <image class="ii" :src="url" mode="widthFix"></image>
  10. </view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. data() {
  17. return {
  18. }
  19. },
  20. methods: {
  21. close(){
  22. this.$emit("close")
  23. }
  24. },
  25. props: {
  26. show: {
  27. type: Boolean,
  28. required: false,
  29. default: false
  30. },
  31. url: {
  32. type: String,
  33. required: true
  34. }
  35. }
  36. }
  37. </script>
  38. <style>
  39. .mask{
  40. content: ' ';
  41. width: 100vw;
  42. height: 100vh;
  43. background-color: rgba(51, 51, 51, 0.8);
  44. position: fixed;
  45. top: 0;
  46. left: 0;
  47. z-index: 999;
  48. opacity: 0;
  49. }
  50. .mask.active{
  51. opacity: 1;
  52. }
  53. .iu{
  54. width: calc(100vw - 88rpx);
  55. min-height: 342rpx;
  56. padding: 44rpx;
  57. background-color: #FFF;
  58. position: fixed;
  59. bottom: 0;
  60. left: 0;
  61. z-index: 1000;
  62. transform: translateY(100%);
  63. transition: .2s ease-in;
  64. }
  65. .iu.active{
  66. transform: translateY(0);
  67. }
  68. .it{
  69. font-size: 32rpx;
  70. height: 72rpx;
  71. line-height: 72rpx;
  72. color: #111;
  73. font-weight: normal;
  74. line-height: normal;
  75. letter-spacing: 0em;
  76. }
  77. .itc{
  78. font-size: 28rpx;
  79. line-height: 72rpx;
  80. color: #888;
  81. position: absolute;
  82. right: 44rpx;
  83. top: 28rpx;
  84. }
  85. .ii{
  86. width: 670rpx;
  87. min-height: 342rpx;
  88. border-radius: 16rpx;
  89. }
  90. .ic{
  91. width: 110rpx;
  92. height: 110rpx;
  93. position: absolute;
  94. top: calc(50% - 55rpx);
  95. left: calc(50% - 55rpx);
  96. }
  97. </style>