<template>
  <div class="formDiv"  @mouseenter="show" @mouseleave="hide">
      <div class="formDiv-left">
          <Label :style="{marginLeft:'5px'}">{{property.label}}</Label>
      </div>
      <div class="formDiv-right radioCheckboxStyle">
          <Select  style="width:50%;" >
              <Option v-for="item in radioArr" :value="item.value||''" :key="item.value">{{ item.label }}</Option>
          </Select>
      </div>
      <commomHoverModal ref="commomHoverModal" ></commomHoverModal>

  </div>
</template>

<script>
import {editSetting} from './property';
import commomHoverModal from '../../common/commomHoverModal'

export default {
    // props: {
    //     text: {
    //         type: String,
    //         default: 'Button Text'
    //     },
    //     type: String,
    //     styles: Object
    // },
    components:{
        commomHoverModal
    },
    data () {
        return {
            property:{
                label : '下拉选择',
            },
            text: 'input',
            styles: {height:'40px',width:'70px',margin:'10px'},
            type: 'input',
            single: true,
            level: editSetting.level,
            radioArr:[]
        };
    },
    computed:{
        getLabel(){
            return this.property.label;
        }
    },
    methods:{
        show(){
            this.$refs.commomHoverModal.handleMouseEnter();
        },
        hide(){
            this.$refs.commomHoverModal.handleMouseLeave();
        },
        initTableArr(){
            debugger;
            let currentInstance= this.$store.state.viewport.instances.get(this.$store.state.viewport.currentEditInstanceKey);
            this.radioArr=currentInstance.data.radioArr;
        }
    },
    mounted(){
        this.initTableArr();
    },
    editSetting,
    name: editSetting.key,
    level: editSetting.level
};
</script>

<style scoped>
    .formDiv{
        display:inline-block;
        line-height: 60px;
        text-align: left;
    }
    .radioCheckboxStyle {
        text-align: left;
    }
    .formDiv-left {
        display:inline-block;
        width: 35%;
        height:40px;
        text-align:right;
        font-size:15px;
        float: left;
        margin: 0 10px;
    }
    .formDiv-right {
        width: 60%;
        position: relative;
        display:inline-block;
        float: right;
    }
</style>
