/**
 * textArea
 * @author xiufu.wang
 */
import ElInput from 'mars-pro/packages/input';
import BaseMixin from 'mars-pro/packages/pro-input/src/mixins/base';
import InputBlurMixin from 'mars-pro/packages/pro-input/src/mixins/inputBlur';
export default {
    name: 'ProInputTextarea',
    componentName: 'ProInputTextarea',
    mixins: [BaseMixin, InputBlurMixin],
    components: {
        ElInput
    },

    render() {
        const _datas = {
            props: {
                value: this.value,
                lazy: true,
                clearable: true,
                showClearOnly: true,
                showWordLimit: true,
                ...this.$attrs,
                type: 'textarea',
                ...(this.forceValidateEvent === false ? { validateEvent: false } : {})
            },
            attrs: {
                maxlength: this.$attrs.max,
                ...this.$attrs
            },
            on: {
                ...this.$listeners,
                blur: this.onStringBlur
            },
            ref: 'elinput'
        }
        return (
            <ElInput  {..._datas}>
                {this.renderSlots()}
            </ElInput>
        )
    }
}