From 2f5385dbab84bf8f495fe54735921ddae36dd742 Mon Sep 17 00:00:00 2001 From: Drikus Roor Date: Sun, 25 Sep 2022 12:07:58 +0200 Subject: [PATCH] Emit paste event on paste (#3) * Emit paste event on paste Related to #1 #2 * Add paste event to reference.md * Show events in toast as example * Format examples * Update package version and changelog --- CHANGELOG.md | 4 + docs/.vuepress/components/APIExample.vue | 4 +- .../.vuepress/components/CustomSuggestion.vue | 4 +- docs/.vuepress/components/EventsDemo.vue | 53 ++++ docs/.vuepress/components/HomePageDemo.vue | 3 +- docs/.vuepress/enhanceApp.js | 5 + docs/examples/examples.md | 255 +++++++++++------- docs/guide/reference.md | 5 +- package.json | 2 +- src/components/VueBootstrapAutocomplete.vue | 3 +- tests/unit/VueTypeaheadBootstrap.spec.js | 6 + 11 files changed, 242 insertions(+), 102 deletions(-) create mode 100644 docs/.vuepress/components/EventsDemo.vue create mode 100644 docs/.vuepress/enhanceApp.js diff --git a/CHANGELOG.md b/CHANGELOG.md index ae5654b..c983104 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.14.0 - 25 Sep 2022 +- Update docs with event examples +- Emit paste event from input + ## 2.13.0 - 22 Sep 2022 - Update npm dependencies and replace node-sass by dart-sass - Update/vuepress dart sass diff --git a/docs/.vuepress/components/APIExample.vue b/docs/.vuepress/components/APIExample.vue index de395c8..5a32e06 100644 --- a/docs/.vuepress/components/APIExample.vue +++ b/docs/.vuepress/components/APIExample.vue @@ -26,7 +26,7 @@ export default { name: "APIExample", components: {VueBootstrapAutocomplete}, - data(){ + data() { return { query: '', selecteduser: null, @@ -35,7 +35,7 @@ }, methods: { - lookupUser: debounce(function(){ + lookupUser: debounce(function() { // in practice this action should be debounced fetch(`https://api.github.com/search/users?q=${this.query}`) .then(response => { diff --git a/docs/.vuepress/components/CustomSuggestion.vue b/docs/.vuepress/components/CustomSuggestion.vue index 13e1c3b..487dd16 100644 --- a/docs/.vuepress/components/CustomSuggestion.vue +++ b/docs/.vuepress/components/CustomSuggestion.vue @@ -42,7 +42,7 @@ export default { name: "APIExample", components: {VueBootstrapAutocomplete}, - data(){ + data() { return { query: '', selecteduser: null, @@ -51,7 +51,7 @@ }, methods: { - lookupUser: debounce(function(){ + lookupUser: debounce(function() { // in practice this action should be debounced fetch(`https://api.github.com/search/users?q=${this.query}`) .then(response => { diff --git a/docs/.vuepress/components/EventsDemo.vue b/docs/.vuepress/components/EventsDemo.vue new file mode 100644 index 0000000..ca4969a --- /dev/null +++ b/docs/.vuepress/components/EventsDemo.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/docs/.vuepress/components/HomePageDemo.vue b/docs/.vuepress/components/HomePageDemo.vue index 42a533c..cccb9a1 100644 --- a/docs/.vuepress/components/HomePageDemo.vue +++ b/docs/.vuepress/components/HomePageDemo.vue @@ -2,6 +2,7 @@
Selected Country: {{query}}
{ + Vue.use(ToastPlugin); +}; diff --git a/docs/examples/examples.md b/docs/examples/examples.md index fc11c63..38d332d 100644 --- a/docs/examples/examples.md +++ b/docs/examples/examples.md @@ -1,11 +1,12 @@ # Examples -## Basic +## Basic + ```vue ``` ## Custom Suggestion Slot + ```vue