File tree Expand file tree Collapse file tree 3 files changed +31
-30
lines changed Expand file tree Collapse file tree 3 files changed +31
-30
lines changed Original file line number Diff line number Diff line change 1- const { request } = useRequest ( )
2-
3- /**
4- * Todo item type.
5- */
6- export interface TodoItem {
7- /**
8- * Todo item id.
9- */
10- id : number
11- /**
12- * Todo item title.
13- */
14- title : string
15- /**
16- * Todo item completed.
17- *
18- * @default false
19- */
20- completed : boolean
21- /**
22- * Todo item user id.
23- */
24- userId : number
25- }
1+ import type { TodoItem , TodoList } from '@/types/todo'
262
27- /**
28- * Todo list type.
29- */
30- export type TodoList = TodoItem [ ]
3+ const { request } = useRequest ( )
314
325/**
336 * Get todo list.
Original file line number Diff line number Diff line change 1010 </route >
1111
1212<script lang="ts" setup>
13- import type { TodoList } from ' @/apis /todo'
13+ import type { TodoList } from ' @/types /todo'
1414
1515const { t } = useI18n ()
1616
Original file line number Diff line number Diff line change 1+ /**
2+ * Todo item type.
3+ */
4+ export interface TodoItem {
5+ /**
6+ * Todo item id.
7+ */
8+ id : number
9+ /**
10+ * Todo item title.
11+ */
12+ title : string
13+ /**
14+ * Todo item completed.
15+ *
16+ * @default false
17+ */
18+ completed : boolean
19+ /**
20+ * Todo item user id.
21+ */
22+ userId : number
23+ }
24+
25+ /**
26+ * Todo list type.
27+ */
28+ export type TodoList = TodoItem [ ]
You can’t perform that action at this time.
0 commit comments