feat: inline mode

This commit is contained in:
redhoodsu
2024-07-12 16:32:26 +08:00
parent 649bbb44ef
commit 5e23ffaec7
5 changed files with 62 additions and 2 deletions

View File

@@ -36,9 +36,12 @@ export default {
tool,
autoScale = true,
useShadowDom = true,
inline = false,
defaults = {},
} = {}) {
if (this._isInit) return
if (this._isInit) {
return
}
this._isInit = true
this._scale = 1
@@ -51,7 +54,14 @@ export default {
this._initTools(tool)
this._registerListener()
if (autoScale) this._autoScale()
if (autoScale) {
this._autoScale()
}
if (inline) {
this._entryBtn.hide()
this._$el.addClass('eruda-inline')
this.show()
}
},
_isInit: false,
version: VERSION,

View File

@@ -43,6 +43,12 @@
font-weight: normal;
}
}
&.inline {
position: static;
.dev-tools {
height: 100% !important;
}
}
}
.hidden {