UNPKG

t-comm

Version:

专业、稳定、纯粹的工具库

22 lines (19 loc) 651 B
import { a as __spreadArray } from '../tslib.es6-096fffdd.js'; import { hyphenate } from '../string/string.js'; function getPagesJsonCondition(componentConfig) { var allList = Object.values(componentConfig).reduce(function (acc, item) { return __spreadArray(__spreadArray([], acc, true), item.list || [], true); }, []).filter(function (item) { return !item.demoRedirect; }).map(function (item) { return { name: item.name, path: ['pages', item.subPackage || 'press', hyphenate(item.name), hyphenate(item.name)].join('/') }; }); return { current: 0, list: allList }; } export { getPagesJsonCondition };