[bugfix] Swipe: lazy-image not appeared (#2708)

This commit is contained in:
neverland 2019-02-09 10:46:37 +08:00 committed by GitHub
parent e64b908a32
commit 88b8fc6e21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -8,9 +8,9 @@ export default sfc({
mixins: [Popup], mixins: [Popup],
props: { props: {
className: null,
title: String, title: String,
message: String, message: String,
className: null,
callback: Function, callback: Function,
beforeClose: Function, beforeClose: Function,
messageAlign: String, messageAlign: String,

View File

@ -1,6 +1,6 @@
import { use } from '../utils'; import { use } from '../utils';
import Touch from '../mixins/touch'; import Touch from '../mixins/touch';
import { on, off, stop } from '../utils/event'; import { on, off } from '../utils/event';
const [sfc, bem] = use('swipe'); const [sfc, bem] = use('swipe');
@ -256,8 +256,9 @@ export default sfc({
}, },
onTransitionend(event) { onTransitionend(event) {
event.stopPropagation(); if (event.currentTarget === this.$refs.track) {
this.$emit('change', this.activeIndicator); this.$emit('change', this.activeIndicator);
}
} }
}, },
@ -267,7 +268,7 @@ export default sfc({
const Indicator = const Indicator =
this.slots('indicator') || this.slots('indicator') ||
(this.showIndicators && count > 1 && ( (this.showIndicators && count > 1 && (
<div class={bem('indicators', { vertical: this.vertical })} onTransitionend={stop}> <div class={bem('indicators', { vertical: this.vertical })}>
{Array(...Array(count)).map((empty, index) => ( {Array(...Array(count)).map((empty, index) => (
<i <i
class={bem('indicator', { active: index === activeIndicator })} class={bem('indicator', { active: index === activeIndicator })}
@ -280,6 +281,7 @@ export default sfc({
return ( return (
<div class={bem()}> <div class={bem()}>
<div <div
ref="track"
style={this.trackStyle} style={this.trackStyle}
class={bem('track')} class={bem('track')}
onTouchstart={this.onTouchStart} onTouchstart={this.onTouchStart}