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

测试

parent f63b5a4a
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "hs-sky-ui", "name": "hs-sky-ui",
"version": "2.0.0", "version": "2.0.0",
"description": "hs组件库", "description": "hs组件库",
"main": "lib/hs-sky-ui.common.js", "main": "./lib/hs-sky-ui.common.js",
"keyword": "hscomponent hs-sky-ui", "keyword": "hscomponent hs-sky-ui",
"private": false, "private": false,
"files": [ "files": [
......
import Vue from 'vue' import Vue from 'vue'
const requireComponent_ = require.context('./', true, /index.vue$/) import hsInput from './hs-input/index.vue'
const obj={} const components={
requireComponent_.keys().forEach(fileName => { hsInput
const componentConfig = requireComponent_(fileName) }
const { name } = componentConfig.default Object.keys(components).forEach(name=>{
if (name) { Vue.component(name, components[name])
Vue.component(name, componentConfig.default || componentConfig)
obj[name]=componentConfig
}
}) })
export default obj export default components
\ No newline at end of file // 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