<template>
    <div style="width: 100%">
        <Container>
            <Select v-model="value" style="width:96.5%;" >
                <Option v-for="item in optionsData" :value="item.value||''" :key="item.value">{{ item.label }}</Option>
            </Select>
        </Container>
    </div>
</template>

<script>
import * as components from './style';
import {PropertyMixin} from '../../service/main-tool-editor-type-mixin';
export default {
    components: {
        ...components
    },
    mixins: [PropertyMixin],
    position: 'mainToolEditorTypeDatePicker',
    name: 'main-tool-editor-type-datePicker',
    data () {
        return {
            propArr:[{
                "label":"选择日期",
                "value":"date"
            },{
                "label":"选择日期范围",
                "value":"daterange"
            },{
                "label":"选择年",
                "value":"year"
            },{
                "label":"选择月",
                "value":"month"
            }]
        };
    },
    props: {
        instanceInfo: Object,
        editor: Object
    },
    computed: {
        applicationState () {
            return this.$store.state.application;
        },
        viewportState () {
            return this.$store.state.viewport;
        },
        optionsData () {
            let _data = this.propArr || [];
            return _data;
        }
    },
    methods: {
        // change_status(val){  // 筛选状态
        //
        //     console.log(this.val);
        //     this.val=val;
        //     this.setInstanceProps(this.val);
        // },
        handleChange () {

        }
    },
    mounted(){

        let _this=this;
      //  this.$http.get('/static/data/page-ide/addressReq.json').then((response) => {
            //_this.propArr=response.propArr;
            _this.initCurrtField();
        //});
    },
    watch: {
        value (n, o) {


            if (n === o) {
                return;
            }
            this.setInstanceProps(n);
        }
    }
};
</script>

<style>

</style>
