提交 464968de 编写于 作者: X xzs02

fix: 解决在swiper组件上拖动导致父组件表现异常的问题

build uni-h5 0.0.14
上级 dc15614f
......@@ -11,6 +11,7 @@
"test:unit": "cross-env NODE_ENV=test UNI_PLATFORM=h5 mocha-webpack --require tests/unit/setup.js --webpack-config build/webpack.config.test.js tests/unit/**/*.spec.js"
},
"dependencies": {},
"private": true,
"devDependencies": {
"@vue/cli-plugin-babel": "^3.1.1",
"@vue/cli-plugin-eslint": "^3.1.4",
......@@ -86,4 +87,4 @@
"main": "index.js",
"description": "",
"author": ""
}
}
{
"name": "@dcloudio/uni-h5",
"version": "0.0.13",
"version": "0.0.14",
"description": "uni-app h5",
"main": "dist/index.umd.min.js",
"scripts": {
......
......@@ -524,7 +524,7 @@ export default {
if (!this._invalid) {
if (e.detail.state === 'start') {
this.userTracking = true
this._userDirectionChecked = !1
this._userDirectionChecked = false
return this._handleTrackStart()
}
// fixed by xxxxxx
......@@ -547,6 +547,9 @@ export default {
}
}
if (!this.userTracking) {
if (this.autoplay) {
this._scheduleAutoplay()
}
return
}
}
......
var addListenerToElement = function (element, type, callback, r) {
// 暂时忽略capture
element.addEventListener(type, callback, {
element.addEventListener(type, $event => {
if (typeof callback === 'function') {
if (callback($event) === false) {
$event.preventDefault()
$event.stopPropagation()
}
}
}, {
passive: false
})
}
......@@ -49,8 +56,7 @@ export default {
if ($event.touches.length === 1 && $eventOld) {
var res = fn($event, 'move', $event.touches[0].pageX, $event.touches[0].pageY)
x1 = $event.touches[0].pageX
y1 = $event.touches[0].pageY
$event.preventDefault()
y1 = $event.touches[0].pageY
return res
}
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册