ソースを参照

feat:1.我的评论输入添加表情

suwenjiang 2 ヶ月 前
コミット
16434dbc19
1 ファイル変更6 行追加7 行削除
  1. 6 7
      src/pages/profile/my-comment.vue

+ 6 - 7
src/pages/profile/my-comment.vue

@@ -78,7 +78,7 @@
                 </NuxtLink>
                 <div
                   @click.stop="addReply(item, item?.id)"
-                  class="box-border mb-12 line-clamp-1 rounded-full border w-95 h-26 flex justify-center items-center text-base px-8 text-black-3 leading-4xl bg-[#F5F5F5] active:bg-black/[0.1]"
+                  class="box-border mb-12 line-clamp-1 rounded-full w-95 h-26 flex justify-center items-center text-base px-8 text-black-3 leading-4xl bg-[#F5F5F5] active:bg-black/[0.1]"
                 >
                   <div class="w-16 h-16 rounded-full shrink-0 mr-4">
                     <img
@@ -197,10 +197,9 @@
       @click="handleBlur"
       class="w-[100vw] h-[100vh] fixed top-0 border-[#000] left-0 z-100 bg-[#000]/[0.1]"
     >
-      123132
-      <div @click.stop="" class="fixed bottom-0 left-0 w-full bg-[#fff] pt-10 pb-30 border z-52">
+      <div @click.stop="" class="fixed bottom-0 left-0 w-full bg-[#fff] pt-10 pb-30 z-52">
         <div class="flex items-start">
-          <!-- border-[#FD9A00] -->
+          <!-- border-[#FD9A00]   @blur="handleBlur"-->
           <div
             class="relative bg-[#F3F3F3] flex-1 ml-12 mr-12 pl-5 pr-5 pt-4 pb-4 rounded-[4px] h-50 border flex items-center justify-between"
           >
@@ -211,12 +210,11 @@
                 replyComment?.id ? `回复:${replyComment?.commentUserIdDictMap?.name}` : ''
               "
               @focus="textareaFocus"
-              @blur="handleBlur"
               class="ml-8 flex-1 h-full bg-black/[0]"
               maxlength="5000"
               style="resize: none"
             ></textarea>
-            <!-- <img @click="openEmoji" src="~/assets/img/yj/emoji.png" class="w-22 h-22" alt="" /> -->
+            <img @click="openEmoji" src="~/assets/img/yj/emoji.png" class="w-22 h-22" alt="" />
           </div>
           <div
             @click="addComment"
@@ -296,7 +294,7 @@ function onCommentFilterClose(value) {
 
 // 获取焦点
 function textareaFocus() {
-  // showEmoji.value = false
+  showEmoji.value = false
   showInput.value = true
   textareaRef.value?.focus()
 }
@@ -462,6 +460,7 @@ async function addComment() {
       showToast('评论成功')
 
       // getMyCommentList()
+      showInput.value = false
       showEmoji.value = false
     })
     .finally(() => (canAddComment.value = true), (replyComment.value = {}), (cursorIndex.value = 0))