/**
 * phone
 * @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: 'ProInputPhone',
    componentName: 'ProInputPhone',
    mixins: [BaseMixin, InputBlurMixin],
    components: {
        ElInput
    },
     render() { 
        const _datas = {
            props: {
                value: this.value,
                suffixIcon: 'el-icon-phone-outline',
                lazy: true,
                clearable: true,
                showClearOnly: true,
                ...this.$attrs,
                ...(this.forceValidateEvent === false ? {validateEvent: false} : {})
            },
            attrs: this.$attrs,
            on: {
                ...this.$listeners,
                blur: this.onPhoneBlur
            },
            ref: 'elinput',
            'class': {
                'pro-input-phone': true
            }
        }
        return (
            <ElInput  {..._datas}>
                {this.renderSlots()}
            </ElInput>
        )
    }
}