diff --git a/src/components/CommandRunResult.vue b/src/components/CommandRunResult.vue index 1deccbc..48cb926 100644 --- a/src/components/CommandRunResult.vue +++ b/src/components/CommandRunResult.vue @@ -14,18 +14,18 @@ 运行结果 + - - + + - - - ::-webkit-scrollbar { + width: 6px; + height: 6px; +} + +::-webkit-scrollbar-thumb { + border-radius: 10px; + box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); + background: rgba(194, 194, 194, 0.4); +} + +::-webkit-scrollbar-track { + border-radius: 10px; + box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); +} +body { + margin: 0; + color: ${utools.isDarkColors() ? "white" : "unset"} +} + +`; + export default { data() { return { @@ -80,6 +99,7 @@ export default { historyIdx: null, htmlOutput: false, frameHeight: 0, + frameStyle: frameStyle, }; }, props: { @@ -280,8 +300,6 @@ export default { // 加载时更改样式 frameLoad() { let cfw = this.$refs?.iframe?.contentWindow; - if (this.$q.dark.isActive) cfw.document.body.style.color = "white"; - cfw.document.body.style.margin = "0"; this.frameHeight = Math.min( cfw.document.body.scrollHeight, this.maxHeight @@ -304,5 +322,6 @@ export default { } iframe { width: 100%; + display: block; }