vuestic-ui
Version:
Vue 3 UI Framework
22 lines (21 loc) • 442 B
JavaScript
import { shallowRef, computed, unref } from "vue";
import { u as unwrapEl } from "../utils/unwrapEl.mjs";
const unrefElement = (el) => {
const e = unref(el);
return unwrapEl(e);
};
const useElementRef = () => {
const el = shallowRef();
return computed({
get() {
return unrefElement(el);
},
set(node) {
el.value = node;
}
});
};
export {
useElementRef as u
};
//# sourceMappingURL=useElementRef.mjs.map