Skip to content

Commit cb89bec

Browse files
committed
✨ [feat] : change 이벤트를 타입 지정을 위한 @types/sortablejs 패키지 설치 및 적용
1 parent 7270bb4 commit cb89bec

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

package-lock.json

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"devDependencies": {
2323
"@tsconfig/node22": "^22.0.0",
2424
"@types/node": "^22.10.2",
25+
"@types/sortablejs": "^1.15.8",
2526
"@typescript-eslint/eslint-plugin": "^8.20.0",
2627
"@typescript-eslint/parser": "^8.20.0",
2728
"@vitejs/plugin-vue": "^5.2.1",

src/views/TaskBoardView.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
:list="status.taskList"
2424
group="taskList"
2525
item-key="task"
26-
class="flex flex-col grow px-4 pb-4 gap-4 overflow-y-scroll">
26+
class="flex flex-col grow px-4 pb-4 gap-4 overflow-y-scroll"
27+
@change="onListChange">
2728
<template #item="{ element }">
2829
<TaskCard
2930
:key="element.taskId"
@@ -48,6 +49,11 @@ import TitleBar from '@/components/TitleBar.vue'
4849
import { DUMMY_TASK_CARD_LIST } from '@/datas/dummy'
4950
import { ref } from 'vue'
5051
import draggableComponent from 'vuedraggable'
52+
import type { SortableEvent } from 'sortablejs'
5153
5254
const cardList = ref(DUMMY_TASK_CARD_LIST)
55+
56+
const onListChange = (event: SortableEvent) => {
57+
console.log(event)
58+
}
5359
</script>

0 commit comments

Comments
 (0)