Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hs-sky-ui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
何虹
hs-sky-ui
Commits
7db21cad
Commit
7db21cad
authored
Apr 30, 2020
by
何虹
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
兼容
parent
6c9a4f36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
index.js
src/packages/index.js
+4
-2
No files found.
src/packages/index.js
View file @
7db21cad
import
Vue
from
'vue'
import
Vue
from
'vue'
const
requireComponent_
=
require
.
context
(
'./'
,
true
,
/index.vue$/
)
const
requireComponent_
=
require
.
context
(
'./'
,
true
,
/index.vue$/
)
const
obj
=
{}
requireComponent_
.
keys
().
forEach
(
fileName
=>
{
requireComponent_
.
keys
().
forEach
(
fileName
=>
{
const
componentConfig
=
requireComponent_
(
fileName
)
const
componentConfig
=
requireComponent_
(
fileName
)
const
{
name
}
=
componentConfig
.
default
const
{
name
}
=
componentConfig
.
default
if
(
name
)
{
if
(
name
)
{
Vue
.
component
(
name
,
componentConfig
.
default
||
componentConfig
)
Vue
.
component
(
name
,
componentConfig
.
default
||
componentConfig
)
obj
[
name
]
=
componentConfig
.
default
}
}
})
})
export
default
{
export
default
obj
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment