index.mjs 501 B

1234567891011121314151617181920
  1. import { ref, computed } from 'vue';
  2. import { useGlobalConfig } from '../use-global-config/index.mjs';
  3. const zIndex = ref(0);
  4. const useZIndex = () => {
  5. const initialZIndex = useGlobalConfig("zIndex", 2e3);
  6. const currentZIndex = computed(() => initialZIndex.value + zIndex.value);
  7. const nextZIndex = () => {
  8. zIndex.value++;
  9. return currentZIndex.value;
  10. };
  11. return {
  12. initialZIndex,
  13. currentZIndex,
  14. nextZIndex
  15. };
  16. };
  17. export { useZIndex };
  18. //# sourceMappingURL=index.mjs.map