Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
mehaotian committed Sep 11, 2019
2 parents f8e81cd + 9b699e0 commit 223fbd0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 262 deletions.
6 changes: 3 additions & 3 deletions src/components/uni-swipe-action/mp.js
Expand Up @@ -26,14 +26,14 @@ export default {
mounted () {
this.init()
this.getSize()
this.getBUttonSize()
this.getButtonSize()
},
// #endif
// #ifndef H5
onReady () {
this.init()
this.getSize()
this.getBUttonSize()
this.getButtonSize()
},
// #endif
methods: {
Expand Down Expand Up @@ -76,7 +76,7 @@ export default {
})
.exec()
},
getBUttonSize () {
getButtonSize () {
const views = uni.createSelectorQuery().in(this)
views
.selectAll('.button-hock')
Expand Down
8 changes: 0 additions & 8 deletions src/components/uni-swipe-action/mpother.js
Expand Up @@ -32,7 +32,6 @@ export default {
},
methods: {
init () {
console.log('混入', this.moveLeft)
uni.$on('__uni__swipe__event', (res) => {
if (res !== this && this.autoClose) {
if (this.left !== 0) {
Expand All @@ -51,7 +50,6 @@ export default {
const {
pageX
} = e.touches[0]
console.log('touchstart')
if (this.disabled) return
const left = this.position[0].left
uni.$emit('__uni__swipe__event', this)
Expand All @@ -65,14 +63,12 @@ export default {
},
touchmove (e, index) {
if (this.disabled) return
console.log('touchmove')
const {
pageX
} = e.touches[0]
this.setPosition(pageX)
},
touchend () {
console.log('touchend')
if (this.disabled) return
if (this.isopen) {
this.move(this.openleft, 0)
Expand All @@ -81,14 +77,11 @@ export default {
this.move(this.left, -40)
},
setPosition (x, y) {
console.log(!this.position[1].width, this.position[1].width)
if (!this.position[1].width) {
return
}
console.log(x, '--')
// const width = this.position[0].width
this.left = x - this.width
console.log(this.left)
this.setValue(x - this.width)
},
setValue (value) {
Expand Down Expand Up @@ -128,7 +121,6 @@ export default {
.selectAll('.selector-query-hock')
.boundingClientRect(data => {
this.position = data
console.log(data)
if (this.autoClose) return
if (this.show) {
this.open()
Expand Down
251 changes: 0 additions & 251 deletions src/components/uni-swipe-action/uni-swipe-action.bak

This file was deleted.

0 comments on commit 223fbd0

Please sign in to comment.