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

84 lines
2.1 KiB

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