fix(console): blank bottom if js input is disabled

This commit is contained in:
redhoodsu
2019-10-11 16:31:56 +08:00
parent 6576fa87bc
commit eaad70a7e4
2 changed files with 12 additions and 2 deletions

View File

@@ -91,9 +91,16 @@ export default class Console extends Tool {
this._rmCfg()
}
_enableJsExecution(enabled) {
const $el = this._$el.find('.eruda-js-input')
const $el = this._$el
const $jsInput = $el.find('.eruda-js-input')
enabled ? $el.show() : $el.hide()
if (enabled) {
$jsInput.show()
$el.rmClass('eruda-js-input-hidden')
} else {
$jsInput.hide()
$el.addClass('eruda-js-input-hidden')
}
}
_registerListener() {
this._scaleListener = scale => (this._scale = scale)

View File

@@ -4,6 +4,9 @@
.dev-tools {
.tools {
.console {
&.js-input-hidden {
padding-bottom: 0;
}
.control {
@include absolute(100%, 40px);
cursor: default;