From 15226406e463173b92d9cbc9d5b3ecffb5542ab3 Mon Sep 17 00:00:00 2001 From: Raiondesu Date: Sat, 31 Mar 2018 03:03:49 +0300 Subject: [PATCH 1/6] Inital proposal - not working well. --- README.md | 2 ++ example/src/App.vue | 3 ++- example/src/README.html | 7 +++++++ lib/misc.js | 2 ++ lib/vue-simple-suggest.vue | 27 ++++++++++++++++++++++----- 5 files changed, 35 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4648170a..ff70467c 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,7 @@ JS object: :remove-list="false" :filter-by-query="false" :value="defaultValue" + :mode="string" :controls="{ selectionUp: [38, 33], selectionDown: [40, 34], @@ -219,6 +220,7 @@ JS object: | `destyled` | Boolean | `false` | Whether to cancel the default styling of input and suggestions list. | | `remove-list` | Boolean | `false` | If true - the suggestion list will be always hidden. | | `filter-by-query` | Boolean | `false` | Whether to filter the resulting suggestions by input's text query (make it a search component). | +| `mode` | String | 'string' | The `v-model` mode. Determines the type of `v-model`'s value - can be one of `'string'`, `'object'` or `'number'`, where the `'number'` binds an item's index to v-model. | | type, value, pattern, etc... | | | All of the HTML5 input attributes with their respected default values. | ----- diff --git a/example/src/App.vue b/example/src/App.vue index a8b58d09..8697a392 100644 --- a/example/src/App.vue +++ b/example/src/App.vue @@ -1,13 +1,14 @@