feat: 添加 Toast 通知系统,替换所有 alert() 调用

This commit is contained in:
2026-06-20 00:05:56 +08:00
parent a66074e49c
commit 4eaf89219d
5 changed files with 55 additions and 13 deletions
+2 -2
View File
@@ -152,7 +152,7 @@ const NoteEditor = {
*/
async exportPDF() {
if (!this.analysisId) {
alert('请先完成审查再导出 PDF');
showToast('请先完成审查再导出 PDF', 'warning');
return;
}
@@ -189,7 +189,7 @@ const NoteEditor = {
document.body.removeChild(a);
URL.revokeObjectURL(url);
} catch (err) {
alert('PDF 导出失败: ' + err.message);
showToast('PDF 导出失败: ' + err.message, 'error');
} finally {
if (btn) {
btn.disabled = false;