InputHandler.js 663 Bytes
Newer Older
liang ce committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
import PropTypes from '../../_util/vue-types';
import Touchable from '../../vc-m-feedback';

var InputHandler = {
  props: {
    prefixCls: PropTypes.string,
    disabled: PropTypes.bool
  },
  render: function render() {
    var h = arguments[0];
    var _$props = this.$props,
        prefixCls = _$props.prefixCls,
        disabled = _$props.disabled;

    var touchableProps = {
      props: {
        disabled: disabled,
        activeClassName: prefixCls + '-handler-active'
      },
      on: this.$listeners
    };
    return h(
      Touchable,
      touchableProps,
      [h('span', [this.$slots['default']])]
    );
  }
};

export default InputHandler;