From 82d5642376524123bdc9a8be2629ebc6d0fe51d3 Mon Sep 17 00:00:00 2001 From: wangyifeng <812766448@qq.com> Date: Thu, 26 Jun 2025 11:20:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BD=BF=E7=94=A8=E4=BD=93?= =?UTF-8?q?=E9=AA=8C=EF=BC=8C=E5=8C=85=E6=8B=AC=E8=A7=A6=E6=91=B8=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E3=80=81=E6=95=B0=E6=8D=AE=E5=8A=A0=E8=BD=BD=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/deep-bubble/deep-bubble.vue | 6 +- src/components/x-confirm/index.vue | 8 +- src/connect.js | 2 +- src/main.js | 61 +++++++++++-- src/pages/dialog/index.vue | 6 +- src/pages/index/index.vue | 85 ++++++++++++------- .../components/all-speech/all-speech.vue | 6 +- .../tmui/components/tm-adsorb/tm-adsorb.vue | 6 +- .../tmui/components/tm-button/tm-button.vue | 6 +- .../tmui/components/tm-chart/tm-chart.vue | 18 ++-- .../tm-color-view/tm-color-view.vue | 36 ++++---- .../tmui/components/tm-cropimg/tm-cropimg.vue | 8 +- .../components/tm-drag-list/tm-drag-list.vue | 8 +- .../components/tm-dropdown/tm-dropdown.vue | 2 +- .../tm-filterMenu/tm-filterMenu.vue | 6 +- .../tmui/components/tm-indexes/tm-indexes.vue | 6 +- .../tmui/components/tm-overlay/tm-overlay.vue | 14 +-- .../components/tm-scrolly/scrolly-vue.vue | 6 +- .../tmui/components/tm-scrolly/tm-scrolly.vue | 16 ++-- .../tmui/components/tm-sheet/tm-sheet.vue | 4 +- .../tm-sign-board/tm-sign-board.vue | 18 ++-- .../tm-slide-switch/tm-slide-switch.vue | 26 +++--- .../components/tm-slider/slider-button.vue | 8 +- .../tmui/components/tm-sort/tm-sort.vue | 8 +- .../tmui/components/tm-stepper/tm-stepper.vue | 4 +- .../tmui/components/tm-table/tm-table-old.vue | 4 +- .../components/tm-tabs-pane/tm-tabs-pane.vue | 4 +- .../tmui/components/tm-tabs/tm-tabs.vue | 34 ++++---- .../tmui/tool/useFun/useTouchFinger.ts | 6 +- .../components/uni-popup/uni-popup.vue | 2 +- .../wd-datetime-picker/wd-datetime-picker.vue | 2 +- .../components/wd-fab/wd-fab.vue | 6 +- .../wd-img-cropper/wd-img-cropper.vue | 8 +- .../components/wd-index-bar/wd-index-bar.vue | 4 +- .../wd-number-keyboard/key/index.vue | 2 +- .../components/wd-overlay/wd-overlay.vue | 2 +- .../wd-password-input/wd-password-input.vue | 2 +- .../components/wd-picker/wd-picker.vue | 2 +- .../components/wd-popup/wd-popup.vue | 2 +- .../wd-select-picker/wd-select-picker.vue | 2 +- .../components/wd-slider/wd-slider.vue | 12 +-- .../wd-swipe-action/wd-swipe-action.vue | 8 +- .../components/wd-tabs/wd-tabs.vue | 4 +- 43 files changed, 277 insertions(+), 203 deletions(-) diff --git a/src/components/deep-bubble/deep-bubble.vue b/src/components/deep-bubble/deep-bubble.vue index fc9572c..55ab9c5 100644 --- a/src/components/deep-bubble/deep-bubble.vue +++ b/src/components/deep-bubble/deep-bubble.vue @@ -3,8 +3,8 @@ @@ -75,7 +75,7 @@ diff --git a/src/components/x-confirm/index.vue b/src/components/x-confirm/index.vue index 6ec4db6..8a60928 100644 --- a/src/components/x-confirm/index.vue +++ b/src/components/x-confirm/index.vue @@ -92,8 +92,8 @@ defineExpose({ { diff --git a/src/main.js b/src/main.js index 8835855..5fbdafc 100644 --- a/src/main.js +++ b/src/main.js @@ -16,8 +16,13 @@ import { vLoading } from '@/components/x-loading/index.js' import messagePopup from '@/components/x-message/useMessagePopup' import pageAnimation from '@/components/page-animation/index.vue' import * as plugins from './plugins' -import { useDialogueStore, useTalkStore, useUserStore, useDialogueListStore } from '@/store' -import {uniStorage} from "@/utils/uniStorage.js" +import { + useDialogueStore, + useTalkStore, + useUserStore, + useDialogueListStore, +} from '@/store' +import { uniStorage } from '@/utils/uniStorage.js' const { showMessage } = messagePopup() dayjs.locale('zh-cn') @@ -47,6 +52,51 @@ export function createApp() { }) }, }) + //给touchstart事件添加passive属性 + app.directive('passive-touch', { + mounted(el, binding) { + el._passiveTouchHandler = function (e) { + binding.value(e) + } + el.addEventListener('touchstart', el._passiveTouchHandler, { + passive: true, + }) + }, + unmounted(el) { + el.removeEventListener('touchstart', el._passiveTouchHandler) + delete el._passiveTouchHandler + }, + }) + // 给touchmove事件添加passive属性 + app.directive('passive-move', { + mounted(el, binding) { + el._passiveTouchMoveHandler = function (e) { + binding.value(e) + } + el.addEventListener('touchmove', el._passiveTouchMoveHandler, { + passive: true, + }) + }, + unmounted(el) { + el.removeEventListener('touchmove', el._passiveTouchMoveHandler) + delete el._passiveTouchMoveHandler + }, + }) + // 给touchend事件添加passive属性 + app.directive('passive-end', { + mounted(el, binding) { + el._passiveTouchEndHandler = function (e) { + binding.value(e) + } + el.addEventListener('touchend', el._passiveTouchEndHandler, { + passive: true, + }) + }, + unmounted(el) { + el.removeEventListener('touchend', el._passiveTouchEndHandler) + delete el._passiveTouchEndHandler + }, + }) //获取当前聊天页面所在页面,并通过当前的receiver_id判断是否要创建本地通知栏消息 window.getCurrentChatRoute = (msg) => { @@ -100,8 +150,8 @@ export function createApp() { // 新版本-按公司别、好友、群组的通讯录 uni.navigateTo({ url: '/pages/addressBook/index?type=true', - }); - }; + }) + } //处理OA、墨册强制刷新时,聊天同步强制刷新 window.doLocationRefresh = () => { @@ -126,10 +176,9 @@ export function createApp() { window.getBaseMulVideo = (videoList) => { const videos = JSON.parse(decodeURIComponent(videoList)) console.error('=====videos', videos) - if(videos.length > 0){ + if (videos.length > 0) { const videoUri = videos[0] console.error('=====videoUri', videoUri) - } } diff --git a/src/pages/dialog/index.vue b/src/pages/dialog/index.vue index 5561fe2..3e069ef 100644 --- a/src/pages/dialog/index.vue +++ b/src/pages/dialog/index.vue @@ -61,7 +61,7 @@ --> -
+
- + - + - + - + - + - + - + - + diff --git a/src/uni_modules/tmui/components/tm-cropimg/tm-cropimg.vue b/src/uni_modules/tmui/components/tm-cropimg/tm-cropimg.vue index 87aba9b..720864a 100644 --- a/src/uni_modules/tmui/components/tm-cropimg/tm-cropimg.vue +++ b/src/uni_modules/tmui/components/tm-cropimg/tm-cropimg.vue @@ -1,9 +1,9 @@