Skip to content

Commit

Permalink
♻️ (utils): 重构 BillType 枚举
Browse files Browse the repository at this point in the history
重构 BillType 枚举,使其更易于使用和理解。
- 使用字符串而不是数字来表示账单类型,
- 这样更容易理解和使用。
  • Loading branch information
AnkioTomas committed Sep 7, 2024
1 parent cc3e6f0 commit e359c88
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/utils/BillType.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const BillType = {
"Expend": 0, // 支出
"Income": 1, // 收入
"Transfer": 2 // 转账
"Expend": "Expend", // 支出
"Income": "Income", // 收入
"Transfer": "Transfer" // 转账
};
6 changes: 0 additions & 6 deletions src/utils/DataType.js

This file was deleted.

1 change: 0 additions & 1 deletion src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { AliTools } from './AliTools.js';
export {
BillType,
Currency,
DataType,
stripHtml,
findNonEmptyString,
isTimeInRange,
Expand Down

0 comments on commit e359c88

Please sign in to comment.