<script>
export default {
  name: "AiInput",
  props: {
    value: {default: ""},
    edit: {default: true},
    placeholder: {default: "请输入"}
  },
  model: {
    prop: 'value',
    event: 'input'
  }
}
</script>

<template>
  <section class="AiInput">
    <el-input v-if="edit" :value="value" size="small" :placeholder="placeholder" v-bind="$attrs"
              @input="v=>$emit('input', v)" clearable autofocus/>
    <b v-else v-text="value"/>
  </section>
</template>

<style scoped lang="scss">
.AiInput {
}
</style>
