fix
parent
33429266f3
commit
328a7ca6d5
|
@ -85,10 +85,7 @@ Anot.PropsTypes.isBoolean = function() {
|
||||||
/*判定是否是一个朴素的javascript对象(Object),不是DOM对象,不是BOM对象,不是自定义类的实例*/
|
/*判定是否是一个朴素的javascript对象(Object),不是DOM对象,不是BOM对象,不是自定义类的实例*/
|
||||||
Anot.isPlainObject = function(obj) {
|
Anot.isPlainObject = function(obj) {
|
||||||
// 简单的 typeof obj === "object"检测,会致使用isPlainObject(window)在opera下通不过
|
// 简单的 typeof obj === "object"检测,会致使用isPlainObject(window)在opera下通不过
|
||||||
return (
|
return serialize.call(obj) === '[object Object]' && Object.getPrototypeOf(obj) === oproto
|
||||||
serialize.call(obj) === '[object Object]' &&
|
|
||||||
Object.getPrototypeOf(obj) === oproto
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let VMODELS = (Anot.vmodels = {}) //所有vmodel都储存在这里
|
let VMODELS = (Anot.vmodels = {}) //所有vmodel都储存在这里
|
||||||
|
@ -168,11 +165,7 @@ Anot.mix = Anot.fn.mix = function() {
|
||||||
if (target === copy) {
|
if (target === copy) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if (
|
if (deep && copy && (Anot.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) {
|
||||||
deep &&
|
|
||||||
copy &&
|
|
||||||
(Anot.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))
|
|
||||||
) {
|
|
||||||
if (copyIsArray) {
|
if (copyIsArray) {
|
||||||
copyIsArray = false
|
copyIsArray = false
|
||||||
clone = src && Array.isArray(src) ? src : []
|
clone = src && Array.isArray(src) ? src : []
|
||||||
|
@ -278,7 +271,7 @@ Anot.mix({
|
||||||
t = t.trim()
|
t = t.trim()
|
||||||
let hook = hooks[t]
|
let hook = hooks[t]
|
||||||
if (typeof hook === 'object') {
|
if (typeof hook === 'object') {
|
||||||
t = hook.type || type
|
t = hook.type || t
|
||||||
phase = hook.phase || !!phase
|
phase = hook.phase || !!phase
|
||||||
fn = hook.fix ? hook.fix(el, fn) : fn
|
fn = hook.fix ? hook.fix(el, fn) : fn
|
||||||
}
|
}
|
||||||
|
@ -295,7 +288,7 @@ Anot.mix({
|
||||||
t = t.trim()
|
t = t.trim()
|
||||||
let hook = hooks[t]
|
let hook = hooks[t]
|
||||||
if (typeof hook === 'object') {
|
if (typeof hook === 'object') {
|
||||||
t = hook.type || type
|
t = hook.type || t
|
||||||
phase = hook.phase || !!phase
|
phase = hook.phase || !!phase
|
||||||
}
|
}
|
||||||
el.removeEventListener(t, fn, phase)
|
el.removeEventListener(t, fn, phase)
|
||||||
|
|
Reference in New Issue