feat: 编辑备注改为多行输入框

This commit is contained in:
2026-04-13 11:55:40 +08:00
parent d25435dc82
commit 807772b3e4

View File

@@ -449,7 +449,7 @@ INDEX_TEMPLATE = '''
</div>
<div class="mb-3">
<label class="form-label">备注</label>
<input type="text" id="editNote" class="form-control">
<textarea id="editNote" class="form-control" rows="3"></textarea>
</div>
</form>
</div>
@@ -721,7 +721,11 @@ async function openEditModal(id) {
// 保存编辑
async function saveEdit() {
const id = document.getElementById('editId').value;
const type = currentDetailId ? (await fetch(`${API_BASE}/items/${currentDetailId}`).then(r => r.json())).data.type : 'text';
// 获取当前条目的类型
const detailRes = await fetch(`${API_BASE}/items/${currentDetailId}`);
const detailData = await detailRes.json();
const type = detailData.data.type;
const data = {
title: document.getElementById('editTitle').value,