UNPKG

@aplus-frontend/ui

Version:

2 lines (1 loc) 595 B
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),r=Symbol("ApKeepAliveProvideKey"),p=(t,s)=>{i.provide(r,{getter:async e=>{await i.nextTick();const a=t.get(s.value);return a?e?a?.get(e):Object.fromEntries(a):{}},setter:async(e,a)=>{await i.nextTick();let n=t.get(s.value);return n||(n=new Map,t.set(s.value,n)),n?.set(e,a)},has:async e=>(await i.nextTick(),e?!!t.get(s.value)?.has(e):t.has(s.value))})},v=()=>i.inject(r,{getter:async()=>{},setter:async()=>{},has:async()=>{}});exports.useApKeepAliveInject=v;exports.useApKeepAliveProvide=p;