Skip to content

Commit

Permalink
Merge pull request #80 from handsomeliuyang/release-3.6.8-app-kxj
Browse files Browse the repository at this point in the history
Swiper组件重构;下拉刷新bug修改;其他组件样式与bug修改
  • Loading branch information
Nullifier1571 authored Aug 8, 2023
2 parents 7025a77 + 129a396 commit 78be7e4
Show file tree
Hide file tree
Showing 9 changed files with 1,565 additions and 2,575 deletions.
4 changes: 3 additions & 1 deletion packages/taro-components-mpharmony/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"clean": "rimraf dist",
"build": "npm run clean && rollup -c ",
"dev": "npm run clean && rollup -c "
"dev": "npm run clean && rollup -c -w"
},
"keywords": [],
"author": "",
Expand All @@ -31,7 +31,9 @@
"react-grid-layout": "^1.3.4",
"react-resizable": "^3.0.4",
"react-responsive": "^9.0.2",
"react-slick": "^0.29.0",
"react-stonecutter": "^0.3.10",
"slick-carousel": "^1.8.1",
"swiper": "6.8.0",
"tinymce": "6.5.1",
"universal-router": "^9.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ img[src=""] {
overflow: hidden;
position: relative;
font-size: 0;
width: 320px;
height: 240px;
width: 100%;
height: 100%;
}

.taro-img.taro-img__widthfix {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ class PullDownRefresh extends React.Component<IProps, IState> {

get scrollContainer () {
return (
this.contentRef?.parentElement ||
this.contentRef?.closest('.taro_page_stationed') ||
this.containerRef?.parentElement ||
this.containerRef?.closest('.taro_page_stationed') ||
document.querySelector('.taro_page_stationed') ||
document.querySelector('.taro_page') ||
document.querySelector('.taro_router') ||
Expand Down Expand Up @@ -183,6 +183,9 @@ class PullDownRefresh extends React.Component<IProps, IState> {
}

onTouchStart = (_, e: TouchEvent) => {
if (!e || !e.touches) {
return
}
this._ScreenY = this._startScreenY = e.touches[0].screenY
// 一开始 refreshing 为 true 时 this._lastScreenY 有值
this._lastScreenY = this._lastScreenY || 0
Expand Down Expand Up @@ -210,9 +213,11 @@ class PullDownRefresh extends React.Component<IProps, IState> {
}

onTouchMove = (ele: HTMLElement, e: TouchEvent) => {
if (!e || !e.touches) {
return
}
// 使用 pageY 对比有问题
const _screenY = e.touches[0].screenY

// 拖动方向不符合的不处理
if (this._startScreenY > _screenY) {
return
Expand Down Expand Up @@ -328,9 +333,9 @@ class PullDownRefresh extends React.Component<IProps, IState> {
)
}

if (this.scrollContainer) {
return renderRefresh(`${prefixCls}-content ${prefixCls}-down`)
}
// if (this.scrollContainer) {
// return renderRefresh(`${prefixCls}-content ${prefixCls}-down`)
// }
return (
<pull-down-refresh
ref={el => {
Expand Down
Loading

0 comments on commit 78be7e4

Please sign in to comment.