feat: 优化统一规则逻辑
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
import { DEFAULT_CATEGORY_BUDGETS } from '../config/transactionCategories.js'
|
||||
|
||||
export const useSettingsStore = defineStore(
|
||||
'settings',
|
||||
@@ -7,17 +8,10 @@ export const useSettingsStore = defineStore(
|
||||
const notificationCaptureEnabled = ref(true)
|
||||
const aiAutoCategoryEnabled = ref(false)
|
||||
const monthlyBudget = ref(12000)
|
||||
const budgetResetCycle = ref('monthly') // monthly | weekly | none | custom
|
||||
const budgetMonthlyResetDay = ref(1) // 每月第几天重置,1-28
|
||||
const budgetCustomStartDate = ref('') // 自定义起始日(ISO 日期字符串)
|
||||
const categoryBudgets = ref({
|
||||
Food: 0,
|
||||
Transport: 0,
|
||||
Health: 0,
|
||||
Groceries: 0,
|
||||
Entertainment: 0,
|
||||
Uncategorized: 0,
|
||||
})
|
||||
const budgetResetCycle = ref('monthly')
|
||||
const budgetMonthlyResetDay = ref(1)
|
||||
const budgetCustomStartDate = ref('')
|
||||
const categoryBudgets = ref({ ...DEFAULT_CATEGORY_BUDGETS })
|
||||
const categoryBudgetEnabled = ref(false)
|
||||
const profileName = ref('Echo 用户')
|
||||
const profileAvatar = ref('')
|
||||
@@ -115,4 +109,3 @@ export const useSettingsStore = defineStore(
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user