1 line
14 KiB
Plaintext
1 line
14 KiB
Plaintext
|
{"version":3,"file":"UserPost.js","sources":["../../../../../../src/pages/space/components/UserPost.vue","../../../../../../uniComponent:/RDovQXBwL1dvcmsvYWRkci9hY2RyLXVpL3NyYy9wYWdlcy9zcGFjZS9jb21wb25lbnRzL1VzZXJQb3N0LnZ1ZQ"],"sourcesContent":["<template>\r\n <view class=\"user-post relative\">\r\n <!-- 这里是关注功能 -->\r\n <view v-if=\"post.isFollowed != undefined\" class=\"absolute top-2 right-2 space-x-2\">\r\n <!-- 实心按钮 - 关注+ -->\r\n <button\r\n @click=\"follow\"\r\n v-if=\"!post.isFollowed\"\r\n class=\"bg-amber-500 text-white rounded w-16 h-8 text-size-14px\"\r\n >\r\n 关注+\r\n </button>\r\n <!-- 空心按钮 - 取消关注 -->\r\n <button @click=\"unfollow\" v-else class=\"border border-amber-500 text-amber-500 rounded\">\r\n 取消关注\r\n </button>\r\n </view>\r\n\r\n <view class=\"user-info\">\r\n <image :src=\"imgUrl(post.avatar)\" alt=\"avatar\" class=\"avatar\"></image>\r\n <view class=\"user-details\">\r\n <view class=\"user-name\">{{ post.username }}</view>\r\n <view class=\"location\">{{ post.location }}</view>\r\n </view>\r\n </view>\r\n <view class=\"time\">{{ post.time }}</view>\r\n <view class=\"images-grid\">\r\n <wd-img\r\n :radius=\"8\"\r\n mode=\"center\"\r\n :enable-preview=\"true\"\r\n v-for=\"(image, index) in post.images\"\r\n :key=\"index\"\r\n :src=\"imgUrl(image)\"\r\n :alt=\"image\"\r\n class=\"post-image\"\r\n />\r\n </view>\r\n <view class=\"post-content\">\r\n <view>{{ post.content }}</view>\r\n </view>\r\n <view class=\"actions\">\r\n <view class=\"action-item\">\r\n <image\r\n v-if=\"!action.likes\"\r\n @click=\"like\"\r\n class=\"icon\"\r\n :src=\"imgUrl('@/static/space/thumbs.svg')\"\r\n mode=\"scaleToFill\"\r\n />\r\n <image\r\n v-else\r\n @click=\"unlike\"\r\n class=\"icon\"\r\n :src=\"imgUrl('@/static/space/favorites.png')\"\r\n mode=\"scaleToFill\"\r\n />\r\n <text>{{ post.likes || '0' }}</text>\r\n </view>\r\n <view class=\"action-item\">\r\n <image\r\n v-if=\"!action.favorites\"\r\n @click=\"favorite\"\r\n class=\"icon\"\r\n :src=\"imgUrl('@/static/space/like.svg')\"\r\n mode=\"scaleToFill\"\r\n />\r\n <image\r\n v-else\r\n @click=\"unfavorite\"\r\n class=\"icon\"\r\n :src=\"imgUrl('@/static/space/likes-on.png')\"\r\n mode=\"scaleToFill\"\r\n />\r\n <text>{{ post.favorites || '0' }}</text>\r\n </view>\r\n <view class=\"action-item\">\r\n <image\r\n @click=\"popAction\"\r\n class=\"icon\"\r\n :src=\"imgUrl('@/static/space/comment.svg')\"\r\n mode=\"scaleToFill\"\r\n />\r\n <text>{{ post.comments || '0' }}</text>\r\n </view>\r\n </view>\r\n <!-- 这里是评论区 -->\r\n <view class=\"bg-gray-100\" v-if=\"isPop\">\r\n <view v-if=\"comments.total > 0\">\r\n <view\r\n v-for=\"(comment, index) in comments.records\"\r\n @click=\"beComment(comment)\"\r\n :key=\"comment.id\"\r\n class=\"w-full mx-auto bg-white rounded-lg p-1 flex items-start\"\r\n >\r\n <image\r\n :src=\"imgUrl(comment.avatar)\"\r\n class=\"w-12 h-12 rounded-full mr-4\"\r\n mode=\"aspectFill\"\r\n />\r\n <view class=\"flex-grow\">\r\n <text class=\"font-bold text-lg txt w-40\">{{ comment.userName }}</text>\r\n <view class=\"text-sm text-gray-800 mt-2\">\r\n {{ comment.content }}\r\n </view>\r\n <view class=\"text-xs text-gray-500 mt-2 flex items-center\">\r\n <text>{{ comment.createdTime }}</text>\r\n <text class=\"mx-2\">•</text>\r\n <text>
|