mirror of
https://kevinblog.sytes.net/Code/Jibo-Revival-Group/JiboViteDocs.git
synced 2026-06-19 04:56:16 +00:00
Initalize
This commit is contained in:
15
node_modules/@vueuse/integrations/dist/useFocusTrap/component.js
generated
vendored
Normal file
15
node_modules/@vueuse/integrations/dist/useFocusTrap/component.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import { useFocusTrap } from "../useFocusTrap.js";
|
||||
import { defineComponent, h, reactive, shallowRef } from "vue";
|
||||
//#region useFocusTrap/component.ts
|
||||
const UseFocusTrap = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
||||
const target = shallowRef();
|
||||
const data = reactive(useFocusTrap(target, props.options));
|
||||
return () => {
|
||||
if (slots.default) return h(props.as || "div", { ref: target }, slots.default(data));
|
||||
};
|
||||
}, {
|
||||
name: "UseFocusTrap",
|
||||
props: ["as", "options"]
|
||||
});
|
||||
//#endregion
|
||||
export { UseFocusTrap };
|
||||
Reference in New Issue
Block a user