Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sbruhns/vue-v-tribute
vue wrapper for tributejs (https://github.com/zurb/tribute)
https://github.com/sbruhns/vue-v-tribute
Last synced: 6 days ago
JSON representation
vue wrapper for tributejs (https://github.com/zurb/tribute)
- Host: GitHub
- URL: https://github.com/sbruhns/vue-v-tribute
- Owner: sbruhns
- License: mit
- Created: 2020-10-08T18:17:22.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-01-07T16:09:57.000Z (almost 4 years ago)
- Last Synced: 2024-03-24T06:20:36.694Z (8 months ago)
- Language: TypeScript
- Size: 293 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vue-v-tribute
vue wrapper for tributejs (https://github.com/zurb/tribute)## Setup
```
npm i vue-v-tribute
```## Provide default tributejs options for Vue Plugin
You can provide any option supported by tributejs https://github.com/zurb/tribute/blob/master/src/Tribute.js#L8-L33
```ts
...
import VueVTribute from 'vue-v-tribute'
...Vue.use(VueVTribute, {
noMatchTemplate: () => null,
lookup: 'name',
menuItemTemplate: (item: TributeItem) => {
return `${item.original.name} - ${item.original.username}`;
},
selectTemplate: function(item: TributeItem) {
return '@' + item.original.username;
},
});
```## Use as directive
```html
...
...
```## Use as directive on wrapper element or wrapper component
```html
...
...
```