feat: update m-feedback to 2.0.0

pull/309/head
tangjinzhou 2018-11-02 21:45:11 +08:00
parent bbff1e56b5
commit 2bf65a4828
3 changed files with 3 additions and 16 deletions

View File

@ -15,14 +15,11 @@ const InputHandler = {
},
on: this.$listeners,
}
const spanProps = {
attrs: this.$attrs,
}
return (
<Touchable
{...touchableProps}
>
<span {...spanProps}>
<span>
{this.$slots.default}
</span>
</Touchable>

View File

@ -1,3 +1,3 @@
// based on 2.0.0
import TouchFeedback from './src/TouchFeedback'
export default TouchFeedback

View File

@ -26,10 +26,7 @@ export default {
},
methods: {
triggerEvent (type, isActive, ev) {
// const eventType = `on${type}`
// if (this.props[eventType]) {
// this.props[eventType](ev)
// }
// input-numberTouchableantd
this.$emit(type, ev)
if (isActive !== this.active) {
this.setState({
@ -50,17 +47,10 @@ export default {
this.triggerEvent('touchcancel', false, e)
},
onMouseDown (e) {
// todo
// pc simulate mobile
// if (this.props.onTouchStart) {
this.triggerEvent('touchstart', true, e)
// }
this.triggerEvent('mousedown', true, e)
},
onMouseUp (e) {
// if (this.props.onTouchEnd) {
this.triggerEvent('touchend', false, e)
// }
this.triggerEvent('mouseup', false, e)
},
onMouseLeave (e) {