1.1.3 • Published 5 years ago
vue-v-tribute v1.1.3
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
...
import VueVTribute from 'vue-v-tribute'
...
Vue.use(VueVTribute, {
noMatchTemplate: () => null,
lookup: 'name',
menuItemTemplate: (item: TributeItem<any>) => {
return `${item.original.name} - ${item.original.username}`;
},
selectTemplate: function(item: TributeItem<any>) {
return '@' + item.original.username;
},
});
Use as directive
...
<input
type="text"
v-tribute="{values: [ { name: 'Firstname Lastname', username: 'fila' }, { name: 'Max Mustermann', username: 'madmax' }]}"
>
</input>
...
Use as directive on wrapper element or wrapper component
...
<your-custom-input-component
v-tribute="{values: [ { name: 'Firstname Lastname', username: 'fila' }, { name: 'Max Mustermann', username: 'madmax' }]}"
>
</your-custom-input-component>
...
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.0
5 years ago
0.1.24
5 years ago
0.1.23
5 years ago
0.1.22
5 years ago
0.1.21
5 years ago
0.1.20
5 years ago
0.1.19
5 years ago
0.1.18
5 years ago
0.1.17
5 years ago
0.1.15
5 years ago
0.1.14
5 years ago
0.1.13
5 years ago
0.1.12
5 years ago
0.1.11
5 years ago
0.1.10
5 years ago
0.1.9
5 years ago
0.1.8
5 years ago
0.1.7
5 years ago
0.1.4
5 years ago
0.1.3
5 years ago
0.1.6
5 years ago
0.1.5
5 years ago
0.1.2
5 years ago
0.1.1
5 years ago
0.1.0
5 years ago