feat: 添加getLastImportTooltip方法获取上次导入提示信息
在restoreImportState之后添加getLastImportTooltip方法: - 从localStorage读取保存的导入任务时间 - 格式化时间为易读格式(年-月-日 时:分) - 返回上次导入时间的提示文本 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -749,6 +749,19 @@ export default {
|
|||||||
this.showFailureButton = true;
|
this.showFailureButton = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 获取上次导入的提示信息
|
||||||
|
* @returns {String} 提示文本
|
||||||
|
*/
|
||||||
|
getLastImportTooltip() {
|
||||||
|
const savedTask = this.getImportTaskFromStorage();
|
||||||
|
if (savedTask && savedTask.saveTime) {
|
||||||
|
const date = new Date(savedTask.saveTime);
|
||||||
|
const timeStr = this.parseTime(date, '{y}-{m}-{d} {h}:{i}');
|
||||||
|
return `上次导入: ${timeStr}`;
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
},
|
||||||
// 格式化金额
|
// 格式化金额
|
||||||
formatAmount(amount) {
|
formatAmount(amount) {
|
||||||
if (amount === null || amount === undefined || amount === '') return '-';
|
if (amount === null || amount === undefined || amount === '') return '-';
|
||||||
|
|||||||
Reference in New Issue
Block a user