UNPKG

press-ui

Version:

简单、易用的跨端组件库,兼容 Vue2 和 Vue3,同时支持 uni-app和普通 Vue 项目

24 lines (20 loc) 404 B
function sortComponentConfig(config) { return Object.keys(config).reduce((acc, key) => { const value = config[key]; value.list.sort((a, b) => { if (a.name > b.name) return 1; if (b.name > a.name) return -1; return 0; }); acc = { ...acc, [key]: { ...value, }, }; return acc; }, {}); } module.exports = { sortComponentConfig, };