forked from mattzollinhofer/vue-typeahead-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
- Loading branch information
1 parent
75e70ec
commit 2f5385d
Showing
11 changed files
with
242 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<template> | ||
<div> | ||
<div class="pl-1 pb-2 pt-3">Selected Country: {{ query }}</div> | ||
<vue-bootstrap-autocomplete | ||
class="mb-4" | ||
:data="[ | ||
'Canada', | ||
'United Kingdom', | ||
'United States', | ||
'Mexico', | ||
'Netherlands', | ||
]" | ||
v-model="query" | ||
showOnFocus | ||
placeholder="Choose a country" | ||
@blur="() => onEvent('blur')" | ||
@focus="() => onEvent('focus')" | ||
@hit="() => onEvent('hit')" | ||
@input="() => onEvent('input')" | ||
@keyup="() => onEvent('keyup')" | ||
@paste="() => onEvent('paste')" | ||
/> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import "bootstrap-vue/dist/bootstrap-vue.css"; | ||
import VueBootstrapAutocomplete from "../../../src/components/VueBootstrapAutocomplete"; | ||
export default { | ||
name: "EventsDemo", | ||
components: { VueBootstrapAutocomplete }, | ||
data() { | ||
return { | ||
query: "", | ||
}; | ||
}, | ||
methods: { | ||
onEvent(event) { | ||
this.$bvToast.toast(event, { | ||
title: "Event emitted", | ||
autoHideDelay: 5000, | ||
variant: "info", | ||
solid: true, | ||
}); | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style lang="scss"> | ||
@import "bootstrap/scss/bootstrap.scss"; | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { ToastPlugin } from "bootstrap-vue"; | ||
|
||
export default ({ Vue, options, router, siteData, isServer }) => { | ||
Vue.use(ToastPlugin); | ||
}; |
Oops, something went wrong.