<template>
  <div>
    <el-form-item :label="i18nt('启用词汇查询')">
      <el-switch v-model="optionModel.commonAttributeEnabled" @change="changeCommonAttributeEnabled"></el-switch>
    </el-form-item>
    <el-form-item :label="i18nt('词汇编码')">
      <el-input type="text" v-model="optionModel.commonAttributeCode"></el-input>
    </el-form-item>
    <el-form-item :label="i18nt('显示字段')">
      <el-input type="text" v-model="optionModel.optionItemLabel"></el-input>
    </el-form-item>
    <el-form-item :label="i18nt('关联字段')">
      <el-input type="text" v-model="optionModel.optionItemValue"></el-input>
    </el-form-item>
  </div>
</template>

<script>
  import i18n from "../../../../../components/xform/utils/i18n"

  export default {
    name: "commonAttributeEnabled-editor",
    mixins: [i18n],
    props: {
      designer: Object,
      selectedWidget: Object,
      optionModel: Object,
    },
    methods:{
      changeCommonAttributeEnabled(val){
        if(val){
          this.optionModel.formScriptEnabled = false;
        }
      }
    }
  }
</script>

<style scoped>

</style>
