<template>
    <span :class="label?'input-span':''">
        <span v-if="label">{{$dict.tranByPubMap(label)}} :</span>
        <el-input  v-bind.trim="$attrs" v-on="$listeners" :style="$attrs.elstyle+inputStyle" clearable @mousewheel.native.prevent></el-input>
    </span>
    
</template>


<script>

export default {
    props:["label","width"],
    data() {
        return {
        }
    },

    mounted() {
    },
    computed: {
        inputStyle() {
            if(!this.$attrs.elstyle){
                if(this.width){
                    return ";width:"+this.width+"px;";
                }else {
                    return ";width:auto;";
                }
            }
        }
    },

    methods: {
    }
}
</script>

<style lang="less" scoped>
    .input-span{
        display: inline-block;
        margin-left: 10px;
        margin-right: 10px;
        margin-top: 5px;
        >span{
            display: inline-block;
            white-space: nowrap;
            color:gray;
            font-size: 15px;
        }
    }
</style>
<style lang="less">
    .el-form-item__content .input-span{
        margin-top: 0px;
    }
</style>