mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-08 14:34:13 +08:00
修复frame暗黑模式未自动切换
This commit is contained in:
parent
f18bb7b125
commit
ee8a2cf10d
@ -26,7 +26,8 @@
|
||||
<script>
|
||||
import ObjectTree from "components/popup/ObjectTree";
|
||||
|
||||
const frameStyle = `<style>::-webkit-scrollbar {
|
||||
const frameStyle = `<style>
|
||||
::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
}
|
||||
@ -44,7 +45,6 @@ const frameStyle = `<style>::-webkit-scrollbar {
|
||||
body {
|
||||
padding: 10px 20px;
|
||||
margin: 0;
|
||||
color: ${utools.isDarkColors() ? "white" : "unset"}
|
||||
}
|
||||
</style>
|
||||
`;
|
||||
@ -83,6 +83,7 @@ export default {
|
||||
let cfw = this.$refs.iframe.contentWindow;
|
||||
Object.assign(cfw, this.context());
|
||||
cfw.onload = () => {
|
||||
!utools.isDarkColors() || (cfw.document.body.style.color = "white");
|
||||
let clientHeight =
|
||||
cfw.document.documentElement.getBoundingClientRect().height;
|
||||
this.frameHeight = clientHeight === 20 ? 0 : clientHeight;
|
||||
|
Loading…
x
Reference in New Issue
Block a user