@meve/ui
Version:
Argon design system components library
25 lines (23 loc) • 497 B
JavaScript
import context from '../../context';
export function createZIndexMixin(state, count) {
var _watch;
if (count === void 0) {
count = 1;
}
return {
data: function data() {
return {
zIndex: context.zIndex
};
},
watch: (_watch = {}, _watch[state] = {
handler: function handler(newValue) {
if (newValue) {
context.zIndex += count;
this.zIndex = context.zIndex;
}
},
immediate: true
}, _watch)
};
}