diff --git a/components/DetailsComments.vue b/components/DetailsComments.vue index 34cc842..08f3d88 100644 --- a/components/DetailsComments.vue +++ b/components/DetailsComments.vue @@ -230,7 +230,8 @@ const openAnswerCommentsChild = (index, i) => { // 关闭 回答-评论 的子评论 isempty 是否需要清空输入框 默认需要清空 const closeAnswerCommentsChild = (isempty = true) => { console.log("isempty", isempty) - if (isempty) commentInput.value = "" + // if (isempty) commentInput.value = "" + commentInput.value = "" commentList.value.forEach(ele => { ele["childState"] = false if (ele["child"] && ele["child"].length != 0) ele["child"].forEach(el => (el["childState"] = false)) diff --git a/composables/utils.js b/composables/utils.js index 28f5574..46dc17f 100644 --- a/composables/utils.js +++ b/composables/utils.js @@ -1,6 +1,7 @@ // 处理时间 export const handleDate = (dateTimeStamp = new Date()) => { dateTimeStamp = dateTimeStamp ? dateTimeStamp : null + if (!dateTimeStamp) return '刚刚' var timestamp = new Date(dateTimeStamp) timestamp = timestamp.getTime() var minute = 1000 * 60 diff --git a/pages/publish/index.vue b/pages/publish/index.vue index 3e06c6e..09f2fdb 100644 --- a/pages/publish/index.vue +++ b/pages/publish/index.vue @@ -251,7 +251,7 @@ onMounted(() => { const getinit = () => { publishInitHttp().then(res => { if (res.code != 200) { - ElMessage.error(res.message) + ElMessage.error(res.message || '报错了,刷新一下') if (res.code == 401) goLogin() return }