<template>
  <el-select required :value="value" @input="$emit('input', $event)">
    <el-option label="等于" :value="1" />
    <el-option label="不等于" :value="2" />
    <el-option v-show="condition.field && (condition.field.type == 2 || condition.field.type == 3)" label="大于" :value="3" />
    <el-option v-show="condition.field && (condition.field.type == 2 || condition.field.type == 3)" label="大于等于" :value="4" />
    <el-option v-show="condition.field && (condition.field.type == 2 || condition.field.type == 3)" label="小于" :value="5" />
    <el-option v-show="condition.field && (condition.field.type == 2 || condition.field.type == 3)" label="小于等于" :value="6" />
    <el-option v-show="condition.field && condition.field.type == 1" label="包含" :value="7" />
    <el-option v-show="condition.field && condition.field.type == 1" label="不包含" :value="8" />
  </el-select>
</template>

<script>
export default {
  props: {
    // eslint-disable-next-line vue/require-default-prop
    value: {
      type: Number
    },
    condition: {
      type: Object,
      default() {
        return {}
      }
    }
  }
}
</script>
