diff --git a/index.html b/index.html index c3ff205..fb81ddc 100644 --- a/index.html +++ b/index.html @@ -15,6 +15,6 @@
- + diff --git a/src/pages.json b/src/pages.json index 6647230..359998d 100644 --- a/src/pages.json +++ b/src/pages.json @@ -1,11 +1,16 @@ { "pages": [ - { - "path": "pages/index/index", - "style": { - "navigationStyle": "custom" - } - }, + { + "path": "pages/index/index", + "style": { + "navigationStyle": "custom", + "disableScroll": true, + "app-plus": { + "bounce": "none", + "scrollIndicator": "none" + } + } + }, { "path": "pages/login/index", "style": { @@ -122,4 +127,4 @@ "backgroundColor": "#F8F8F8" }, "uniIdRouter": {} -} \ No newline at end of file +} diff --git a/src/pages/ChatMain/ChatInputArea/index.vue b/src/pages/ChatMain/ChatInputArea/index.vue index 286775f..a1434b0 100644 --- a/src/pages/ChatMain/ChatInputArea/index.vue +++ b/src/pages/ChatMain/ChatInputArea/index.vue @@ -33,6 +33,7 @@ confirm-type="send" v-model="inputMessage" auto-height + :focus="isFocused" :confirm-hold="true" :placeholder="placeholder" :show-confirm-bar="false" @@ -322,20 +323,28 @@ const handleTouchEnd = () => { // 手动聚焦输入框 const focusInput = () => { - if (textareaRef.value) { - textareaRef.value.focus(); - } + isFocused.value = true; + nextTick(() => { + if (textareaRef.value) { + textareaRef.value.focus(); + } + }); }; // 手动失焦输入框 const blurInput = () => { + isFocused.value = false; if (textareaRef.value) { textareaRef.value.blur(); } + + nextTick(() => { + uni.hideKeyboard(); + }); }; // 暴露方法给父组件 -defineExpose({ focusInput }); +defineExpose({ focusInput, blurInput }); + diff --git a/src/pages/Discovery/index.vue b/src/pages/Discovery/index.vue index 3803d3c..fbd3f96 100644 --- a/src/pages/Discovery/index.vue +++ b/src/pages/Discovery/index.vue @@ -9,7 +9,14 @@ /> - + @@ -42,6 +49,15 @@ const activeIndex = ref(0); const discoveryTabs = ref([]); const discoveryCards = ref([]); const discoveryQuickQuestions = ref([]); +const emit = defineEmits(["scroll-touch-start", "scroll-touch"]); + +const emitScrollTouchStart = () => { + emit("scroll-touch-start"); +}; + +const emitScrollTouch = () => { + emit("scroll-touch"); +}; /// tabs 切换事件 const handleTabChange = ({ tab, idx }) => { @@ -188,5 +204,10 @@ onMounted(() => { diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 3661618..ad45290 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -1,22 +1,22 @@