4 Star 14 Fork 7

金蝶云 / kdesign

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.js 708 Bytes
一键复制 编辑 原始数据 按行查看 历史
/* eslint no-console:0 */
function camelCase(name) {
return name.charAt(0).toUpperCase() + name.slice(1).replace(/-(\w)/g, (m, n) => n.toUpperCase())
}
const req = require.context('./components', true, /^\.\/[^_][\w-]+\/style\/index\.tsx?$/)
req.keys().forEach((mod) => {
let v = req(mod)
if (v && v.default) {
v = v.default
}
const match = mod.match(/^\.\/([^_][\w-]+)\/index\.tsx?$/)
if (match && match[1]) {
if (['message', 'notification'].includes(match[1])) {
// need nextUI modify
// message & notification should not be capitalized
exports[match[1]] = v
} else {
exports[camelCase(match[1])] = v
}
}
})
module.exports = require('./components')
1
https://gitee.com/kingdee/kdesign.git
git@gitee.com:kingdee/kdesign.git
kingdee
kdesign
kdesign
main

搜索帮助