<template>
  <el-form-item :label="i18nt('designer.setting.alignType')">
    <el-select v-model="optionModel.alignType">
      <el-option v-for="(item, idx) in classList" :key="idx" :label="item.name" :value="item.value"></el-option>
    </el-select>
  </el-form-item>
</template>

<script>
  import i18n from "../../../../../components/xform/utils/i18n";
  import {deepClone} from "../../../../../components/xform/utils/util";

  export default {
    name: "alignType-editor",
    componentName: 'PropertyEditor',
    mixins: [i18n],
    props: {
      designer: Object,
      selectedWidget: Object,
      optionModel: Object,
    },
    data() {
      return {
        classList:[{
          name:'左对齐',
          value:'left'
        },{
          name:'居中对齐',
          value:'center'
        },{
          name:'右对齐',
          value:'right'
        }],
      }
    },
    created() {
      this.cssClassList = deepClone(this.designer.getCssClassList())
      //监听表单css代码改动事件并重新加载！
      this.designer.handleEvent('form-css-updated', (cssClassList) => {
        this.cssClassList = cssClassList
      })
    }
  }
</script>

<style scoped>

</style>
