Commit 0d967d6f authored by lvtz's avatar lvtz

fix

parent 3e88d75f
......@@ -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)) {
......
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