修改讨论加图片
This commit is contained in:
@@ -4,14 +4,43 @@
|
||||
讨论
|
||||
<span class="comment-amount">{{ commentComments || "" }}</span>
|
||||
</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" 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> -->
|
||||
|
||||
<div class="input-box" v-if="false">
|
||||
<div class="top flexflex">
|
||||
<img class="avatar" v-if="user.avatar" :src="user.avatar" />
|
||||
<textarea class="input-textarea flex1" maxlength="500" v-model="commentInputTop" @input="autoResize" @paste="handleInputPaste" placeholder="说说你的想法或疑问…"></textarea>
|
||||
</div>
|
||||
<div class="picture-box" v-if="picture.url">
|
||||
<div class="picture">
|
||||
<img class="close" @click="closeFileUpload()" src="@/assets/img/close-icon.png" />
|
||||
<img class="img" @click="handleAnswerText" :src="picture.base64 || picture.url" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom flexacenter">
|
||||
<div class="operate flexacenter">
|
||||
<div class="item" :class="{ 'pitch': emojiState }">
|
||||
<img class="icon" src="@/assets/img/smiling-face.png" @click="openEmoji()" alt="" />
|
||||
<div class="emoji-box">
|
||||
<div class="emoji-icon" v-for="item in emojiData" :key="item" @click="selectEmoji(item)">{{ item }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item flexacenter">
|
||||
<input class="file" type="file" @change="handleFileUpload($event)" accept=".png, .jpg, .jpeg" />
|
||||
<img class="icon" style="border-radius: 0;" src="@/assets/img/picture-icon.png" alt="" />
|
||||
<span class="file-hint">最多可上传1张图片,支持在输入框中直接粘贴图片。</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn" @click="submitAnswerComments(commentInputTop)">发送</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="empty-box" v-if="isEmptyState">
|
||||
@@ -166,6 +195,7 @@ let isNeedLogin = inject("isNeedLogin")
|
||||
const goLogin = inject("goLogin")
|
||||
|
||||
const props = defineProps({ token: String })
|
||||
const userInfoWin = inject("userInfoWin")
|
||||
|
||||
watch(
|
||||
() => props.token,
|
||||
@@ -175,6 +205,12 @@ watch(
|
||||
|
||||
onMounted(() => window.addEventListener("scroll", handleScroll))
|
||||
|
||||
onMounted(() => {
|
||||
setInterval(() => {
|
||||
console.log("userInfoWin", userInfoWin.value)
|
||||
}, 2000)
|
||||
})
|
||||
|
||||
const sendMessage = inject("sendMessage")
|
||||
const TAHomePage = inject("TAHomePage")
|
||||
|
||||
@@ -507,422 +543,9 @@ defineExpose({ changeCommentVoteoption, wipeCommentVoteoption, reviewsComment, b
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.comment-box {
|
||||
padding-top: 22px;
|
||||
padding-left: 42px;
|
||||
}
|
||||
.comment-title {
|
||||
font-weight: 650;
|
||||
color: #000000;
|
||||
font-size: 16px;
|
||||
margin-bottom: 16px;
|
||||
.comment-amount {
|
||||
color: #555;
|
||||
font-weight: 400;
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.post-comment {
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
border: 1px solid rgba(215, 215, 215, 1);
|
||||
// border-right-width: 0;
|
||||
border-radius: 6px;
|
||||
margin-bottom: 30px;
|
||||
margin-right: 30px;
|
||||
transition: all 5s;
|
||||
// justify-content: space-between;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
&.post-comment-focus {
|
||||
// // border-right-width: 1px;
|
||||
.post-input {
|
||||
/deep/ .el-textarea__inner {
|
||||
width: 468px;
|
||||
min-height: 200px !important;
|
||||
max-height: 80vh;
|
||||
padding-bottom: 52px;
|
||||
}
|
||||
|
||||
/deep/ .el-input__count {
|
||||
display: block;
|
||||
// bottom: 42px;
|
||||
left: 10px;
|
||||
}
|
||||
}
|
||||
.post-ok {
|
||||
height: 32px;
|
||||
bottom: 10px;
|
||||
right: 10px;
|
||||
}
|
||||
.post-comment-input {
|
||||
width: 468px;
|
||||
}
|
||||
}
|
||||
|
||||
.post-comment-input {
|
||||
width: 410px;
|
||||
}
|
||||
|
||||
.post-input {
|
||||
background-color: transparent;
|
||||
font-size: 14px;
|
||||
resize: none;
|
||||
transition: all 0.5s;
|
||||
|
||||
&::placeholder {
|
||||
color: #aaaaaa;
|
||||
}
|
||||
&::-webkit-scrollbar {
|
||||
width: 0 !important;
|
||||
}
|
||||
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
border: none;
|
||||
|
||||
/deep/ .el-textarea__inner {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
resize: none;
|
||||
min-height: 60px !important;
|
||||
// height: 60px !important;
|
||||
padding: 10px;
|
||||
transition: all 0.5s;
|
||||
}
|
||||
|
||||
/deep/ .el-input__count {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.post-ok {
|
||||
width: 60px;
|
||||
height: 62px;
|
||||
background-color: var(--main-color);
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
border-radius: 6px;
|
||||
transition: all 0.5s;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.comment-list {
|
||||
margin-bottom: 78px;
|
||||
.comment-item {
|
||||
&:not(:first-of-type) {
|
||||
.comment-avatar {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.comment-header {
|
||||
padding-top: 10px;
|
||||
border-top: 1px dotted #d7d7d7;
|
||||
}
|
||||
}
|
||||
padding-right: 30px;
|
||||
.comment-avatar {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.comment-content {
|
||||
.comment-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.comment-header-left {
|
||||
font-size: 13px;
|
||||
|
||||
.comments-avatar {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-right: 10px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.comments-username {
|
||||
color: #555;
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.comments-time {
|
||||
color: #aaaaaa;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.comments-title {
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.comments-identity {
|
||||
font-size: 12px;
|
||||
color: #7f7f7f;
|
||||
padding: 0 3px;
|
||||
height: 20px;
|
||||
background-color: rgba(240, 242, 245, 1);
|
||||
border: 1px solid rgba(215, 215, 215, 1);
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
.comment-header-right {
|
||||
.menu-box {
|
||||
position: relative;
|
||||
|
||||
&:hover .report-box {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.menu-icon {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.report-box {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 24px;
|
||||
right: 0;
|
||||
width: 60px;
|
||||
height: 24px;
|
||||
background-color: rgba(246, 246, 246, 1);
|
||||
border: 1px solid rgba(215, 215, 215, 1);
|
||||
border-radius: 5px;
|
||||
font-size: 12px;
|
||||
color: #7f7f7f;
|
||||
cursor: pointer;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
width: 58px;
|
||||
height: 36px;
|
||||
position: absolute;
|
||||
top: -14px;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.comment-icon {
|
||||
width: 14px;
|
||||
height: 13px;
|
||||
margin-left: 30px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.like-box {
|
||||
font-size: 12px;
|
||||
color: #aaa;
|
||||
margin-left: 30px;
|
||||
cursor: pointer;
|
||||
|
||||
.like-icon {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.like-quantity {
|
||||
margin-left: 6px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.comment-text {
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
color: #333;
|
||||
margin-bottom: 10px;
|
||||
word-break: break-all;
|
||||
min-height: 22px;
|
||||
cursor: pointer;
|
||||
.comments-reply {
|
||||
color: #92a1bf;
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
|
||||
.alreadyVoted {
|
||||
font-size: 12px;
|
||||
color: #aaaaaa;
|
||||
background-color: rgba(246, 246, 246, 1);
|
||||
line-height: 17px;
|
||||
width: fit-content;
|
||||
margin-bottom: 15px;
|
||||
word-break: break-word;
|
||||
padding: 6px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.comments-input-masking {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
min-width: 1200px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.comments-input-box {
|
||||
margin-top: 13px;
|
||||
height: 0;
|
||||
transition: all 0.3s;
|
||||
position: relative;
|
||||
z-index: 11;
|
||||
|
||||
&.comments-input-box-show {
|
||||
height: 184px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
display: block;
|
||||
background-color: rgba(215, 215, 215, 1);
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
left: 21px;
|
||||
transform: rotate(45deg);
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.comments-input {
|
||||
border: 1px solid rgba(215, 215, 215, 1);
|
||||
background-color: #fff;
|
||||
|
||||
/deep/ textarea {
|
||||
height: 140px;
|
||||
padding: 10px;
|
||||
min-height: 40px !important;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/deep/ .el-input__count {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.operate-bottom {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.comments-input {
|
||||
flex: 1;
|
||||
border-color: #fff;
|
||||
border-radius: 8px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
transition: all 0.3s;
|
||||
|
||||
/deep/ textarea {
|
||||
border: none;
|
||||
outline: none;
|
||||
resize: none;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
padding: 0 10px;
|
||||
min-height: 0 !important;
|
||||
transition: all 0.2s;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/deep/ .el-textarea__inner {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/deep/ .el-input__count {
|
||||
left: 10px;
|
||||
bottom: -32px;
|
||||
width: fit-content;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.operate-bottom {
|
||||
justify-content: flex-end;
|
||||
display: none;
|
||||
transition: all 0.3s;
|
||||
|
||||
.comments-btn {
|
||||
width: 60px;
|
||||
height: 32px;
|
||||
border-radius: 6px;
|
||||
background-color: var(--main-color);
|
||||
font-size: 14px;
|
||||
color: #ffffff;
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
&.comments-btn-cancel {
|
||||
border: 1px solid #cccccc;
|
||||
color: #797979;
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.child-comments {
|
||||
.comment-avatar {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.comment-header {
|
||||
padding-top: 10px;
|
||||
border-top: 1px dotted #d7d7d7;
|
||||
}
|
||||
|
||||
.comment-item {
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
.comments-also {
|
||||
color: #62b1ff;
|
||||
line-height: 22px;
|
||||
font-size: 13px;
|
||||
height: 46px;
|
||||
margin-left: 30px;
|
||||
cursor: pointer;
|
||||
border-top: 1px dotted #d7d7d7;
|
||||
|
||||
.also-icon {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.comment-end {
|
||||
font-size: 12px;
|
||||
color: #d7d7d7;
|
||||
text-align: center;
|
||||
margin-bottom: 118px;
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
.empty-box {
|
||||
padding: 80px 0 110px;
|
||||
}
|
||||
@import url(@/assets/css/DetailsComments.css);
|
||||
</style>
|
||||
|
||||
<style lang="less">
|
||||
.automatic-reviews-popup {
|
||||
border-radius: 10px !important;
|
||||
|
||||
Reference in New Issue
Block a user