fix:修改
This commit is contained in:
@@ -86,7 +86,7 @@
|
||||
<!-- 当前用户信息展示 -->
|
||||
<div class="user-info">
|
||||
<span class="nickname">{{ item.nickname }}</span>
|
||||
<span class="time">{{ item.time }}</span>
|
||||
<span class="time">{{ formatTime(item.time) }}</span>
|
||||
</div>
|
||||
|
||||
<!-- 回复内容模块 -->
|
||||
@@ -125,7 +125,7 @@
|
||||
<span class="reply-text">回复</span>
|
||||
<span class="target-name">@{{ reply.replyTo }}</span>
|
||||
</div>
|
||||
<span class="time">{{ reply.time }}</span>
|
||||
<span class="time">{{ formatTime(reply.time) }}</span>
|
||||
</div>
|
||||
<div class="content-body">{{ reply.content }}</div>
|
||||
<!-- 回复 删除功能 -->
|
||||
@@ -191,22 +191,17 @@
|
||||
import { ref, reactive } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import EmojiPicker from "./EmojiPicker.vue";
|
||||
import {
|
||||
Picture,
|
||||
Paperclip,
|
||||
Promotion,
|
||||
ChatDotSquare,
|
||||
Delete,
|
||||
} from "@element-plus/icons-vue";
|
||||
import NameAvatar from "@/components/nameAvatar/index.vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { useUserStore } from "@/store";
|
||||
import { useRelativeTime } from '@/hooks/useRelativeTime'
|
||||
const { formatTime } = useRelativeTime()
|
||||
const userStore = useUserStore();
|
||||
const { t } = useI18n();
|
||||
// 当前用户信息
|
||||
const currentUser = computed(() => {
|
||||
return {
|
||||
nickname: userStore.userInfo.nickname,
|
||||
nickname: userStore.userInfo.username,
|
||||
avatar: userStore.userInfo.avatar,
|
||||
};
|
||||
});
|
||||
@@ -216,13 +211,14 @@ const activeReply = reactive({ parentId: null, targetName: "" });
|
||||
const mainInput = ref("");
|
||||
const replyInput = ref("");
|
||||
const loading = ref(true); //当前骨架屏显示
|
||||
// 评论数据
|
||||
const commentData = ref([
|
||||
{
|
||||
id: 1,
|
||||
nickname: "李星倩",
|
||||
avatar: "",
|
||||
content: "已完成ROI测算,请审核。",
|
||||
time: "10分钟前",
|
||||
time: "2023-10-27T14:30:00",
|
||||
canDelete: true,
|
||||
children: [
|
||||
{
|
||||
@@ -231,7 +227,7 @@ const commentData = ref([
|
||||
replyTo: "李星倩",
|
||||
avatar: "https://api.dicebear.com/7.x/avataaars/svg?seed=2",
|
||||
content: "收到,数据已入库,我马上看下。",
|
||||
time: "刚刚",
|
||||
time: 1767604936684,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -271,9 +267,11 @@ const onSelectEmoji = (emoji, type) => {
|
||||
}
|
||||
};
|
||||
|
||||
// 取消评论
|
||||
const cancelReply = () => {
|
||||
activeReply.groupId = null;
|
||||
};
|
||||
|
||||
// @ 识别解析函数
|
||||
const parseMention = (text) => {
|
||||
if (!text) return "";
|
||||
@@ -297,7 +295,7 @@ const submitMainComment = () => {
|
||||
id: Date.now(),
|
||||
...currentUser.value,
|
||||
content: mainInput.value,
|
||||
time: "刚刚",
|
||||
time: new Date().valueOf(),
|
||||
canDelete: true,
|
||||
children: [],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user