diff --git a/package.json b/package.json index 5c9b452..5806f61 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "moneynote-pc", - "version": "1.0.76", + "version": "1.0.77", "private": true, "scripts": { "analyze": "cross-env ANALYZE=1 max build", diff --git a/src/locales/en-US/book.ts b/src/locales/en-US/book.ts index d799822..f97ecc8 100644 --- a/src/locales/en-US/book.ts +++ b/src/locales/en-US/book.ts @@ -9,7 +9,6 @@ export default { 'book.label.default.transfer.to.account': 'Default Transfer To Account', 'book.set.default': 'Set as Default', 'book.export': 'Export Transactions', - 'book.export.confirm': 'Are you sure?', 'book.export.fail': 'Export failed, please try again later.', 'template.label.previewUrl': 'Preview', diff --git a/src/locales/en-US/common.ts b/src/locales/en-US/common.ts index 8649dd4..36b488b 100644 --- a/src/locales/en-US/common.ts +++ b/src/locales/en-US/common.ts @@ -21,6 +21,7 @@ export default { 'none': 'None', 'sort': 'Sort', 'convertCurrency': 'To {code}', + 'confirm.msg': 'Are you sure?', 'label.name': 'Name', 'label.canExpense': 'Can Expense', diff --git a/src/locales/zh-CN/book.ts b/src/locales/zh-CN/book.ts index 967670d..618c7b7 100644 --- a/src/locales/zh-CN/book.ts +++ b/src/locales/zh-CN/book.ts @@ -9,7 +9,6 @@ export default { 'book.label.default.transfer.to.account': '默认转入账户', 'book.set.default': '设为默认', 'book.export': '导出账单', - 'book.export.confirm': '确认此操作吗?', 'book.export.fail': '导出失败,请稍后重试。', 'template.label.previewUrl': '账本结构', diff --git a/src/locales/zh-CN/common.ts b/src/locales/zh-CN/common.ts index cef654b..4d09eb1 100644 --- a/src/locales/zh-CN/common.ts +++ b/src/locales/zh-CN/common.ts @@ -21,6 +21,7 @@ export default { 'none': '无', 'sort': '排序', 'convertCurrency': '折合{code}', + 'confirm.msg': '确认此操作吗?', 'label.name': '名称', 'label.canExpense': '可支出', diff --git a/src/pages/BalanceFlow/DataTable.jsx b/src/pages/BalanceFlow/DataTable.jsx index 397ed82..c55d726 100644 --- a/src/pages/BalanceFlow/DataTable.jsx +++ b/src/pages/BalanceFlow/DataTable.jsx @@ -99,9 +99,15 @@ export default () => { } }; + const confirmMsg = t('confirm.msg'); const confirmHandler = async (record) => { - await confirm(record.id); - successHandler(); + Modal.confirm({ + title: confirmMsg, + onOk: async () => { + await confirm(record.id); + successHandler(); + } + }); }; const messageDeleteConfirm = t('delete.confirm'); diff --git a/src/pages/Book/DataTable.jsx b/src/pages/Book/DataTable.jsx index 8eadac2..7d71a58 100644 --- a/src/pages/Book/DataTable.jsx +++ b/src/pages/Book/DataTable.jsx @@ -51,7 +51,7 @@ export default () => { const [exportingBook, setExportingBook] = useState(); const exportFlowHandler = async (record) => { const messageFailExport = intl.formatMessage({ id: 'book.export.fail' }); - const messageConfirmExport = intl.formatMessage({ id: 'book.export.confirm' }); + const messageConfirmExport = intl.formatMessage({ id: 'confirm.msg' }); Modal.confirm({ title: messageConfirmExport, onOk: async () => {