saqqdy / directives-lib

Collection of common directives that support vue2 and vue3

Home Page:https://www.saqqdy.com/directives-lib

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

directives-lib

Collection of common directives that support vue2 and vue3

NPM version Codacy Badge tree shaking typescript Test coverage npm download gzip License

Sonar

Experience online

Experience the directives-lib features online Edit in CodeSandbox

Installing

# use pnpm
$ pnpm install directives-lib

# use npm
$ npm install directives-lib --save

Usage

Use in Vue >=3.0

<!-- test.vue -->
<script setup>
import { createApp } from 'vue'
import directives from 'directives-lib'
import App from './App.vue'

const app = createApp(App)
app.use(directives)
app.mount('#app')
</script>

Use in Vue 2.x

<!-- test.vue -->
<script>
import Vue from 'vue'
import directives from 'directives-lib'
import App from './App.vue'

Vue.use(directives)

new Vue({
  render: h => h(App)
}).$mount('#app')
</script>

Using unpkg CDN

<script src="https://unpkg.com/directives-lib@1.0.0/dist/index.global.prod.js"></script>

Support & Issues

Please open an issue here.

License

MIT

About

Collection of common directives that support vue2 and vue3

https://www.saqqdy.com/directives-lib

License:MIT License


Languages

Language:TypeScript 85.7%Language:Shell 14.1%Language:Less 0.3%