A Vue2 Plugin for Input Content Suggestions | v-suggest

v-suggest is an additional Vue2 to submit input content suggestions and supports the use of a switch for rapid mobility and selection, it uses an experiment like the search engine entry element.

vuejs autocomplete input example, vue simple suggest, vuejs autocomplete component, vue js autocomplete from database, vue js suggestion list

vue-simple-suggest

How to use it:

Installation

npm i v-suggest -S

Include and install a plugin in your main.js file.

// Globally install plugin
import Vue from 'vue'
import Suggest from 'v-suggest'
Vue.use(Suggest)

// Import Suggest as a local component
import { Suggest } from 'v-suggest'
export default {
  components: {
    'v-suggest': Suggest
  }
}

Usage

<template>
  <v-suggest
    :data="example"
    show-field="name"
    v-model="myValue"
  ></v-suggest>
</template>

<script>
export default {
  data () {
    return {
      myValue: '',
      example: [
        { id: 1, name: 'Chicago Bulls', desc: '芝加哥公牛' },
        { id: 2, name: 'Cleveland Cavaliers', desc: '克里夫兰骑士' },
        { ... }
      ]
    }
  }
}
</script>

input content suggestion vue js, v-suggest plugin/github, vue 3 autocomplete example


See Demo And Download

Developer Name: TerryZ

Official Website: Click Here

Share

You may also like...

Leave a Reply

Your email address will not be published.