fix: 修正下拉栏问题(未验证)

This commit is contained in:
2025-10-27 14:52:46 +08:00
parent 75fe7dc58b
commit e26349ebfa

View File

@@ -174,10 +174,20 @@
// Timestamp // Timestamp
row.insertCell(4).textContent = new Date(image.timestamp * 1000).toISOString(); row.insertCell(4).textContent = new Date(image.timestamp * 1000).toISOString();
// 评论 // Comment
row += `<td><input type="text" id="comment-${image.id}" value="${image.comment}" onchange="updateComment(${image.id})"></td>`; const commentCell = row.insertCell(5);
const commentInput = document.createElement('input');
commentInput.type = 'text';
commentInput.id = `comment-${image.id}`;
commentInput.value = image.comment || '';
commentInput.onchange = function() {
updateComment(image.id, this.value);
};
commentCell.appendChild(commentInput);
// Actions // Actions
row += `<td> const actionsCell = row.insertCell(6);
actionsCell.innerHTML = `
<button onclick="deleteImage(${image.id})">删除</button> <button onclick="deleteImage(${image.id})">删除</button>
<button onclick="manualLabelLeft(${image.id})">人工标注 (左)</button> <button onclick="manualLabelLeft(${image.id})">人工标注 (左)</button>
<button onclick="manualLabelRight(${image.id})">人工标注 (右)</button> <button onclick="manualLabelRight(${image.id})">人工标注 (右)</button>
@@ -208,8 +218,7 @@
<option value="8" ${image.right_position == 8 ? 'selected' : ''}>8</option> <option value="8" ${image.right_position == 8 ? 'selected' : ''}>8</option>
<option value="9" ${image.right_position == 9 ? 'selected' : ''}>9</option> <option value="9" ${image.right_position == 9 ? 'selected' : ''}>9</option>
</select> </select>
</td>`; `;
row += '</tr>';
}); });
} }