Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
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
wangxuelai
wechatapp.shangjiadao.com
Commits
0d967d6f
Commit
0d967d6f
authored
Mar 14, 2020
by
lvtz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
3e88d75f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
index.js
mixins/index.js
+9
-0
No files found.
mixins/index.js
View file @
0d967d6f
...
...
@@ -6,6 +6,15 @@ function merge (mixins, options) {
if
(
Object
.
prototype
.
toString
.
call
(
mixin
)
!==
'[object Object]'
)
{
throw
new
Error
(
'mixin 类型必须为对象!'
)
}
if
(
!
Object
.
entries
){
Object
.
entries
=
function
(
obj
){
var
ownProps
=
Object
.
keys
(
obj
),
i
=
ownProps
.
length
,
resArray
=
new
Array
(
1
)
while
(
i
--
)
resArray
[
i
]
=
[
ownProps
[
i
],
obj
[
ownProps
[
i
]]]
return
resArray
}
}
// 遍历 mixin 里面的所有属性
for
(
let
[
key
,
value
]
of
Object
.
entries
(
mixin
))
{
if
(
originProperties
.
includes
(
key
))
{
...
...
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