2
0
mirror of https://github.com/tenrok/vue-tribute.git synced 2026-05-17 04:09:39 +03:00
Collin Henderson ec27be1d20 Docs and such
2022-01-24 12:04:50 -05:00
2022-01-24 09:40:45 -05:00
2022-01-24 09:40:45 -05:00
2022-01-24 12:04:50 -05:00
2022-01-24 09:49:51 -05:00
2022-01-24 09:40:45 -05:00
2022-01-24 09:40:45 -05:00
2022-01-24 12:04:50 -05:00
2022-01-24 09:49:51 -05:00
2022-01-24 09:40:45 -05:00
2022-01-24 09:40:45 -05:00
2022-01-24 09:40:45 -05:00
2022-01-24 12:04:50 -05:00
2022-01-24 09:40:45 -05:00
2022-01-24 12:04:50 -05:00
2022-01-24 12:04:50 -05:00
2022-01-24 09:49:51 -05:00
2022-01-24 09:40:45 -05:00
2022-01-24 09:40:45 -05:00
2022-01-24 10:11:19 -05:00

vue-tribute test

A tiny Vue.js wrapper around Zurb's Tribute library for ES6 native @mentions.

🚦 Looking for Vue 2 support? Check out the master branch.

Install

$ npm install vue-tribute@next --save
# or...
$ yarn add vue-tribute@next

or

Use the UMD build from Unpkg, available as VueTribute in the global scope.

<script src="/vendor/vue.js" />
<script src="https://unpkg.com/vue-tribute@next" />

Globally

Import and register the module as a plugin.

import { createApp } from 'vue'
import App from './App.vue'
import VueTribute from 'vue-tribute'

createApp(App).use(VueTribute).mount('#app')

Per-component

import { VueTribute } from 'vue-tribute'

export default {
  components: { VueTribute },
  setup() {
    ...
  },
}

Usage

Wrap a single text input, textarea, or contenteditable element within the VueTribute component. You should then pass a valid Tribute collection(s) object to the component.

Events

All custom Tribute events will work as expected. Simply attach listeners for them like you would any other event.

<template>
  <vue-tribute :options="options">
    <input type="text" placeholder="@..." @tribute-replaced="doSomething" />
  </vue-tribute>
</template>

License

MIT © Collin Henderson

S
Description
No description provided
Readme MIT 1.5 MiB
Languages
Vue 62.5%
JavaScript 37.5%