优化修改
This commit is contained in:
@@ -261,6 +261,9 @@ const getComment = () => {
|
||||
})
|
||||
}
|
||||
|
||||
let picture = ref({})
|
||||
|
||||
|
||||
// 监听 detailsToken 的变化
|
||||
watch(
|
||||
detailsToken,
|
||||
@@ -268,13 +271,13 @@ watch(
|
||||
if (newValue !== oldValue) {
|
||||
commentPage.value = 1
|
||||
commentList.value = []
|
||||
picture.value = {}
|
||||
getComment()
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
let picture = ref({})
|
||||
|
||||
const maxSize = 20 * 1024 * 1024 // 20MB
|
||||
|
||||
@@ -324,7 +327,11 @@ const emojiData = ["😀", "😁", "😆", "😅", "😂", "😉", "😍", "🥰
|
||||
const openEmoji = (index, i) => {
|
||||
if (i != undefined) commentList.value[index].child[i]["emojiState"] = true
|
||||
else if (index != undefined) commentList.value[index]["emojiState"] = true
|
||||
else emojiState.value = true
|
||||
else {
|
||||
closeEmoji()
|
||||
closeAnswerCommentsChild()
|
||||
emojiState.value = true
|
||||
}
|
||||
|
||||
emojiMaskState.value = true
|
||||
}
|
||||
@@ -352,11 +359,9 @@ defineExpose({
|
||||
const selectEmoji = (key, index, i) => {
|
||||
closeEmoji()
|
||||
if (i != undefined) {
|
||||
// const commentInput = document.querySelector(".comments-box .input-textarea")
|
||||
if (!commentList.value[index]["child"][i]["commentInput"]) commentList.value[index]["child"][i]["commentInput"] = ""
|
||||
commentList.value[index]["child"][i]["commentInput"] += key
|
||||
} else if (index != undefined) {
|
||||
// const commentInput = document.querySelector(".comments-box .input-textarea")
|
||||
if (!commentList.value[index]["commentInput"]) commentList.value[index]["commentInput"] = ""
|
||||
commentList.value[index]["commentInput"] += key
|
||||
} else {
|
||||
@@ -431,8 +436,6 @@ const submitAnswerComments = (index, i) => {
|
||||
image = picture.value
|
||||
}
|
||||
|
||||
console.log("content", content, "1111", commentList.value[index])
|
||||
|
||||
$ajax("/api/comment/submit", {
|
||||
content,
|
||||
token,
|
||||
|
||||
Reference in New Issue
Block a user