瑶都万能墙
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.

85 lines
2.1 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="commemt">
  3. <view class="comment-list">
  4. <commentItem v-for="(item, index) in list" :key="index" :parentId="item.id" :sourceType="params.type"
  5. :sourceId="params.orderId" :item="item" />
  6. </view>
  7. <view class="submit-box">
  8. <view class="top">
  9. <button class="share" open-type="share">
  10. <uv-icon color="#00cf05" size="50rpx" name="weixin-fill"></uv-icon>
  11. </button>
  12. <input type="text" disabled @click="openCommentPublish"
  13. :placeholder="'评论给' + params.name || '他'" />
  14. </view>
  15. </view>
  16. <!-- 评论发布组件 -->
  17. <commentPublish ref="commentPublish" :params="params" :placeholder="'评论给' + params.name || '他'" @success="handleCommentSuccess" />
  18. </view>
  19. </template>
  20. <script>
  21. import commentItem from './commentItem.vue'
  22. import commentPublish from './commentPublish.vue'
  23. export default {
  24. components: {
  25. commentItem,
  26. commentPublish,
  27. },
  28. props: ['list', 'params'],
  29. data() {
  30. return {}
  31. },
  32. methods: {
  33. // 打开评论发布弹窗
  34. openCommentPublish() {
  35. this.$refs.commentPublish.open()
  36. },
  37. // 评论发布成功回调
  38. handleCommentSuccess() {
  39. this.$emit('getData')
  40. }
  41. }
  42. }
  43. </script>
  44. <style scoped lang="scss">
  45. .commemt {
  46. padding-bottom: env(safe-area-inset-bottom);
  47. }
  48. .comment-list {
  49. margin-top: 20rpx;
  50. padding-bottom: 150rpx;
  51. }
  52. .submit-box {
  53. position: fixed;
  54. bottom: 0;
  55. left: 0;
  56. background-color: #fff;
  57. width: 100%;
  58. box-shadow: 0 0 6rpx 6rpx #00000011;
  59. padding-bottom: env(safe-area-inset-bottom);
  60. .top {
  61. align-items: center;
  62. display: flex;
  63. justify-content: center;
  64. input {
  65. background-color: #f3f3f3;
  66. width: 460rpx;
  67. height: 40rpx;
  68. border-radius: 40rpx;
  69. margin: 20rpx;
  70. padding: 20rpx 30rpx;
  71. font-size: 28rpx;
  72. }
  73. }
  74. }
  75. </style>