Comparing version 0.1.5 to 0.1.6
import { ObjectDirective } from 'vue'; | ||
interface ZIndexableElement extends HTMLElement { | ||
'@@ziContext': { | ||
enabled?: boolean; | ||
enabled: boolean; | ||
initialized: boolean; | ||
}; | ||
@@ -6,0 +7,0 @@ } |
@@ -8,8 +8,10 @@ import zIndexManager from './z-index-manager'; | ||
const { zIndex, enabled } = value; | ||
el[ctx] = { | ||
enabled: !!enabled, | ||
initialized: false | ||
}; | ||
if (enabled) { | ||
zIndexManager.ensureZIndex(el, zIndex); | ||
el[ctx].initialized = true; | ||
} | ||
el[ctx] = { | ||
enabled | ||
}; | ||
}, | ||
@@ -22,6 +24,9 @@ updated(el, bindings) { | ||
zIndexManager.ensureZIndex(el, zIndex); | ||
el[ctx].initialized = true; | ||
} | ||
el[ctx].enabled = enabled; | ||
el[ctx].enabled = !!enabled; | ||
}, | ||
unmounted(el, bindings) { | ||
if (!el[ctx].initialized) | ||
return; | ||
const { value = {} } = bindings; | ||
@@ -28,0 +33,0 @@ const { zIndex } = value; |
import { ObjectDirective } from 'vue'; | ||
interface ZIndexableElement extends HTMLElement { | ||
'@@ziContext': { | ||
enabled?: boolean; | ||
enabled: boolean; | ||
initialized: boolean; | ||
}; | ||
@@ -6,0 +7,0 @@ } |
@@ -10,8 +10,10 @@ "use strict"; | ||
const { zIndex, enabled } = value; | ||
el[ctx] = { | ||
enabled: !!enabled, | ||
initialized: false | ||
}; | ||
if (enabled) { | ||
z_index_manager_1.default.ensureZIndex(el, zIndex); | ||
el[ctx].initialized = true; | ||
} | ||
el[ctx] = { | ||
enabled | ||
}; | ||
}, | ||
@@ -24,6 +26,9 @@ updated(el, bindings) { | ||
z_index_manager_1.default.ensureZIndex(el, zIndex); | ||
el[ctx].initialized = true; | ||
} | ||
el[ctx].enabled = enabled; | ||
el[ctx].enabled = !!enabled; | ||
}, | ||
unmounted(el, bindings) { | ||
if (!el[ctx].initialized) | ||
return; | ||
const { value = {} } = bindings; | ||
@@ -30,0 +35,0 @@ const { zIndex } = value; |
{ | ||
"name": "vdirs", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Helper directives for Vue.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17538
497