fix(console): rendering

This commit is contained in:
redhoodsu
2019-11-01 20:07:31 +08:00
parent 5c182696b1
commit 43c1aaee82

View File

@@ -29,6 +29,10 @@ export default class Console extends Tool {
init($el, container) {
super.init($el)
this._container = container
this._handleShow = () => {
if (!this.active) return
this._logger.renderViewport()
}
this._appendTpl()
@@ -41,7 +45,7 @@ export default class Console extends Tool {
}
show() {
super.show()
this._logger.renderViewport()
this._handleShow()
}
overrideConsole() {
const origConsole = (this._origConsole = {})
@@ -88,6 +92,8 @@ export default class Console extends Tool {
this._logger.destroy()
super.destroy()
this._container.off('show', this._handleShow)
evalCss.remove(this._style)
this.ignoreGlobalErr()
this.restoreConsole()
@@ -199,6 +205,8 @@ export default class Console extends Tool {
if (autoShow) container.showTool('console').show()
})
container.on('show', this._handleShow)
}
_hideInput() {
this._$inputContainer.css({