dataease/frontend/src/components/IconSelect/requireIcons.js
fit2cloud-chenyw f04809c638 feat: 新前端
2021-03-03 15:06:52 +08:00

12 lines
239 B
JavaScript

const req = require.context('@/icons/svg', false, /\.svg$/)
const requireAll = requireContext => requireContext.keys()
const re = /\.\/(.*)\.svg/
const icons = requireAll(req).map(i => {
return i.match(re)[1]
})
export default icons