<template>
    <el-rate
            :show-text="showText"
            :texts="texts"
            @change="changeRateValue"
            v-model="value"
    >
    </el-rate>
</template>

<script>
    export default {
        name:    'MtaRateBase',
        props:   {
            defaultValue: {
                type:    Number,
                default: 0,
            },
        },
        data() {
            return {
                texts:    ['2分', '4分', '6分', '8分', '10分'],
                showText: false,
                value:    this.defaultValue,
            };
        },
        methods: {
            changeRateValue(data) {
                this.$emit('change', data);
            },
            reventData(data) {
                this.value = data;
            }
        },
    };
</script>

<style scoped>

</style>
