Skip to content

fix(components): 将half-screen-dialog中最外层dom的catch:touchmove改为mut-bind:touchmove,保证half-screen-dialog内部的textarea在绑定互斥的touchmove事件后能正常滚动 #268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/components/half-screen-dialog/half-screen-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ Component({
buttonTap(e) {
const { index } = e.currentTarget.dataset
this.triggerEvent('buttontap', { index, item: this.data.buttons[index] }, {})
},
onMaskMouseMove() {
// do nothing
}
}
})
10 changes: 9 additions & 1 deletion src/components/half-screen-dialog/half-screen-dialog.wxml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<template name="body">
<view class="weui-half-screen-dialog {{innerShow ? 'weui-animate-slide-up' : 'weui-animate-slide-down' }} {{extClass}}" catch:touchmove="onMaskMouseMove">
<wxs module="wxs">
function onMaskTouchmove () {
return false
}
module.exports = {
onMaskTouchmove: onMaskTouchmove,
}
</wxs>
<view class="weui-half-screen-dialog {{innerShow ? 'weui-animate-slide-up' : 'weui-animate-slide-down' }} {{extClass}}" mut-bind:touchmove="{{wxs.onMaskTouchmove}}">
<view class="weui-half-screen-dialog__hd">
<view wx:if="{{closabled}}" class="weui-half-screen-dialog__hd__side" bindtap="close" data-type="close">
<view class="weui-icon-btn" aria-role="button" hover-class="weui-active">
Expand Down