ant-design-vue/index-with-locales.js

12 lines
286 B
JavaScript
Raw Normal View History

2018-03-18 19:59:38 +08:00
const antd = require('./components')
const req = require.context('./components', true, /^\.\/locale-provider\/.+_.+\.js$/)
antd.locales = {}
req.keys().forEach((mod) => {
const match = mod.match(/\/([^/]+).js$/)
antd.locales[match[1]] = req(mod).default
})
module.exports = antd