ssm41471/src/main/webapp/front/components/uni-ui/lib/uni-swipe-action/mpother.js
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// #ifdef APP-NVUE
const dom = weex.requireModule('dom');
// #endif
export default {
data() {
return {
uniShow: false,
left: 0
}
},
computed: {
moveLeft() {
return `translateX(${this.left}px)`
}
},
watch: {
show(newVal) {
if (!this.position || JSON.stringify(this.position) === '{}') return;
if (this.autoClose) return
if (newVal) {
this.$emit('change', true)
this.open()
} else {
this.$emit('change', false)
this.close()
}
uni.$emit('__uni__swipe__event', this)
}
},
mounted() {
this.position = {}
this.init()
setTimeout(()=>{
this.getSelectorQuery()
},100)
},
beforeDestoy() {
uni.$off('__uni__swipe__event')
},
methods: {
init() {
uni.$on('__uni__swipe__event', (res) => {
if (res !== this && this.autoClose) {
if (this.left !== 0) {
this.close()
}
}
})
},
onClick(index, item) {
this.$emit('click', {
content: item,
index
})
},
touchstart(e) {
const {
pageX
} = e.touches[0]
后面还有 100 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
