reset dropdown when drag drop

This commit is contained in:
Julian Freeman
2026-02-26 13:27:48 -04:00
parent 334821751e
commit 7fa2d96855

View File

@@ -204,6 +204,10 @@
function handleFile(file) { function handleFile(file) {
if (!file) return; if (!file) return;
// 重置下拉框到默认占位符选项
const dropdown = document.getElementById('fileDropdown');
if (dropdown) dropdown.selectedIndex = 0;
const reader = new FileReader(); const reader = new FileReader();
reader.onload = (e) => { globalData = e.target.result; processData(globalData); }; reader.onload = (e) => { globalData = e.target.result; processData(globalData); };
reader.readAsText(file, 'UTF-8'); reader.readAsText(file, 'UTF-8');