|
|
@ -308,7 +308,7 @@ |
|
|
|
}) : o.invisible; |
|
|
|
}) : o.invisible; |
|
|
|
if (invisible) { |
|
|
|
if (invisible) { |
|
|
|
// 用display属性做显示和隐藏,否则jquery会在显示时将display设为block会覆盖掉display:flex属性
|
|
|
|
// 用display属性做显示和隐藏,否则jquery会在显示时将display设为block会覆盖掉display:flex属性
|
|
|
|
this.element.css("display", "none"); |
|
|
|
this.__setElementVisible(false); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
@ -513,13 +513,17 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__setElementVisible: function (visible) { |
|
|
|
|
|
|
|
this.element.css("display", visible ? "" : "none"); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_innerSetVisible: function (visible) { |
|
|
|
_innerSetVisible: function (visible) { |
|
|
|
var self = this, o = this.options; |
|
|
|
var self = this, o = this.options; |
|
|
|
var lastVisible = !o.invisible; |
|
|
|
var lastVisible = !o.invisible; |
|
|
|
this._setVisible(visible); |
|
|
|
this._setVisible(visible); |
|
|
|
if (visible === true) { |
|
|
|
if (visible === true) { |
|
|
|
// 用this.element.show()会把display属性改成block
|
|
|
|
// 用this.element.show()会把display属性改成block
|
|
|
|
this.element.css("display", ""); |
|
|
|
this.__setElementVisible(true); |
|
|
|
this._mount(); |
|
|
|
this._mount(); |
|
|
|
if (o.animation && !lastVisible) { |
|
|
|
if (o.animation && !lastVisible) { |
|
|
|
this.element.removeClass(o.animation + "-leave").removeClass(o.animation + "-leave-active").addClass(o.animation + "-enter"); |
|
|
|
this.element.removeClass(o.animation + "-leave").removeClass(o.animation + "-leave-active").addClass(o.animation + "-enter"); |
|
|
@ -552,10 +556,10 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
this._animationDuring = setTimeout(function () { |
|
|
|
this._animationDuring = setTimeout(function () { |
|
|
|
self.element.removeClass(o.animation + "-leave").removeClass(o.animation + "-leave-active"); |
|
|
|
self.element.removeClass(o.animation + "-leave").removeClass(o.animation + "-leave-active"); |
|
|
|
self.element.css("display", "none"); |
|
|
|
self.__setElementVisible(false); |
|
|
|
}, o.animationDuring); |
|
|
|
}, o.animationDuring); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.element.css("display", "none"); |
|
|
|
this.__setElementVisible(false); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|