|
@@ -31,10 +31,18 @@ const isHideRealName = ref(true);
|
|
//判断是否可以实名
|
|
//判断是否可以实名
|
|
const checkNickHandle = (val) => {
|
|
const checkNickHandle = (val) => {
|
|
|
|
|
|
- if(haveNick.value){
|
|
|
|
- isHideRealName.value = val
|
|
|
|
- } else {
|
|
|
|
- isHideRealName.value = true;
|
|
|
|
|
|
+ isHideRealName.value = haveNick.value ? val : true;
|
|
|
|
+
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//显示写留言框
|
|
|
|
+const isShowMessagebox = ref(false);
|
|
|
|
+const message_content = ref('');
|
|
|
|
+//展开留言框
|
|
|
|
+const writeOrCancelMessage = () => {
|
|
|
|
+ isShowMessagebox.value = !isShowMessagebox.value;
|
|
|
|
+
|
|
|
|
+ if(!haveNick.value && isShowMessagebox.value === true){
|
|
Dialog.confirm({
|
|
Dialog.confirm({
|
|
title: '',
|
|
title: '',
|
|
message: '检测到您还未设置头像和昵称,您的留言将发布为匿名,是否立即去设置?',
|
|
message: '检测到您还未设置头像和昵称,您的留言将发布为匿名,是否立即去设置?',
|
|
@@ -50,16 +58,6 @@ const checkNickHandle = (val) => {
|
|
|
|
|
|
});
|
|
});
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-//显示写留言框
|
|
|
|
-const isShowMessagebox = ref(false);
|
|
|
|
-const message_content = ref('');
|
|
|
|
-//展开留言框
|
|
|
|
-const writeOrCancelMessage = () => {
|
|
|
|
- isShowMessagebox.value = ! isShowMessagebox.value;
|
|
|
|
}
|
|
}
|
|
/* 发布留言 */
|
|
/* 发布留言 */
|
|
const publishMessageHandle = async() => {
|
|
const publishMessageHandle = async() => {
|
|
@@ -193,7 +191,7 @@ const delMessageHandle = ({ comment_id }) => {
|
|
<Checkbox v-model="isHideRealName" icon-size="15px" shape="square" checked-color="#E3B377" @change="checkNickHandle"/>
|
|
<Checkbox v-model="isHideRealName" icon-size="15px" shape="square" checked-color="#E3B377" @change="checkNickHandle"/>
|
|
<span class="label">匿名发布</span>
|
|
<span class="label">匿名发布</span>
|
|
|
|
|
|
- <icon name="question-o" color="#E3B377" @click="Toast({ message: '匿名发布的留言将实用默认头像和默认昵称,用户需设置头像和昵称后才能取消匿名', position: 'bottom' })"/>
|
|
|
|
|
|
+ <icon name="question-o" color="#E3B377" @click="Toast({ message: '匿名发布的留言将使用默认头像和默认昵称,用户需设置头像和昵称后才能取消匿名', position: 'bottom' })"/>
|
|
</div>
|
|
</div>
|
|
<Button type="primary" :disabled="!message_content" @click="publishMessageHandle">发布</Button>
|
|
<Button type="primary" :disabled="!message_content" @click="publishMessageHandle">发布</Button>
|
|
</div>
|
|
</div>
|
|
@@ -297,6 +295,7 @@ const delMessageHandle = ({ comment_id }) => {
|
|
border-radius: 8px;
|
|
border-radius: 8px;
|
|
border: 1px solid #E3B377;
|
|
border: 1px solid #E3B377;
|
|
height: 400px;
|
|
height: 400px;
|
|
|
|
+ overflow-y: auto;
|
|
}
|
|
}
|
|
.write-bottom {
|
|
.write-bottom {
|
|
display: flex;
|
|
display: flex;
|