@opentiny/vue-renderless
Version:
An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.
29 lines (28 loc) • 806 B
JavaScript
import "../../../chunk-G2ADBYYC.js";
import helperCreateTreeFunc from "./helperCreateTreeFunc";
import each from "../base/each";
const eachTreeItem = ({ parent, obj, iterate, context, path, node, parseChildren, opts }) => {
each(obj, (item, index) => {
const paths = path.concat([`${index}`]);
const nodes = node.concat([item]);
iterate.call(context, item, index, obj, paths, parent, nodes);
if (item && parseChildren) {
paths.push(parseChildren);
eachTreeItem({
item,
obj: item[parseChildren],
context,
iterate,
node: nodes,
parseChildren,
path: paths,
opts
});
}
});
};
const eachTree = helperCreateTreeFunc(eachTreeItem);
var eachTree_default = eachTree;
export {
eachTree_default as default
};