Skip to content

Commit 6b0428c

Browse files
committed
fix: 修复右侧边栏由于滚动条引起的布局抖动问题
1 parent f22397e commit 6b0428c

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/assets/styles/style.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ body,
193193

194194
/* 通用面板顶栏按钮 */
195195
.panel-header-action-button {
196+
width: 24px;
197+
height: 24px;
196198
background: none;
197199
border: none;
198200
border-radius: 4px;
@@ -254,7 +256,7 @@ body,
254256
display: flex;
255257
justify-content: space-between;
256258
align-items: center;
257-
padding: 0 20px;
259+
padding: 0 10px 0 20px;
258260
border-bottom: 1px solid var(--border-color);
259261
background-color: var(--bg-topbar);
260262
z-index: 2;

src/components/layout/SidebarRight.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,11 @@ function updateField(
248248
}
249249
250250
.inspector-content {
251-
/*为了给滚动条留空间,保证对齐*/
252251
margin-left: 10px;
253252
flex: 1;
254253
min-height: 0;
255254
overflow-y: auto;
255+
scrollbar-gutter: stable;
256256
padding: 12px 0px;
257257
}
258258
@@ -261,6 +261,7 @@ function updateField(
261261
border: 1px solid var(--border-color);
262262
margin-bottom: 16px;
263263
background-color: var(--bg-workspace);
264+
box-sizing: border-box;
264265
}
265266
266267
.card-header {
@@ -274,7 +275,7 @@ function updateField(
274275
.property-grid {
275276
padding: 10px;
276277
display: grid;
277-
grid-template-columns: 115px 115px;
278+
grid-template-columns: repeat(2, 1fr);
278279
gap: 8px;
279280
}
280281

0 commit comments

Comments
 (0)