You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
433 B
JavaScript
17 lines
433 B
JavaScript
// 得到边框组件的远程列表
|
|
// import _ from 'lodash'
|
|
|
|
const files = require.context('../BorderComponents/', true, /index.vue$/)
|
|
const borderComponents = []
|
|
|
|
files.keys().forEach(key => {
|
|
const title = key.split('/')[1].replace('.vue', '')
|
|
const img = require(`../BorderComponents/${title}/component.png`)
|
|
borderComponents.push({
|
|
title:title,
|
|
img,
|
|
})
|
|
})
|
|
// 抛出边框组件
|
|
export default borderComponents
|