wall_reply.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <view class="dialog-overlay" v-if="visible" @click="close" :style="{top: navH + 'rpx'}">
  3. <view class="dialog-content" @click.stop :style="{top: navH + 'rpx'}">
  4. <view class="uni-textarea">
  5. <textarea class="text-reply pl-10 pt-10 mb-20" placeholder="我来评论" />
  6. </view>
  7. <input class="input-reply flex-y-center pl-10 mb-20" placeholder="昵称" />
  8. <view class="flex-center">
  9. <button class="bg-color pt-20 pb-20" @click="close">保存</button>
  10. </view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. import {
  16. mapGetters
  17. } from "vuex";
  18. export default {
  19. data() {
  20. return {
  21. visible: false,
  22. navH: '',
  23. }
  24. },
  25. computed: mapGetters(['globalData']),
  26. created() {
  27. // #ifdef MP || APP-PLUS
  28. // 获取导航高度;
  29. this.navH = this.globalData.navHeight;
  30. // #endif
  31. // #ifdef H5
  32. this.navH = 80;
  33. // #endif
  34. },
  35. methods: {
  36. close() {
  37. this.$emit('update:visible', false);
  38. this.visible = false
  39. }
  40. }
  41. }
  42. </script>
  43. <style scoped lang="scss">
  44. .dialog-overlay {
  45. position: fixed;
  46. top: 0;
  47. left: 0;
  48. width: 100%;
  49. height: 100%;
  50. background-color: rgba(0, 0, 0, 0.5);
  51. overflow: hidden;
  52. display: flex;
  53. justify-content: center;
  54. align-items: center;
  55. animation: fadeIn 0.5s;
  56. z-index: 90;
  57. }
  58. .dialog-content {
  59. position: fixed;
  60. background-color: white;
  61. border-radius: 8px;
  62. padding: 20px;
  63. width: 100%;
  64. animation: slideDown 0.5s;
  65. }
  66. @keyframes slideDown {
  67. from {
  68. transform: translateY(-100%);
  69. }
  70. to {
  71. transform: translateY(0);
  72. }
  73. }
  74. @keyframes fadeIn {
  75. from {
  76. opacity: 0;
  77. }
  78. to {
  79. opacity: 1;
  80. }
  81. }
  82. .bg-color {
  83. background-color: $bg-color-primary;
  84. border-radius: 40rpx;
  85. width: 70%;
  86. color: #fff;
  87. }
  88. .text-reply {
  89. background-color: #F8F8FA;
  90. width: 100%;
  91. border-radius: 10rpx;
  92. box-sizing: border-box;
  93. }
  94. .input-reply {
  95. height: 70rpx;
  96. background-color: #F8F8FA;
  97. border-radius: 10rpx;
  98. }
  99. </style>