Browse Source

feat: 优化评论组件,修复子组件引用并调整输入框光标间距

EvilDragon 3 months ago
parent
commit
e6185fa32b

+ 3 - 2
packages/app/src/pages/home/components/comment-item.vue

@@ -11,6 +11,7 @@ import { thumbsUp, thumbsUpActive } from '../../../core/libs/svgs'
 import { Comment } from '../../../core/libs/models'
 import { dayjs } from 'wot-design-uni'
 import { storeToRefs } from 'pinia'
+import CommentItem from './comment-item.vue'
 
 // const props = defineProps({
 //   options: {
@@ -144,7 +145,7 @@ defineExpose({
       </view>
     </view>
     <template v-for="(it, i) in data" :key="i">
-      <comment-item
+      <CommentItem
         :options="it"
         :isChild="true"
         @replay="
@@ -152,7 +153,7 @@ defineExpose({
         "
         @delete="emits('delete', index)"
         @upvote="emits('upvote', index)"
-      ></comment-item>
+      ></CommentItem>
     </template>
   </div>
 </template>

+ 2 - 1
packages/app/src/pages/home/moment/index.vue

@@ -290,7 +290,8 @@ onShareAppMessage(async ({ from, target }) => {
             v-model="reviewContent"
             placeholder="说点什么..."
             :focus="focus"
-            :cursor-spacing="140"
+            :cursor-spacing="16"
+            @blur="focus = false"
             @confirm="handleSend"
           ></wd-input>
         </div>