Skip to content
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

Feature/cascader #801

Merged
merged 6 commits into from
Aug 17, 2024
Merged

Feature/cascader #801

merged 6 commits into from
Aug 17, 2024

Conversation

hbztd
Copy link
Contributor

@hbztd hbztd commented Aug 17, 2024

内置样式添加触摸反馈

Tag 添加边框颜色css变量

重构Circle,WEB和小程序都使用Canvas 2D接口实现,添加startPosition属性

修复Popup,Backdrop duration 属性不起作用

修复Cascader第一次打开时动画卡顿

@Pilotager Pilotager merged commit a64656e into mallfoundry:main Aug 17, 2024
@Pilotager
Copy link
Collaborator

对咯,之前防止滚动穿透的方法修改,是因为什么来着。。

现在这种方式有一种 case 会导致滚动不了,安卓/IOS/鸿蒙 webview 内嵌 H5 页面

@hbztd
Copy link
Contributor Author

hbztd commented Aug 17, 2024

什么case,不开启阻止滚动穿透也划不动吗

@Pilotager
Copy link
Collaborator

Pilotager commented Aug 17, 2024

什么case,不开启阻止滚动穿透也划不动吗

就是在原生内嵌 H5 上,开启“阻止滚动穿透”,会导致元素无法滚动,关闭了则正常。。。

然后我修改了下 use-lock-scroll-taro,起码在原生内嵌场景没问题,其他情况我还不知道。

原生指的 APP,不是小程序原生

@hbztd
Copy link
Contributor Author

hbztd commented Aug 17, 2024

H5里,开启了阻止滑动穿透,弹框弹起就会是阻止滑动,没啥问题啊。现在是弹框关里也划不动吗

// use-lock-scroll from vant: before preventDefault check result is not as expected in some cases,
// especially when dropdown in the page top position
// always preventDefault and use the ScrollView wrapper, maybe better.

@Pilotager
Copy link
Collaborator

Pilotager commented Aug 17, 2024

H5里,开启了阻止滑动穿透,弹框弹起就会是阻止滑动,没啥问题啊。现在是弹框关里也划不动吗

// use-lock-scroll from vant: before preventDefault check result is not as expected in some cases, // especially when dropdown in the page top position // always preventDefault and use the ScrollView wrapper, maybe better.

是的,我刚才表达的不是很清楚,确实阻止了滚动穿透,但是弹窗内无论是写 ScrollView, 还是写 View 使用 overflow-y: scroll,弹窗内元素都无法滚动。

Taro 打包成 H5 时候,如果使用默认打包方式编译成 Web Components 的话是没问题的,但是使用 useHtmlComponents: true,使用 React 兼容组件的时候,打包出来的是 div,样式为 overflow-x: hidden; overflow-y: scroll; 然后会出现弹窗内无法滚动问题。

也可能是我的 APP webview 容器本身的问题。。 我再多跑几个场景验证下。

@hbztd
Copy link
Contributor Author

hbztd commented Aug 17, 2024

ScrollView 会阻止冒泡上去,事件没到use-lock-scroll-taro去,所有能滑动

useHtmlComponents: true 成div 估计没这些逻辑了

@Pilotager
Copy link
Collaborator

ScrollView 会阻止冒泡上去,事件没到use-lock-scroll-taro去,所有能滑动

useHtmlComponents: true 成 div 估计没这些逻辑了

是的,一般也不会考虑这么低的兼容性而去自定义实现 ScrollView 这类的基本组件。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants