<template>
    <div class="ht-base-auto-complete-custom-demo">
        <ht-base-auto-complete
                v-model="value2"
                @on-search="handleSearch2"
                placeholder="input here"
                style="width:200px">
            <ht-base-option v-for="item in data2" :value="item" :key="item">{{ item }}</ht-base-option>
        </ht-base-auto-complete>
    </div>
</template>

<script>
  export default {
      name: 'HtBaseAutoCompleteCustomDemo',
      data () {
          return {
              value2: '',
              data2: []
          }
      },
      methods: {
          handleSearch2 (value) {
              this.data2 = !value || value.indexOf('@') >= 0 ? [] : [
                  value + '@qq.com',
                  value + '@sina.com',
                  value + '@163.com'
              ];
          }
      }
  }
</script>
<style lang="less">
    .ht-base-auto-complete-custom-demo {

    }
</style>

