Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation in README.md could be improved #38

Open
irlabs opened this issue Jun 8, 2023 · 1 comment
Open

Installation in README.md could be improved #38

irlabs opened this issue Jun 8, 2023 · 1 comment

Comments

@irlabs
Copy link

irlabs commented Jun 8, 2023

If you are using Vue as a standalone script and using the browser bundle in a script tag like

<script src="https://unpkg.com/vue3-simple-typeahead"></script>

then the import and app.use(SimpleTypeahead) won't work.

Instead, I got it working with:

const { createApp } = Vue

var vm = createApp({
 ...
})
vm.component('vue3-simple-typeahead', Vue3SimpleTypeahead)
vm.mount('#app')

Especially knowing about the (new?) module name Vue3SimpleTypeahead instead of SimpleTypeahead would have saved me some investigation and digging.

@irlabs
Copy link
Author

irlabs commented Jun 13, 2023

Another thing which was mentioned, but would have been good to be included in an example of how to use this as a browser bundle, is the use of the lower-kebab-case for properties:

<vue3-simple-typeahead
  :placeholder="options.placeholder"
  :min-input-length="options.minInputLength"
  :select-on-tab="options.selectOnTab"
  @select-item="selectItem"
  @on-input="onInput"
  @on-focus="onFocus"
  @on-blur="onBlur"
  v-model="myModel"
>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant