🐛 fix(query-results): 区分执行消息内容区域

- 为执行消息正文滚动区增加独立边框和浅背景
- 保留标题与复制按钮在顶部区域,正文内容单独成框
- 补充消息块样式断言,覆盖边框、背景和内边距
This commit is contained in:
Syngnat
2026-06-29 15:18:35 +08:00
parent 04bbab3d7e
commit aed87665f4
2 changed files with 8 additions and 1 deletions

View File

@@ -1241,7 +1241,9 @@ describe('QueryEditor external SQL save', () => {
overflow: 'auto',
width: '100%',
minWidth: 0,
padding: '10px 12px',
});
expect(messageTextarea.props.style.padding).not.toBe(0);
expect(messageTextarea.props.style.minWidth).not.toBe('max-content');
expect(messageBlock.props.style).toMatchObject({
alignItems: 'stretch',
@@ -1253,7 +1255,10 @@ describe('QueryEditor external SQL save', () => {
width: '100%',
overflow: 'hidden',
minWidth: 0,
borderRadius: 6,
});
expect(messageScrollBody.props.style.border).toContain('1px solid');
expect(messageScrollBody.props.style.background).toBeTruthy();
expect(messageTextarea.props.value).not.toContain('mssql:');
});

View File

@@ -180,6 +180,8 @@ const QueryEditorResultsPanel: React.FC<QueryEditorResultsPanelProps> = ({
overflow: 'hidden',
minWidth: 0,
borderRadius: 6,
border: darkMode ? '1px solid rgba(255,255,255,0.14)' : '1px solid rgba(0,0,0,0.10)',
background: darkMode ? 'rgba(0,0,0,0.18)' : 'rgba(0,0,0,0.018)',
}}
>
<textarea
@@ -197,7 +199,7 @@ const QueryEditorResultsPanel: React.FC<QueryEditorResultsPanelProps> = ({
minWidth: 0,
height: '100%',
minHeight: compact ? 72 : 0,
padding: 0,
padding: compact ? '8px 10px' : '10px 12px',
margin: 0,
border: 'none',
resize: 'none',