2019-01-12 03:33:27 +00:00
|
|
|
import PropTypes from '../../_util/vue-types';
|
|
|
|
import Touchable from '../../vc-m-feedback';
|
2018-04-04 01:44:19 +00:00
|
|
|
|
2018-04-04 04:04:49 +00:00
|
|
|
const InputHandler = {
|
|
|
|
props: {
|
|
|
|
prefixCls: PropTypes.string,
|
|
|
|
disabled: PropTypes.bool,
|
|
|
|
},
|
2019-01-12 03:33:27 +00:00
|
|
|
render() {
|
|
|
|
const { prefixCls, disabled } = this.$props;
|
2018-04-04 04:04:49 +00:00
|
|
|
const touchableProps = {
|
|
|
|
props: {
|
|
|
|
disabled,
|
|
|
|
activeClassName: `${prefixCls}-handler-active`,
|
|
|
|
},
|
|
|
|
on: this.$listeners,
|
2019-01-12 03:33:27 +00:00
|
|
|
};
|
2018-04-04 01:44:19 +00:00
|
|
|
return (
|
2019-01-12 03:33:27 +00:00
|
|
|
<Touchable {...touchableProps}>
|
|
|
|
<span>{this.$slots.default}</span>
|
2018-04-04 01:44:19 +00:00
|
|
|
</Touchable>
|
2019-01-12 03:33:27 +00:00
|
|
|
);
|
2018-04-04 04:04:49 +00:00
|
|
|
},
|
2019-01-12 03:33:27 +00:00
|
|
|
};
|
2018-04-04 01:44:19 +00:00
|
|
|
|
2019-01-12 03:33:27 +00:00
|
|
|
export default InputHandler;
|