Commit d3d0f5ab authored by 何虹's avatar 何虹 💬

测试

parent f63b5a4a
......@@ -2,7 +2,7 @@
"name": "hs-sky-ui",
"version": "2.0.0",
"description": "hs组件库",
"main": "lib/hs-sky-ui.common.js",
"main": "./lib/hs-sky-ui.common.js",
"keyword": "hscomponent hs-sky-ui",
"private": false,
"files": [
......
import Vue from 'vue'
const requireComponent_ = require.context('./', true, /index.vue$/)
const obj={}
requireComponent_.keys().forEach(fileName => {
const componentConfig = requireComponent_(fileName)
const { name } = componentConfig.default
if (name) {
Vue.component(name, componentConfig.default || componentConfig)
obj[name]=componentConfig
}
import hsInput from './hs-input/index.vue'
const components={
hsInput
}
Object.keys(components).forEach(name=>{
Vue.component(name, components[name])
})
export default obj
\ No newline at end of file
export default components
// const requireComponent_ = require.context('./', true, /index.vue$/)
// const obj={}
// requireComponent_.keys().forEach(fileName => {
// const componentConfig = requireComponent_(fileName)
// const { name } = componentConfig.default
// if (name) {
// Vue.component(name, componentConfig.default || componentConfig)
// obj[name]=componentConfig
// }
// })
// export default obj
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment