2
0
mirror of https://github.com/tenrok/maska.git synced 2026-06-08 17:22:27 +03:00

Better support for Vue 3.x

This commit is contained in:
Alexander Shabunevich
2020-10-15 13:13:33 +03:00
parent 7cc8274b85
commit ea6f31babd
9 changed files with 30 additions and 16 deletions
+3 -2
View File
@@ -6,8 +6,8 @@ import tokens from './tokens'
function install (Vue) {
Vue.directive('maska', directive)
}
// Install by default if included from script tag
if (typeof window !== 'undefined' && window.Vue) {
// Install by default if included from script tag (only Vue 2)
if (typeof window !== 'undefined' && window.Vue && window.Vue.use) {
window.Vue.use(install)
}
@@ -17,6 +17,7 @@ function create (el, options) {
export default install
export {
install,
create,
mask,
directive as maska,