修复界面问题

This commit is contained in:
2026-01-13 09:48:44 +00:00
parent 1de554d846
commit c06016412d
2 changed files with 19 additions and 4 deletions

View File

@@ -432,6 +432,8 @@ body {
.modal-body {
padding: 30px;
max-height: calc(100vh - 300px); /* 留出顶部和底部空间 */
overflow-y: auto; /* 内容过多时显示滚动条 */
}
.modal-footer {
@@ -476,6 +478,7 @@ body {
.form-group textarea {
resize: vertical;
min-height: 100px;
max-height: 300px; /* 限制最大高度,避免占用过多空间 */
}
.form-actions {
@@ -504,6 +507,10 @@ body {
background: white;
border-radius: 6px;
border: 1px solid #e2e8f0;
max-height: 200px; /* 限制润色文本的最大高度 */
overflow-y: auto; /* 内容过多时显示滚动条 */
white-space: pre-wrap; /* 保留换行和空格 */
word-wrap: break-word; /* 长单词自动换行 */
}
.polished-actions {

View File

@@ -232,6 +232,7 @@ class WorkListApp {
this.currentEditingTask = task;
const modal = document.getElementById('taskModal');
const form = document.getElementById('taskForm');
const polishedDiv = document.getElementById('polishedDescription');
if (task) {
// 编辑模式
@@ -239,15 +240,22 @@ class WorkListApp {
document.getElementById('taskTitle').value = task.title;
document.getElementById('taskDescription').value = task.description || '';
document.getElementById('taskStatus').value = task.status;
// 如果有润色后的描述,显示它
if (task.polished_description) {
const polishedText = polishedDiv.querySelector('.polished-text');
polishedText.textContent = task.polished_description;
polishedDiv.style.display = 'block';
} else {
polishedDiv.style.display = 'none';
}
} else {
// 新建模式
document.getElementById('modalTitle').textContent = '添加任务';
form.reset();
polishedDiv.style.display = 'none';
}
// 隐藏润色内容
document.getElementById('polishedDescription').style.display = 'none';
this.showModal('taskModal');
}