Skip to content

Commit 37c1f11

Browse files
committed
修正错误的iframe资源引入导致的报错问题,隐藏编辑器的滚动条
1 parent 5530b9c commit 37c1f11

5 files changed

Lines changed: 59 additions & 67 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# 2.2.1
2+
3+
## 优化
4+
5+
1. 删除了编辑器的滚动条
6+
2. 修复了引入资源路径错误导致的报错
7+
18
# 2.1.4
29

310
## 优化

extension.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"uuid": "7ca98ae04b7142599ab107e34acc8e5e",
44
"displayName": "嘉立创EDA代码编辑器",
55
"description": "支持中文联想的EDA脚本代码编辑器,支持代码高亮、自动补全、函数提示,AI注释,AI报错分析等功能。",
6-
"version": "2.1.4",
6+
"version": "2.2.1",
77
"publisher": "嘉立创EDA",
88
"engines": {
99
"eda": "^2.2.0"

iframe/main/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<!-- 以下全都是ACE的风格文件,如果有需要可以自己添加 东西都在Ace_Editor文件夹里-->
5050
<script src="/iframe/script/Ace_Editor/theme-monokai.js"></script>
5151
<script src="/iframe/script/Ace_Editor/theme-github.js"></script>
52-
<!-- 一些编辑器支持 不想每个都写注释了 自己跳进去看吧 -->
52+
<!-- 一些编辑器支持 -->
5353
<script src="/iframe/script/User_config/message.js"></script>
5454
<script src="/iframe/script/eda_coder/EDA_Codes.js"></script>
5555
<script src="/iframe/script/User_config/ACE_Config.js"></script>

iframe/style/body-dark.css

Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,37 @@ html,
88
body {
99
height: 100%;
1010
overflow: hidden;
11-
background: #272822;
12-
/* 与编辑器背景一致 */
11+
background: #272822; /* Monokai 背景色 */
1312
}
1413

1514
#app {
1615
display: flex;
1716
height: 100vh;
1817
}
1918

20-
/* 左侧可滚动侧边栏 */
19+
/* 左侧侧边栏 */
2120
#sidebar {
2221
width: 120px;
2322
background: #272822;
24-
/* Monokai 背景色 */
2523
color: white;
2624
display: flex;
2725
flex-direction: column;
2826
align-items: center;
2927
padding-top: 16px;
3028
border-right: 1px solid #444;
31-
overflow-y: auto;
32-
/* 允许垂直滚动 */
33-
scrollbar-width: thin;
34-
/* Firefox */
35-
scrollbar-color: #555 #272822;
36-
}
29+
overflow-y: auto; /* 允许滚动 */
3730

38-
/* 隐藏默认滚动条(可选美化) */
39-
#sidebar::-webkit-scrollbar {
40-
width: 6px;
31+
/* 完全隐藏滚动条(视觉上),但保留滚动功能 */
32+
scrollbar-width: none; /* Firefox */
33+
-ms-overflow-style: none; /* IE/Edge */
4134
}
4235

43-
#sidebar::-webkit-scrollbar-track {
44-
background: #272822;
45-
}
46-
47-
#sidebar::-webkit-scrollbar-thumb {
48-
background: #555;
49-
border-radius: 3px;
36+
/* 隐藏 WebKit 滚动条 */
37+
#sidebar::-webkit-scrollbar {
38+
display: none;
5039
}
5140

52-
/* 列表项样式 */
41+
/* 列表与按钮样式 */
5342
#sidebar ul {
5443
list-style: none;
5544
width: 100%;
@@ -67,9 +56,7 @@ body {
6756
width: 80px;
6857
height: 36px;
6958
background: #272822;
70-
/* 与背景融合 */
7159
color: white;
72-
/* 文字白色 */
7360
border: 1px solid #666;
7461
border-radius: 4px;
7562
font-size: 14px;
@@ -95,17 +82,21 @@ body {
9582
width: 100%;
9683
position: relative;
9784
}
98-
#sidebar {
99-
overflow-y: auto;
100-
}
10185

102-
/* WebKit (Chrome, Safari) */
103-
#sidebar::-webkit-scrollbar {
104-
display: none;
86+
/* === 隐藏 Ace 编辑器滚动条=== */
87+
#editor .ace_scrollbar {
88+
opacity: 0 !important;
89+
pointer-events: none !important;
10590
}
10691

107-
/* Firefox */
108-
#sidebar {
109-
scrollbar-width: none;
92+
#editor,
93+
#editor .ace_scroller {
94+
scrollbar-width: none !important;
95+
-ms-overflow-style: none !important;
11096
}
11197

98+
#editor::-webkit-scrollbar,
99+
#editor .ace_scroller::-webkit-scrollbar,
100+
#editor .ace_scrollbar::-webkit-scrollbar {
101+
display: none !important;
102+
}

iframe/style/body-light.css

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,44 +8,36 @@ html,
88
body {
99
height: 100%;
1010
overflow: hidden;
11-
background: #f6f8fa; /* 可选:与浅色侧边栏统一,也可保留原色。这里建议同步 */
11+
background: #f6f8fa;
1212
}
1313

1414
#app {
1515
display: flex;
1616
height: 100vh;
1717
}
1818

19-
/* 左侧可滚动侧边栏 —— 改为浅色 */
19+
/* 左侧侧边栏 —— 浅色,隐藏滚动条 */
2020
#sidebar {
2121
width: 120px;
22-
background: #f6f8fa; /* 浅灰背景 */
23-
color: #24292f; /* 深灰文字 */
22+
background: #f6f8fa;
23+
color: #24292f;
2424
display: flex;
2525
flex-direction: column;
2626
align-items: center;
2727
padding-top: 16px;
28-
border-right: 1px solid #d0d7de; /* 浅灰边框 */
28+
border-right: 1px solid #d0d7de;
2929
overflow-y: auto;
30-
scrollbar-width: thin;
31-
scrollbar-color: #adbac7 #f6f8fa; /* thumb + track */
32-
}
33-
34-
/* 滚动条 - WebKit */
35-
#sidebar::-webkit-scrollbar {
36-
width: 6px;
37-
}
3830

39-
#sidebar::-webkit-scrollbar-track {
40-
background: #f6f8fa;
31+
/* 隐藏滚动条 */
32+
scrollbar-width: none; /* Firefox */
33+
-ms-overflow-style: none; /* IE/Edge */
4134
}
4235

43-
#sidebar::-webkit-scrollbar-thumb {
44-
background: #adbac7;
45-
border-radius: 3px;
36+
#sidebar::-webkit-scrollbar {
37+
display: none; /* WebKit */
4638
}
4739

48-
/* 列表项样式 */
40+
/* 列表与按钮 */
4941
#sidebar ul {
5042
list-style: none;
5143
width: 100%;
@@ -59,7 +51,6 @@ body {
5951
padding: 8px 0;
6052
}
6153

62-
/* 按钮*/
6354
#sidebar button {
6455
width: 80px;
6556
height: 36px;
@@ -75,11 +66,11 @@ body {
7566
}
7667

7768
#sidebar button:hover {
78-
background: #eaeef5; /* hover 浅蓝灰 */
69+
background: #eaeef5;
7970
border-color: #8c959e;
8071
}
8172

82-
/* 右侧编辑器区域 —— 完全不动 */
73+
/* 右侧编辑器区域 */
8374
#editor-container {
8475
flex: 1;
8576
height: 100%;
@@ -90,16 +81,19 @@ body {
9081
height: 100%;
9182
width: 100%;
9283
}
93-
#sidebar {
94-
overflow-y: auto;
95-
}
9684

97-
/* WebKit (Chrome, Safari) */
98-
#sidebar::-webkit-scrollbar {
99-
display: none;
100-
}
101-
102-
/* Firefox */
103-
#sidebar {
104-
scrollbar-width: none;
85+
/* 隐藏 Ace 编辑器滚动条 */
86+
#editor .ace_scrollbar {
87+
opacity: 0 !important;
88+
pointer-events: none !important;
89+
}
90+
#editor,
91+
#editor .ace_scroller {
92+
scrollbar-width: none !important;
93+
-ms-overflow-style: none !important;
94+
}
95+
#editor::-webkit-scrollbar,
96+
#editor .ace_scroller::-webkit-scrollbar,
97+
#editor .ace_scrollbar::-webkit-scrollbar {
98+
display: none !important;
10599
}

0 commit comments

Comments
 (0)