<template>
	<div class="xselect">
        <el-select v-model="valueSync">
            <el-option v-for="(item, index) in options" :key="index" :label="item.label" :value="item.value"></el-option>
        </el-select>
	</div>
</template>

<script>
	export default {
        props:{
            value:{
            	type: String,
            },
            options:{
                type: Array,
                default(){
                    return []
                }
            }
        },
		watch: {
		    valueSync(newValue) {
		        this.$emit('input', newValue)
		    }
		},
        data(){
            return {
                valueSync: []
            }
        },
        created() {
            this.$set(this, 'valueSync', this.value)
        },
		methods: {

		}
	}
</script>
