UNPKG

@vuesax-alpha/nightly

Version:
31 lines (26 loc) 565 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var vue = require('vue'); const useGroupProvide = (key, data) => { const children = vue.reactive([]); const insert = (child) => { children.push(child); }; const remove = (child) => { const index = children.indexOf(child); children.splice(index, 1); }; vue.provide(key, { ...data, children, insert, remove }); return { children, insert, remove }; }; exports.useGroupProvide = useGroupProvide; //# sourceMappingURL=index.js.map