app-prompt-box.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <template>
  2. <view class="app-prompt-box">
  3. <view class="app-content">
  4. <text class="app-title">提示</text>
  5. <view class="app-text">
  6. {{text}}
  7. </view>
  8. <view class="app-buttons dir-left-nowrap">
  9. <app-form-id>
  10. <view class="app-button app-close" @click="close(false)">取消</view>
  11. </app-form-id>
  12. <view class="app-line"></view>
  13. <app-form-id>
  14. <view class="app-button app-sure" @click="close(true)">确认</view>
  15. </app-form-id>
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. name: 'app-prompt-box',
  23. props: {
  24. text: {
  25. type: String,
  26. }
  27. },
  28. methods: {
  29. close(boolean) {
  30. this.$emit('click', boolean);
  31. }
  32. }
  33. }
  34. </script>
  35. <style scoped lang="scss">
  36. .app-prompt-box {
  37. width: 100%;
  38. height: 100%;
  39. position: fixed;
  40. top: 0;
  41. left: 0;
  42. background-color: rgba(153, 153, 153, 0.3);
  43. z-index: 1500;
  44. .app-content {
  45. width: #{620rpx};
  46. border-radius: #{8rpx};
  47. background-color: white;
  48. position: absolute;
  49. top: 50%;
  50. left: 50%;
  51. transform: translate(-50%, -50%);
  52. text-align: center;
  53. .app-title {
  54. display: inline-block;
  55. font-size: #{32rpx};
  56. margin-top: #{40rpx};
  57. margin-bottom: #{64rpx};
  58. color: #353535;
  59. text-align: center;
  60. }
  61. .app-text {
  62. font-size: #{32rpx};
  63. color: #353535;
  64. text-align: center;
  65. margin-bottom: #{64rpx};
  66. }
  67. .app-buttons {
  68. border-top: #{1rpx} solid #e2e2e2;
  69. .app-button {
  70. font-size: #{32rpx};
  71. width: #{309.5rpx};
  72. height: #{88rpx};
  73. line-height: #{88rpx};
  74. text-align: center;
  75. }
  76. .app-sure {
  77. color: #ff4544;
  78. }
  79. .app-close {
  80. color: #666666;
  81. }
  82. .app-line {
  83. width: #{1rpx};
  84. height: #{32rpx};
  85. margin-top: #{30rpx};
  86. color: #e2e2e2;
  87. }
  88. }
  89. }
  90. }
  91. </style>