refactor: 重构待办事项合约导入与导出方式

- 更新导入方式,将 todoContract 的导入改为命名空间导入并直接引用整个模块。
- 重构待办事项合约,将各操作方法从对象结构中提取为独立导出的常量。
This commit is contained in:
2026-01-18 05:00:13 +08:00
parent 8a109f9fa2
commit 2cadbb96f7
2 changed files with 19 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
import { todoContract } from './contracts/todo'
import * as todo from './contracts/todo'
export const contract = {
todo: todoContract,
todo,
}