UNPKG

ll-package

Version:

2 lines (1 loc) 558 B
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../../../@babel/runtime/helpers/esm/extends.js"),n=require("../../../_util/raf.js"),u=require("vue");function d(o){const e=u.ref(null),r=u.reactive(t.default({},o)),a=u.ref([]),s=f=>{e.value===null&&(a.value=[],e.value=n.default(()=>{let l;a.value.forEach(c=>{l=t.default(t.default({},l),c)}),t.default(r,l),e.value=null})),a.value.push(f)};return u.onMounted(()=>{e.value&&n.default.cancel(e.value)}),[r,s]}exports.default=d;