Compare commits
1 Commits
main
...
wyfMain-de
Author | SHA1 | Date | |
---|---|---|---|
82d5642376 |
@ -3,8 +3,8 @@
|
||||
<view
|
||||
:id="popoverBoxId"
|
||||
class="popover-box"
|
||||
@touchend="onTouchend"
|
||||
@touchstart="onTouchstart"
|
||||
v-passive-end="onTouchend"
|
||||
v-passive-touch="onTouchstart"
|
||||
>
|
||||
<slot></slot>
|
||||
</view>
|
||||
@ -75,7 +75,7 @@
|
||||
</view>
|
||||
<view
|
||||
v-show="data.popoverShow"
|
||||
@touchstart="close"
|
||||
v-passive-touch="close"
|
||||
@click="close"
|
||||
class="popover-bg"
|
||||
></view>
|
||||
|
@ -92,8 +92,8 @@ defineExpose({
|
||||
<tm-button
|
||||
@click="sendCancel"
|
||||
:width="319"
|
||||
@touchstart="cancel = false"
|
||||
@touchend="cancel = true"
|
||||
v-passive-touch="cancel = false"
|
||||
v-passive-end="cancel = true"
|
||||
:fontSize="32"
|
||||
:height="112"
|
||||
:margin="[0]"
|
||||
@ -107,8 +107,8 @@ defineExpose({
|
||||
<div class="flex justify-center items-center text-[#CF3050]">
|
||||
<tm-button
|
||||
@click="sendConfirm"
|
||||
@touchstart="confirm = false"
|
||||
@touchend="confirm = true"
|
||||
v-passive-touch="confirm = false"
|
||||
v-passive-end="confirm = true"
|
||||
:width="319"
|
||||
:fontSize="32"
|
||||
:transprent="confirm"
|
||||
|
@ -34,7 +34,7 @@ class Connect {
|
||||
// 更新 WebSocket 连接状态
|
||||
useUserStore().updateSocketStatus(true)
|
||||
// online.value = true;
|
||||
useTalkStore().loadTalkList()
|
||||
uni.$emit('socket-refresh-talk-list')
|
||||
},
|
||||
// Websocket 断开连接回调方法
|
||||
onClose: () => {
|
||||
|
61
src/main.js
61
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)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@
|
||||
</template> -->
|
||||
|
||||
<!-- 数据加载状态栏 -->
|
||||
<div class="dialog-list" @touchstart="handleHidePanel">
|
||||
<div class="dialog-list" v-passive-touch="handleHidePanel">
|
||||
<div
|
||||
class="message-item"
|
||||
v-for="item in virtualList"
|
||||
@ -146,8 +146,8 @@
|
||||
<aside
|
||||
class="avatar-column"
|
||||
@click="toUserDetailPage(item)"
|
||||
@touchstart="() => handleAvatarTouchStart(item)"
|
||||
@touchend="handleAvatarTouchEnd"
|
||||
v-passive-touch="() => handleAvatarTouchStart(item)"
|
||||
v-passive-end="handleAvatarTouchEnd"
|
||||
>
|
||||
<!-- <im-avatar
|
||||
class="pointer"
|
||||
|
@ -10,7 +10,7 @@
|
||||
:refresher-fixed-bac-height="80"
|
||||
refresher-fixed-background="#F9F9FD"
|
||||
refresher-background="#F9F9FD"
|
||||
v-model="items"
|
||||
v-model="talkListItems"
|
||||
@query="queryList"
|
||||
:loading-more-enabled="false"
|
||||
:refresher-end-bounce-enabled="false"
|
||||
@ -18,6 +18,7 @@
|
||||
:empty-view-show="isEmptyViewShow"
|
||||
@refresherRefresh="onRefresh"
|
||||
:show-scrollbar="false"
|
||||
:auto-clean-list-when-reload="false"
|
||||
>
|
||||
<template #top>
|
||||
<div>
|
||||
@ -65,9 +66,7 @@
|
||||
mode="scaleToFill"
|
||||
/>
|
||||
<template v-slot:label>
|
||||
<div
|
||||
class="w-full px-[14rpx]"
|
||||
>
|
||||
<div class="w-full px-[14rpx]">
|
||||
<div
|
||||
@click="creatGroupChat"
|
||||
class="flex items-center pl-[22rpx] py-[32rpx]"
|
||||
@ -139,7 +138,7 @@
|
||||
</div>
|
||||
<div class="contentRoot">
|
||||
<chatItem
|
||||
v-for="(item, index) in items"
|
||||
v-for="(item, index) in talkListItems"
|
||||
:key="item.index_name"
|
||||
:index="index"
|
||||
:data="item"
|
||||
@ -152,7 +151,7 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import customInput from '@/components/custom-input/custom-input.vue'
|
||||
import { ref, watch, computed } from 'vue'
|
||||
import { ref, watch, computed, onMounted, onUnmounted } from 'vue'
|
||||
import { onShow, onLoad } from '@dcloudio/uni-app'
|
||||
import { useChatList } from '@/store/chatList/index.js'
|
||||
import { useAuth } from '@/store/auth'
|
||||
@ -176,23 +175,34 @@ const dialogueParams = reactive({
|
||||
const { userInfo } = useAuth()
|
||||
|
||||
const topItems = computed(() => talkStore.topItems)
|
||||
const items = computed(() => {
|
||||
// if (searchKeyword.value.length === 0) {
|
||||
console.log(talkStore.talkItems)
|
||||
const talkListItems = ref(talkStore?.talkItems || [])
|
||||
watch(
|
||||
() => talkStore.talkItems,
|
||||
(newVal) => {
|
||||
talkListItems.value = newVal
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
)
|
||||
// computed(() => {
|
||||
// // if (searchKeyword.value.length === 0) {
|
||||
// // console.log(talkStore.talkItems)
|
||||
|
||||
return talkStore.talkItems
|
||||
// }
|
||||
// return talkStore.talkItems
|
||||
// // }
|
||||
|
||||
// return talkStore.talkItems.filter((item) => {
|
||||
// let keyword = item.remark || item.name
|
||||
// // return talkStore.talkItems.filter((item) => {
|
||||
// // let keyword = item.remark || item.name
|
||||
|
||||
// return keyword.toLowerCase().indexOf(searchKeyword.value.toLowerCase()) != -1
|
||||
// })
|
||||
})
|
||||
// // return keyword.toLowerCase().indexOf(searchKeyword.value.toLowerCase()) != -1
|
||||
// // })
|
||||
// })
|
||||
|
||||
const queryList = (pageNo, pageSize) => {
|
||||
// paging.value.complete(res.data.list);
|
||||
console.log(talkStore)
|
||||
// console.log(talkStore)
|
||||
talkStore
|
||||
.loadTalkList()
|
||||
.then(() => {
|
||||
@ -263,28 +273,43 @@ const toAddressBookPage = () => {
|
||||
{ deep: true, immediate: true }
|
||||
); */
|
||||
|
||||
onMounted(() => {
|
||||
uni.$on('socket-refresh-talk-list', () => {
|
||||
if (paging.value) {
|
||||
paging.value.reload() // 只触发ZPaging刷新,不直接请求
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
uni.$off('socket-refresh-talk-list')
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
handleSetWebviewStyle(true)
|
||||
// 页面显示时重新加载数据
|
||||
talkStore
|
||||
.loadTalkList()
|
||||
.then(() => {
|
||||
// 如果paging已经初始化,则刷新列表
|
||||
if (paging.value) {
|
||||
paging.value.reload()
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('页面显示时数据加载失败', error)
|
||||
})
|
||||
if (paging.value) {
|
||||
paging.value.reload()
|
||||
}
|
||||
// talkStore
|
||||
// .loadTalkList()
|
||||
// .then(() => {
|
||||
// // 如果paging已经初始化,则刷新列表
|
||||
// if (paging.value) {
|
||||
// paging.value.reload()
|
||||
// }
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// console.error('页面显示时数据加载失败', error)
|
||||
// })
|
||||
})
|
||||
|
||||
onLoad((options) => {
|
||||
console.log(options)
|
||||
|
||||
if (options?.openSessionIndexName) {
|
||||
if (items?.value?.length > 0) {
|
||||
items.value.forEach((openSession) => {
|
||||
if (talkListItems?.value?.length > 0) {
|
||||
talkListItems.value.forEach((openSession) => {
|
||||
if (openSession.index_name === options?.openSessionIndexName) {
|
||||
setTimeout(() => {
|
||||
dialogueStore.setDialogue(openSession)
|
||||
|
@ -7,9 +7,9 @@
|
||||
<view
|
||||
class="record-btn"
|
||||
@longpress="startRecord"
|
||||
@touchstart="touchStart"
|
||||
@touchmove="touchMove"
|
||||
@touchend="endRecord"
|
||||
v-passive-touch="touchStart"
|
||||
v-passive-move="touchMove"
|
||||
v-passive-end="endRecord"
|
||||
hover-class="record-btn-hover"
|
||||
hover-start-time="200"
|
||||
hover-stay-time="150"
|
||||
|
@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<!-- #ifdef MP -->
|
||||
<view @touchstart="touch.startDrag" @touchmove.stop="touch.onDrag" @touchend="touch.endDrag" :data-prop="towxsShareData">
|
||||
<view v-passive-touch="touch.startDrag" v-passive-move.stop="touch.onDrag" v-passive-end="touch.endDrag" :data-prop="towxsShareData">
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5||APP-VUE -->
|
||||
<view @touchstart="touch.startDrag" @touchmove="touch.onDrag" @touchend="touch.endDrag" :data-prop="towxsShareData">
|
||||
<view v-passive-touch="touch.startDrag" v-passive-move="touch.onDrag" v-passive-end="touch.endDrag" :data-prop="towxsShareData">
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-NVUE -->
|
||||
<view >
|
||||
<!-- #endif -->
|
||||
<view @touchstart="touchstart" :style="{ left: _offset[0] + 'rpx', top: _offset[1] + 'rpx' }" class="div" id="adsorb" ref="adsorb">
|
||||
<view v-passive-touch="touchstart" :style="{ left: _offset[0] + 'rpx', top: _offset[1] + 'rpx' }" class="div" id="adsorb" ref="adsorb">
|
||||
<view
|
||||
:eventPenetrationEnabled="true"
|
||||
:style="{
|
||||
|
@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<button
|
||||
@click="onclick"
|
||||
@touchstart="touchstart"
|
||||
@touchend="touchend"
|
||||
v-passive-touch="touchstart"
|
||||
v-passive-end="touchend"
|
||||
@longpress="emits('longpress', $event)"
|
||||
@touchcancel="touchcancel"
|
||||
@touchmove="emits('touchmove', $event)"
|
||||
v-passive-move="(e: Event) => emits('touchmove', e)"
|
||||
@getphonenumber="emits('getphonenumber', $event)"
|
||||
@error="emits('error', $event)"
|
||||
@opensetting="emits('opensetting', $event)"
|
||||
|
@ -5,9 +5,9 @@
|
||||
<canvas
|
||||
@click="emits('click', $event)"
|
||||
v-if="!isPc"
|
||||
@touchstart="touchStart"
|
||||
@touchmove="touchMove"
|
||||
@touchend="touchEnd"
|
||||
v-passive-touch="touchStart"
|
||||
v-passive-move="touchMove"
|
||||
v-passive-end="touchEnd"
|
||||
:id="canvasId"
|
||||
:canvas-id="canvasId"
|
||||
class="canvas"
|
||||
@ -26,9 +26,9 @@
|
||||
<!-- #ifdef MP-WEIXIN || MP-QQ -->
|
||||
<canvas
|
||||
@click="emits('click', $event)"
|
||||
@touchstart="touchStart"
|
||||
@touchmove="touchMove"
|
||||
@touchend="touchEnd"
|
||||
v-passive-touch="touchStart"
|
||||
v-passive-move="touchMove"
|
||||
v-passive-end="touchEnd"
|
||||
type="2d"
|
||||
id="canvasId"
|
||||
canvas-id="canvasId"
|
||||
@ -39,9 +39,9 @@
|
||||
<!-- #ifdef MP-ALIPAY -->
|
||||
<canvas
|
||||
@click="emits('click', $event)"
|
||||
@touchstart="touchStart"
|
||||
@touchmove="touchMove"
|
||||
@touchend="touchEnd"
|
||||
v-passive-touch="touchStart"
|
||||
v-passive-move="touchMove"
|
||||
v-passive-end="touchEnd"
|
||||
type="2d"
|
||||
:id="canvasId"
|
||||
:canvas-id="canvasId"
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view @touchmove.stop="stopMove" class="flex flex-col flex-col-top-center">
|
||||
<view v-passive-move.stop="stopMove" class="flex flex-col flex-col-top-center">
|
||||
<view
|
||||
@touchmove.stop="stopMove"
|
||||
v-passive-move.stop="stopMove"
|
||||
v-if="showCanvas"
|
||||
class="overflow relative"
|
||||
ref="webviewWk"
|
||||
@ -17,9 +17,9 @@
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN || MP-ALIPAY || MP-QQ -->
|
||||
<canvas
|
||||
@touchstart="touchStart"
|
||||
@touchmove="touchMove"
|
||||
@touchend="touchEnd"
|
||||
v-passive-touch="touchStart"
|
||||
v-passive-move="touchMove"
|
||||
v-passive-end="touchEnd"
|
||||
class="canvas"
|
||||
type="2d"
|
||||
id="canvasId"
|
||||
@ -28,9 +28,9 @@
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-WEIXIN || MP-ALIPAY || MP-QQ || APP-NVUE -->
|
||||
<canvas
|
||||
@touchstart="touchStart"
|
||||
@touchmove="touchMove"
|
||||
@touchend="touchEnd"
|
||||
v-passive-touch="touchStart"
|
||||
v-passive-move="touchMove"
|
||||
v-passive-end="touchEnd"
|
||||
class="canvas"
|
||||
:id="canvasId"
|
||||
:canvas-id="canvasId"
|
||||
@ -41,30 +41,30 @@
|
||||
<view
|
||||
id="wrapper"
|
||||
class="absolute l-0 t-0 wrapper item"
|
||||
@touchstart="colorTouch.startDrag"
|
||||
@touchmove="colorTouch.onDrag"
|
||||
@touchend="colorTouch.endDrag"
|
||||
v-passive-touch="colorTouch.startDrag"
|
||||
v-passive-move="colorTouch.onDrag"
|
||||
v-passive-end="colorTouch.endDrag"
|
||||
@touchcancel="colorTouch.endDrag"
|
||||
>
|
||||
<view class="itemwk" @touchend="touchEndWk(0)" @touchmove="touchEndWk(0)"></view>
|
||||
<view class="itemwk" v-passive-end="touchEndWk(0)" v-passive-move="touchEndWk(0)"></view>
|
||||
</view>
|
||||
<view
|
||||
id="wrapper2"
|
||||
class="absolute r-0 t-0 wrapper item"
|
||||
@touchstart="colorTouch.startDrag2"
|
||||
@touchmove="colorTouch.onDrag2"
|
||||
@touchend="colorTouch.endDrag2"
|
||||
v-passive-touch="colorTouch.startDrag2"
|
||||
v-passive-move="colorTouch.onDrag2"
|
||||
v-passive-end="colorTouch.endDrag2"
|
||||
@touchcancel="colorTouch.endDrag2"
|
||||
>
|
||||
<view class="itemwk" @touchend="touchEndWk(1)" @touchmove="touchEndWk(1)"></view>
|
||||
<view class="itemwk" v-passive-end="touchEndWk(1)" v-passive-move="touchEndWk(1)"></view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- #ifdef APP-NVUE -->
|
||||
<view id="wrapper" ref="wrapper" class="absolute l-0 t-0 wrapper item" @touchstart="nvueStartH">
|
||||
<view id="wrapper" ref="wrapper" class="absolute l-0 t-0 wrapper item" v-passive-touch="nvueStartH">
|
||||
<view class="itemwk"></view>
|
||||
</view>
|
||||
<view id="wrapper2" ref="wrapper2" class="absolute r-0 t-0 wrapper item" @touchstart="nvueStartS">
|
||||
<view id="wrapper2" ref="wrapper2" class="absolute r-0 t-0 wrapper item" v-passive-touch="nvueStartS">
|
||||
<view class="itemwk"></view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<view
|
||||
@longpress=""
|
||||
@touchstart="touchStart"
|
||||
@touchmove.stop.prevent="touchMove"
|
||||
@touchend="touchEnd"
|
||||
v-passive-touch="touchStart"
|
||||
v-passive-move.stop.prevent="touchMove"
|
||||
v-passive-end="touchEnd"
|
||||
@touchcancel="touchEnd"
|
||||
@mousedown="touchStart"
|
||||
@mousemove.stop.prevent="touchMove"
|
||||
|
@ -39,12 +39,12 @@
|
||||
</view>
|
||||
<view
|
||||
:style="{ height: h - 1 + 'px', width: '100rpx' }"
|
||||
@touchstart.stop.prevent="m_start($event, index)"
|
||||
v-passive-touch.stop.prevent="(e: Event) => m_start(e, index)"
|
||||
@longpress="m_start_longpress(index)"
|
||||
@mousedown="m_start($event, index)"
|
||||
@touchmove.stop.prevent="m_move($event, index)"
|
||||
v-passive-move.stop.prevent="(e: Event) => m_move(e, index)"
|
||||
@mousemove.stop.prevent="m_move($event, index)"
|
||||
@touchend="m_end($event, index)"
|
||||
v-passive-end="(e: Event) => m_end(e, index)"
|
||||
@mouseup="m_end($event, index)"
|
||||
class="flex-shrink flex flex-row flex-row-center-center opacity-3"
|
||||
>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<view
|
||||
v-if="show"
|
||||
@click.stop="closeDromenu"
|
||||
@touchmove.stop=""
|
||||
v-passive-move.stop=""
|
||||
class="l-0 t-0 fixed zIndex-9"
|
||||
:style="[
|
||||
{
|
||||
|
@ -37,7 +37,7 @@
|
||||
<!-- 背景遮罩,透明背景 -->
|
||||
<view
|
||||
@click="close"
|
||||
@touchmove.stop="stopEvent"
|
||||
v-passive-move.stop="stopEvent"
|
||||
class="bg fixed"
|
||||
:style="{
|
||||
left: (isNaN(activeIndex) || isButton ? '-10000' : 0) + 'px',
|
||||
@ -56,7 +56,7 @@
|
||||
<!-- 动态菜单及内容的背景 -->
|
||||
<view
|
||||
@click="close"
|
||||
@touchmove.stop="stopEvent"
|
||||
v-passive-move.stop="stopEvent"
|
||||
:class="[isNaN(activeIndex) ? 'bgAnioff' : 'bgAni']"
|
||||
class="bgContent fixed"
|
||||
:style="{
|
||||
@ -70,7 +70,7 @@
|
||||
<!-- 动态菜单及内容 -->
|
||||
<view
|
||||
@click="close"
|
||||
@touchmove.stop="stopEvent"
|
||||
v-passive-move.stop="stopEvent"
|
||||
class="content fixed"
|
||||
:style="{
|
||||
left: (isNaN(activeIndex) || isButton ? '-10000' : (props.fixed?0:el_left)) + 'px',
|
||||
|
@ -27,9 +27,9 @@
|
||||
>
|
||||
<view
|
||||
:style="[{ height: `${navright.length * navHeight}rpx`, width: '60rpx' }]"
|
||||
@touchstart="touchStart"
|
||||
@touchmove.stop.prevent="touchMove"
|
||||
@touchend="touchEnd"
|
||||
v-passive-touch="touchStart"
|
||||
v-passive-move.stop.prevent="touchMove"
|
||||
v-passive-end="touchEnd"
|
||||
id="navlist"
|
||||
ref="navlist"
|
||||
class="flex flex-col flex-center"
|
||||
|
@ -7,7 +7,7 @@
|
||||
<!-- #endif -->
|
||||
|
||||
<view
|
||||
@touchmove.prevent=""
|
||||
v-passive-move.prevent=""
|
||||
v-if="showMask"
|
||||
class="l-0 t-0"
|
||||
:style="[
|
||||
|
@ -2,9 +2,9 @@
|
||||
<scroll-view
|
||||
class="scroyy"
|
||||
:scroll-top="scrollTop"
|
||||
@touchstart="onTouchStart"
|
||||
@touchmove="onTouchMove"
|
||||
@touchend="onTouchEnd"
|
||||
v-passive-touch="onTouchStart"
|
||||
v-passive-move="onTouchMove"
|
||||
v-passive-end="onTouchEnd"
|
||||
@scroll="onScroll"
|
||||
@scrolltoupper="onScrollToTop"
|
||||
@scrolltolower="onScrollToBottom"
|
||||
|
@ -3,9 +3,9 @@
|
||||
<scroll-view
|
||||
class="scroyy"
|
||||
:scroll-top="scrollTop"
|
||||
@touchstart="onTouchStart"
|
||||
@touchmove="onTouchMove"
|
||||
@touchend="onTouchEnd"
|
||||
v-passive-touch="onTouchStart"
|
||||
v-passive-move="onTouchMove"
|
||||
v-passive-end="onTouchEnd"
|
||||
@scroll="onScroll"
|
||||
@scrolltoupper="onScrollToTop"
|
||||
@scrolltolower="onScrollToBottom"
|
||||
|
@ -11,8 +11,8 @@
|
||||
:blurEffect="blurEffect"
|
||||
@click="onClick"
|
||||
@longpress="longpress"
|
||||
@touchend="touchend"
|
||||
@touchstart="touchstart"
|
||||
v-passive-end="touchend"
|
||||
v-passive-touch="touchstart"
|
||||
@touchcancel="touchcancel"
|
||||
@mousedown="mousedown"
|
||||
@mouseup="mouseup"
|
||||
|
@ -3,9 +3,9 @@
|
||||
<!-- #ifdef APP-NVUE -->
|
||||
<gcanvas
|
||||
v-if="show"
|
||||
@touchstart="touchstart"
|
||||
@touchmove="touchsmove"
|
||||
@touchend="touchsend"
|
||||
v-passive-touch="touchstart"
|
||||
v-passive-move="touchsmove"
|
||||
v-passive-end="touchsend"
|
||||
:id="canvasId"
|
||||
:ref="canvasId"
|
||||
class="canvas"
|
||||
@ -15,9 +15,9 @@
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN || MP-ALIPAY || MP-QQ -->
|
||||
<canvas
|
||||
@touchstart="touchstart"
|
||||
@touchmove="touchsmove"
|
||||
@touchend="touchsend"
|
||||
v-passive-touch="touchstart"
|
||||
v-passive-move="touchsmove"
|
||||
v-passive-end="touchsend"
|
||||
@mousedown="touchstart"
|
||||
@mousemove.stop="touchsmove"
|
||||
@mouseup.stop="touchsend"
|
||||
@ -30,9 +30,9 @@
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-WEIXIN || MP-ALIPAY || MP-QQ || APP-NVUE -->
|
||||
<canvas
|
||||
@touchstart.stop="touchstart"
|
||||
@touchmove.stop="touchsmove"
|
||||
@touchend.stop="touchsend"
|
||||
v-passive-touch.stop="touchstart"
|
||||
v-passive-move.stop="touchsmove"
|
||||
v-passive-end.stop="touchsend"
|
||||
@mousedown.stop="touchstart"
|
||||
@mousemove.stop="touchsmove"
|
||||
@mouseup.stop="touchsend"
|
||||
|
@ -4,9 +4,9 @@
|
||||
<view >
|
||||
<view
|
||||
v-if="!_disabled"
|
||||
@touchstart="startDrag"
|
||||
@touchmove="onDrag"
|
||||
@touchend="endDrag"
|
||||
v-passive-touch="startDrag"
|
||||
v-passive-move="onDrag"
|
||||
v-passive-end="endDrag"
|
||||
@touchcancel="endDrag"
|
||||
:style="`width:${attr.width}px;height:${attr.height}px `"
|
||||
class="overflow relative"
|
||||
@ -97,7 +97,7 @@
|
||||
</view>
|
||||
<view
|
||||
@click="emits('click')"
|
||||
@touchstart.stop="touchstart"
|
||||
v-passive-touch.stop="touchstart"
|
||||
id="wrapper"
|
||||
ref="tabsDom"
|
||||
class="absolute l-0 t-0"
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<!-- <view
|
||||
data-text="hehe"
|
||||
@touchstart.stop="test.touchstart" @mousedown.stop="movestart" @touchmove.stop="test.touchmove" @mousemove.stop="moveing" @touchend.stop="moveend" @mouseup.stop="moveend" @mouseleave.stop="moveend"
|
||||
v-passive-touch.stop="test.touchstart" @mousedown.stop="movestart" v-passive-move.stop="test.touchmove" @mousemove.stop="moveing" v-passive-end.stop="moveend" @mouseup.stop="moveend" @mouseleave.stop="moveend"
|
||||
class="absolute movable" :style="[
|
||||
props.direction == 'horizontal'?{width:props.size+'rpx',height:props.size+'rpx',transform:`translateX(${_x}px)`,top:'0px'}:'',
|
||||
props.direction == 'vertical'?{width:props.size+'rpx',height:props.size+'rpx',transform:`translateY(${_x}px)`,left:0+'rpx',top:'0px'}:'',
|
||||
@ -13,11 +13,11 @@
|
||||
<!-- #endif -->
|
||||
|
||||
<view
|
||||
@touchstart.stop="movestart"
|
||||
v-passive-touch.stop="movestart"
|
||||
@mousedown.stop="movestart"
|
||||
@touchmove.stop="moveing"
|
||||
v-passive-move.stop="moveing"
|
||||
@mousemove.stop="moveing"
|
||||
@touchend.stop="moveend"
|
||||
v-passive-end.stop="moveend"
|
||||
@mouseup.stop="moveend"
|
||||
@mouseleave.stop="moveend"
|
||||
class="absolute"
|
||||
|
@ -12,10 +12,10 @@
|
||||
<movable-view
|
||||
:class="[moveIndex === item._index ? 'opacity-6 zIndex-1' : 'zIndex-0']"
|
||||
:animation="false"
|
||||
@touchstart="drageStart"
|
||||
@touchmove="onTouchMove($event, index)"
|
||||
v-passive-touch="drageStart"
|
||||
v-passive-move="(e: Event) => onTouchMove(e, index)"
|
||||
@touchcancel="dragEnd($event, index)"
|
||||
@touchend="dragEnd($event, index)"
|
||||
v-passive-end="(e: Event) => dragEnd(e, index)"
|
||||
@change="eleChange($event, index)"
|
||||
:x="item._x"
|
||||
:y="item._y"
|
||||
|
@ -2,7 +2,7 @@
|
||||
<view class="flex flex-row" :style="[{ height: `${props.height}rpx`,width: `${props.width}rpx`,}]">
|
||||
<tmSheet text class="flex-1" :transprent="props.circular" :followTheme="false" _class="flex flex-row flex-1"
|
||||
:color="props.bgColor" :margin="[0, 0]" :padding="[0, 0]">
|
||||
<view @click="setStep('-')" @longpress="longpressEvent('-')" @touchend="endlongpressEvent('-')"
|
||||
<view @click="setStep('-')" @longpress="longpressEvent('-')" v-passive-end="endlongpressEvent('-')"
|
||||
:class="[!props.circular ? `` : `round-${10}`, 'overflow', _disabled || isJianDisabled ? 'opacity-5' : '']">
|
||||
<tmSheet :followTheme="props.followTheme" :round="props.circular ? 10 : props.round"
|
||||
:linear="props.linear" :linear-deep="props.linearDeep" _class="flex-center" :color="props.color"
|
||||
@ -23,7 +23,7 @@
|
||||
}
|
||||
]" type="digit" />
|
||||
|
||||
<view @click="setStep('+')" @longpress="longpressEvent('+')" @touchend="endlongpressEvent('+')"
|
||||
<view @click="setStep('+')" @longpress="longpressEvent('+')" v-passive-end="endlongpressEvent('+')"
|
||||
:class="[!props.circular ? `` : `round-${10}`, 'overflow', _disabled || isAddDisabled ? 'opacity-5' : '']">
|
||||
<tmSheet :followTheme="props.followTheme" :round="props.circular ? 10 : props.round"
|
||||
:linear="props.linear" :linear-deep="props.linearDeep" :_class="'flex-center'" :color="props.color"
|
||||
|
@ -49,7 +49,7 @@
|
||||
</view>
|
||||
<scroll-view
|
||||
@scroll="tableScroll"
|
||||
@touchstart="scrollDong = 't'"
|
||||
v-passive-touch="scrollDong = 't'"
|
||||
@mouseup="scrollDong = 't'"
|
||||
class="flex-1"
|
||||
:class="['tableHeader']"
|
||||
@ -160,7 +160,7 @@
|
||||
class="flex-1"
|
||||
:scroll-with-animation="false"
|
||||
@scroll="headerScroll($event, 0)"
|
||||
@touchstart="touchStartScroll(0)"
|
||||
v-passive-touch="touchStartScroll(0)"
|
||||
@mouseup="touchStartScroll(0)"
|
||||
:scroll-x="true"
|
||||
:scroll-y="true"
|
||||
|
@ -51,8 +51,8 @@
|
||||
:style="[{ width: _width + 'rpx' }, _height ? { height: _height + 'rpx' } : '']"
|
||||
>
|
||||
<view
|
||||
@touchStart="onScrollStart"
|
||||
@touchend="onScrollEnd"
|
||||
v-passive-touch="onScrollStart"
|
||||
v-passive-end="onScrollEnd"
|
||||
v-if="isShowRender"
|
||||
:style="{ transform: `translateY(${reFresh == 2 ? -refreshJuli : 0}px)` }"
|
||||
class="flex contentx"
|
||||
|
@ -8,9 +8,9 @@
|
||||
<!-- https://ask.dcloud.net.cn/question/143230 -->
|
||||
<!-- #ifndef APP-NVUE -->
|
||||
<view
|
||||
@touchmove="onMove"
|
||||
@touchend="onEnd"
|
||||
@touchstart="onStart"
|
||||
v-passive-move="onMove"
|
||||
v-passive-end="onEnd"
|
||||
v-passive-touch="onStart"
|
||||
@mousemove="onMove"
|
||||
@mouseup="onEnd"
|
||||
@mouseleave="onEnd"
|
||||
@ -28,11 +28,11 @@
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-NVUE -->
|
||||
<!-- @touchmove="onMove"
|
||||
@touchend="onEnd"
|
||||
@touchstart="onStart" -->
|
||||
<!-- v-passive-move="onMove"
|
||||
v-passive-end="onEnd"
|
||||
v-passive-touch="onStart" -->
|
||||
<view
|
||||
@touchstart="spinNvueAni"
|
||||
v-passive-touch="spinNvueAni"
|
||||
ref="tabsDom"
|
||||
:style="{
|
||||
width: props.swiper ? `${totalWidth}px` : `${props.width}rpx`,
|
||||
@ -351,9 +351,9 @@
|
||||
<!-- #ifndef APP-NVUE -->
|
||||
<view
|
||||
id="webIdTabs"
|
||||
@touchmove="onMove"
|
||||
@touchend="onEnd"
|
||||
@touchstart="onStart"
|
||||
v-passive-move="onMove"
|
||||
v-passive-end="onEnd"
|
||||
v-passive-touch="onStart"
|
||||
@touchcancel="onEnd"
|
||||
@mousemove="onMove"
|
||||
@mouseup="onEnd"
|
||||
@ -372,13 +372,13 @@
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-NVUE -->
|
||||
<!-- @touchmove="onMove"
|
||||
@touchend="onEnd"
|
||||
@touchstart="onStart" -->
|
||||
<!-- @touchmove="onMove" @touchend="onEnd" @touchcancel="onEnd" -->
|
||||
<!-- v-passive-move="onMove"
|
||||
v-passive-end="onEnd"
|
||||
v-passive-touch="onStart" -->
|
||||
<!-- v-passive-move="onMove" v-passive-end="onEnd" @touchcancel="onEnd" -->
|
||||
<view
|
||||
@touchstart="spinNvueAni"
|
||||
@touchmove="onMove"
|
||||
v-passive-touch="spinNvueAni"
|
||||
v-passive-move="onMove"
|
||||
ref="tabsDom"
|
||||
:style="{
|
||||
width: props.swiper ? `${totalWidth}px` : `${props.width}rpx`,
|
||||
|
@ -11,9 +11,9 @@ interface positionType {
|
||||
import { useTouchFinger } from '@/tmui/tool/useFun/useTouchFinger'
|
||||
const {touchstart,touchmove,touchend,touchcancel,addEventListener,direction,deltaXY,preTapPosition,angle,scale } = useTouchFinger();
|
||||
<image
|
||||
@touchstart="touchstart"
|
||||
@touchmove="touchmove"
|
||||
@touchend="touchend"
|
||||
v-passive-touch="touchstart"
|
||||
v-passive-move="touchmove"
|
||||
v-passive-end="touchend"
|
||||
@touchcancel="touchcancel"
|
||||
src="https://pic.rmb.bdstatic.com/bjh/beautify/aee57799c6885386bb748e07fe43f78f.jpeg"
|
||||
:style="{transform:`scale(${scale}) rotate(${angle}deg)`,width:'100px',height:'100px'}"></image>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view v-if="showPopup" class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']">
|
||||
<view @touchstart="touchstart">
|
||||
<view v-passive-touch="touchstart">
|
||||
<uni-transition key="1" v-if="maskShow" name="mask" mode-class="fade" :styles="maskClass"
|
||||
:duration="duration" :show="showTrans" @click="onTap" />
|
||||
<uni-transition key="2" :mode-class="ani" name="content" :styles="transClass" :duration="duration"
|
||||
|
@ -57,7 +57,7 @@
|
||||
>
|
||||
<view class="wd-picker__wraper">
|
||||
<!--toolBar-->
|
||||
<view class="wd-picker__toolbar" @touchmove="noop">
|
||||
<view class="wd-picker__toolbar" v-passive-move="noop">
|
||||
<!--取消按钮-->
|
||||
<view class="wd-picker__action wd-picker__action--cancel" @click="onCancel">
|
||||
{{ cancelButtonText || translate('cancel') }}
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<view
|
||||
@touchmove.stop.prevent="handleTouchMove"
|
||||
@touchstart="handleTouchStart"
|
||||
@touchend="handleTouchEnd"
|
||||
v-passive-move.stop.prevent="handleTouchMove"
|
||||
v-passive-touch="handleTouchStart"
|
||||
v-passive-end="handleTouchEnd"
|
||||
:class="`wd-fab ${customClass}`"
|
||||
:style="rootStyle"
|
||||
@click.stop=""
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!-- 绘制的图片canvas -->
|
||||
<view v-if="modelValue" :class="`wd-img-cropper ${customClass}`" :style="customStyle" @touchmove="preventTouchMove">
|
||||
<view v-if="modelValue" :class="`wd-img-cropper ${customClass}`" :style="customStyle" v-passive-move="preventTouchMove">
|
||||
<!-- 展示在用户面前的裁剪框 -->
|
||||
<view class="wd-img-cropper__wrapper">
|
||||
<!-- 画出裁剪框 -->
|
||||
@ -39,9 +39,9 @@
|
||||
:src="imgSrc"
|
||||
:style="imageStyle"
|
||||
:lazy-load="false"
|
||||
@touchstart="handleImgTouchStart"
|
||||
@touchmove="handleImgTouchMove"
|
||||
@touchend="handleImgTouchEnd"
|
||||
v-passive-touch="handleImgTouchStart"
|
||||
v-passive-move="handleImgTouchMove"
|
||||
v-passive-end="handleImgTouchEnd"
|
||||
@error="handleImgLoadError"
|
||||
@load="handleImgLoaded"
|
||||
/>
|
||||
|
@ -8,8 +8,8 @@
|
||||
</scroll-view>
|
||||
<view
|
||||
class="wd-index-bar__sidebar"
|
||||
@touchmove.stop.prevent="handleTouchMove"
|
||||
@touchend.stop.prevent="handleTouchEnd"
|
||||
v-passive-move.stop.prevent="handleTouchMove"
|
||||
v-passive-end.stop.prevent="handleTouchEnd"
|
||||
@touchcancel.stop.prevent="handleTouchEnd"
|
||||
>
|
||||
<view
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view :class="`wd-key-wrapper ${wider ? 'wd-key-wrapper--wider' : ''}`" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd">
|
||||
<view :class="`wd-key-wrapper ${wider ? 'wd-key-wrapper--wider' : ''}`" v-passive-touch="onTouchStart" v-passive-move="onTouchMove" v-passive-end="onTouchEnd">
|
||||
<view :class="keyClass">
|
||||
<wd-loading custom-class="wd-key--loading-icon" v-if="props.loading" />
|
||||
<template v-if="type === 'delete'">
|
||||
|
@ -6,7 +6,7 @@
|
||||
:duration="duration"
|
||||
:custom-style="`z-index: ${zIndex}; ${customStyle}`"
|
||||
@click="handleClick"
|
||||
@touchmove.stop.prevent="lockScroll ? noop : ''"
|
||||
v-passive-move.stop.prevent="lockScroll ? noop : ''"
|
||||
>
|
||||
<slot></slot>
|
||||
</wd-transition>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view :class="`wd-password-input ${customClass}`" :style="customStyle">
|
||||
<view @touchstart="onTouchStart" class="wd-password-input__security">
|
||||
<view v-passive-touch="onTouchStart" class="wd-password-input__security">
|
||||
<view
|
||||
v-for="(_, index) in length"
|
||||
:key="index"
|
||||
|
@ -38,7 +38,7 @@
|
||||
custom-class="wd-picker__popup"
|
||||
>
|
||||
<view class="wd-picker__wraper">
|
||||
<view class="wd-picker__toolbar" @touchmove="noop">
|
||||
<view class="wd-picker__toolbar" v-passive-move="noop">
|
||||
<view class="wd-picker__action wd-picker__action--cancel" @click="onCancel">
|
||||
{{ cancelButtonText || translate('cancel') }}
|
||||
</view>
|
||||
|
@ -7,7 +7,7 @@
|
||||
:duration="duration"
|
||||
:custom-style="modalStyle"
|
||||
@click="handleClickModal"
|
||||
@touchmove="noop"
|
||||
v-passive-move="noop"
|
||||
/>
|
||||
<view v-if="!lazyRender || inited" :class="rootClass" :style="style" @transitionend="onTransitionEnd">
|
||||
<slot />
|
||||
|
@ -92,7 +92,7 @@
|
||||
</view>
|
||||
</wd-radio-group>
|
||||
</view>
|
||||
<view v-if="loading" class="wd-select-picker__loading" @touchmove="noop">
|
||||
<view v-if="loading" class="wd-select-picker__loading" v-passive-move="noop">
|
||||
<wd-loading :color="loadingColor" />
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
@ -12,9 +12,9 @@
|
||||
<view
|
||||
class="wd-slider__button-wrapper"
|
||||
:style="buttonLeftStyle"
|
||||
@touchstart="onTouchStart"
|
||||
@touchmove="onTouchMove"
|
||||
@touchend="onTouchEnd"
|
||||
v-passive-touch="onTouchStart"
|
||||
v-passive-move="onTouchMove"
|
||||
v-passive-end="onTouchEnd"
|
||||
@touchcancel="onTouchEnd"
|
||||
>
|
||||
<view class="wd-slider__label" v-if="!hideLabel">{{ leftNewValue }}</view>
|
||||
@ -25,9 +25,9 @@
|
||||
v-if="showRight"
|
||||
class="wd-slider__button-wrapper"
|
||||
:style="buttonRightStyle"
|
||||
@touchstart="onTouchStartRight"
|
||||
@touchmove="onTouchMoveRight"
|
||||
@touchend="onTouchEndRight"
|
||||
v-passive-touch="onTouchStartRight"
|
||||
v-passive-move="onTouchMoveRight"
|
||||
v-passive-end="onTouchEndRight"
|
||||
@touchcancel="onTouchEndRight"
|
||||
>
|
||||
<view class="wd-slider__label" v-if="!hideLabel">{{ rightNewValue }}</view>
|
||||
|
@ -4,9 +4,9 @@
|
||||
:class="`wd-swipe-action ${customClass}`"
|
||||
:style="customStyle"
|
||||
@click.stop="onClick()"
|
||||
@touchstart="startDrag"
|
||||
@touchmove="onDrag"
|
||||
@touchend="endDrag"
|
||||
v-passive-touch="startDrag"
|
||||
v-passive-move="onDrag"
|
||||
v-passive-end="endDrag"
|
||||
@touchcancel="endDrag"
|
||||
>
|
||||
<!--容器-->
|
||||
@ -191,7 +191,7 @@ function onDrag(event: TouchEvent) {
|
||||
if (touch.direction.value === 'vertical') {
|
||||
return
|
||||
} else {
|
||||
event.preventDefault()
|
||||
// event.preventDefault()
|
||||
event.stopPropagation()
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@
|
||||
</wd-sticky>
|
||||
|
||||
<!--标签页-->
|
||||
<view class="wd-tabs__container" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd" @touchcancel="onTouchEnd">
|
||||
<view class="wd-tabs__container" v-passive-touch="onTouchStart" v-passive-move="onTouchMove" v-passive-end="onTouchEnd" @touchcancel="onTouchEnd">
|
||||
<view :class="['wd-tabs__body', animated ? 'is-animated' : '']" :style="bodyStyle">
|
||||
<slot />
|
||||
</view>
|
||||
@ -114,7 +114,7 @@
|
||||
</view>
|
||||
|
||||
<!--标签页-->
|
||||
<view class="wd-tabs__container" @touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd" @touchcancel="onTouchEnd">
|
||||
<view class="wd-tabs__container" v-passive-touch="onTouchStart" v-passive-move="onTouchMove" v-passive-end="onTouchEnd" @touchcancel="onTouchEnd">
|
||||
<view :class="['wd-tabs__body', animated ? 'is-animated' : '']" :style="bodyStyle">
|
||||
<slot />
|
||||
</view>
|
||||
|
Loading…
Reference in New Issue
Block a user