no message

This commit is contained in:
A1300399510
2024-01-29 11:53:50 +08:00
parent 66eb0364d6
commit a71920cf61
46 changed files with 364 additions and 325 deletions

View File

@@ -3,11 +3,11 @@
讨论
<span class="comment-amount">{{ commentComments || "" }}</span>
</div>
<div class="post-comment flexacenter" ref="postInputRef" :class="{ 'post-comment-focus': postCommentFocusState }" @click="loginJudgment()">
<!-- <div class=""> -->
<el-input class="post-input flex1" type="textarea" :autosize="postCommentFocusState" placeholder="说说你的想法或疑问…" v-model="commentInputTop" @blur="postCommentFocusBlur" @focus="postCommentFocusState = true"></el-input>
<!-- </div> -->
<!-- <div class="post-comment flexacenter" ref="postInputRef" :class="{ 'post-comment-focus': postCommentFocusState }" @click="loginJudgment()"> -->
<div class="post-comment" ref="postInputRef" :class="{ 'post-comment-focus': postCommentFocusState }" @click="loginJudgment()">
<div class="post-comment-input">
<el-input class="post-input flex1" type="textarea" :autosize="postCommentFocusState" :maxlength="500" show-word-limit placeholder="说说你的想法或疑问…" v-model="commentInputTop" @blur="postCommentFocusBlur" @focus="postCommentFocusState = true"></el-input>
</div>
<div class="post-ok flexcenter" @click="submitAnswerComments(commentInputTop)">发送</div>
</div>
@@ -38,7 +38,7 @@
<div class="comment-header flexacenter">
<div class="comment-header-left flexacenter">
<div class="comments-username" @click="openAvatarPopover(index)">{{ item["nickname"] }}</div>
<div class="comments-time">{{ handleDate(item["timestamp"]) }}</div>
<div class="comments-time">{{ item["timestampnow"] || handleDate(item["timestamp"]) }}</div>
<div class="comments-identity" v-if="item['isauthor']">作者</div>
<img class="comments-title" v-if="item['groupid'] === 14" src="@/assets/img/title.png" />
</div>
@@ -67,7 +67,6 @@
<!-- 子评论 -->
<div class="child-comments" v-if="item['child'].length > 0">
<div class="comment-item flexflex" v-for="(ite, i) in item['child']" :key="ite.id">
<!-- <img class="comment-avatar" :src="ite['avatar']" /> -->
<el-popover placement="bottom-start" :width="140" trigger="click" popper-class="avatar-box-popper" :show-arrow="false" v-model:visible="ite['popoverState']">
<template #reference>
<img class="comment-avatar" :src="ite['avatar']" />
@@ -88,7 +87,7 @@
<div class="comment-header flexacenter">
<div class="comment-header-left flexacenter">
<div class="comments-username" @click="openAvatarPopover(index, i)">{{ ite["nickname"] }}</div>
<div class="comments-time">{{ handleDate(ite["timestamp"]) }}</div>
<div class="comments-time">{{ ite["timestampnow"] || handleDate(ite["timestamp"]) }}</div>
<div class="comments-identity" v-if="ite['isauthor']">作者</div>
<img class="comments-title" v-if="ite['groupid'] == 14" src="@/assets/img/title.png" />
</div>
@@ -134,7 +133,7 @@
<Report v-if="reportAlertShow" :reportToken="reportToken"></Report>
<!-- 投票后自动评论 -->
<el-dialog class="default-popup automatic-reviews-popup" v-model="reviewsPopoverState" width="720px" align-center autosize>
<el-dialog class="default-popup automatic-reviews-popup" v-model="reviewsPopoverState" width="720px" align-center autosize :close-on-click-modal="false">
<div class="automatic-header">
<div class="automatic-title">说说您的投票理由</div>
<div class="automatic-have">已投{{ haveVotedValue }}</div>
@@ -295,6 +294,7 @@ const submitAnswerComments = (content, index, i) => {
let data = res.data
if (i != null) {
console.log("data", data)
let targetData = {
id: data["commentid"],
content,
@@ -306,7 +306,9 @@ const submitAnswerComments = (content, index, i) => {
},
voteoption: haveVotedValue.value || null,
...data,
...data.data
// ...data.data
timestampnow: "刚刚",
uin: data.data?.uin,
}
targetCommentList[index]["child"].unshift(targetData)
@@ -319,7 +321,9 @@ const submitAnswerComments = (content, index, i) => {
islike: 0,
likenum: 0,
...data,
...data.data,
// ...data.data,
timestampnow: "刚刚",
uin: data.data?.uin,
child: [],
voteoption: haveVotedValue.value || null,
}
@@ -480,7 +484,7 @@ const postCommentFocusBlur = () => {
postCommentFocusState.value = false
nextTick(() => {
let targetDom = refref.querySelector(".el-textarea__inner")
targetDom.style.height = ""
targetDom.style.height = "41px"
})
}, 200)
}
@@ -509,25 +513,35 @@ defineExpose({ changeCommentVoteoption, wipeCommentVoteoption, reviewsComment, b
margin-bottom: 30px;
margin-right: 30px;
transition: all 5s;
justify-content: space-between;
// justify-content: space-between;
overflow: hidden;
position: relative;
&.post-comment-focus {
// border-right-width: 1px;
flex-direction: column;
// // border-right-width: 1px;
.post-input {
/deep/ .el-textarea__inner {
width: 468px;
min-height: 148px !important;
min-height: 200px !important;
max-height: 80vh;
// height: 100% !important;
padding-bottom: 52px;
}
/deep/ .el-input__count {
bottom: 42px;
}
}
.post-ok {
align-self: flex-end;
height: 32px;
margin-bottom: 10px;
margin-right: 10px;
bottom: 10px;
right: 10px;
}
.post-comment-input {
width: 468px;
}
}
.post-comment-input {
width: 410px;
}
.post-input {
@@ -567,6 +581,9 @@ defineExpose({ changeCommentVoteoption, wipeCommentVoteoption, reviewsComment, b
cursor: pointer;
border-radius: 6px;
transition: all 0.5s;
position: absolute;
bottom: 0;
right: 0;
}
}

View File

@@ -30,7 +30,18 @@ let props = defineProps({
isNeedIssue: Boolean,
})
const goIssue = () => router.push("/publish")
let isNeedLogin = inject("isNeedLogin")
const goLogin = inject("goLogin")
const goIssue = () => {
if (isNeedLogin.value) {
goLogin()
return
}
// router.push(`/publish`)
goToURL(`/publish`)
}
</script>
<style lang="less" scoped>