diff --git a/client/src/pages/recurring/index.vue b/client/src/pages/recurring/index.vue
index 656390f..dabfd26 100644
--- a/client/src/pages/recurring/index.vue
+++ b/client/src/pages/recurring/index.vue
@@ -135,9 +135,11 @@
-
-
+
+
+
+
@@ -167,6 +169,7 @@ const loading = ref(true)
const showModal = ref(false)
const editingId = ref(null)
const amountStr = ref('')
+const saving = ref(false)
const syncCount = ref(0)
const freqMap: Record = {
@@ -254,6 +257,7 @@ async function toggleActive(item: RecurringTemplate) {
}
async function handleSubmit() {
+ if (saving.value) return
const amount = Math.round(parseFloat(amountStr.value || '0') * 100)
if (isNaN(amount) || amount <= 0) {
uni.showToast({ title: '请输入金额', icon: 'none' })
@@ -264,6 +268,7 @@ async function handleSubmit() {
return
}
+ saving.value = true
try {
const data = {
amount,
@@ -284,6 +289,8 @@ async function handleSubmit() {
uni.showToast({ title: editingId.value ? '已更新' : '已添加', icon: 'success' })
} catch {
uni.showToast({ title: '保存失败', icon: 'none' })
+ } finally {
+ saving.value = false
}
}
@@ -426,7 +433,7 @@ function goBack() { uni.navigateBack() }
&:active { background: darken($border, 5%); }
}
.modal-close-text { font-size: $font-2xl; color: $text-sec; line-height: 1; }
-.modal-body { flex: 1; padding: $space-md $space-xl; max-height: 60vh; }
+.modal-body { flex: 1; padding: $space-md $space-xl; max-height: 45vh; }
.modal-footer {
padding: $space-md $space-xl; border-top: 2rpx solid $border;
}