vuestic-ui
Version:
Vue 3 UI Framework
13 lines (12 loc) • 387 B
JavaScript
import { getCurrentInstance } from "vue";
import { u as useAppGlobal } from "./useAppGlobal.mjs";
const useComponentUuid = () => {
const vm = getCurrentInstance();
const counter = useAppGlobal("uuidCounter", 0);
vm.$vaUuid = vm.$vaUuid || `va-${counter.value++}`;
return `va-${counter.value}`;
};
export {
useComponentUuid as u
};
//# sourceMappingURL=useComponentUuid.mjs.map