mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
fix using any type
This commit is contained in:
1 parent
ddaefca5fb
commit
ec63bba0fe
5 files changed
+48
-17
No files matched your search
@@ -3,8 +3,14 @@ import { computed } from 'vue'
|
||||
import MarkdownText from './MarkdownText.vue'
|
||||
import sessionStore from '../store/session'
|
||||
|
||||
interface Task {
|
||||
id: number
|
||||
name: string
|
||||
completed: boolean
|
||||
}
|
||||
|
||||
const tasks = computed(() => {
|
||||
return sessionStore.session.tasks.map((task: any) => {
|
||||
return sessionStore.session.tasks.map((task: Task) => {
|
||||
const prefix = task.completed ? '✓' : '➤'
|
||||
const color = task.completed ? 'text-text-primary' : 'text-text'
|
||||
return {
|
||||
|
||||
@@ -5,7 +5,7 @@ import TreeChart from './TreeChart.vue'
|
||||
const treeRef = ref<HTMLElement | null>(null)
|
||||
let pos = { top: 0, left: 0, x: 0, y: 0 }
|
||||
|
||||
function mouseMoveHandler(e: any) {
|
||||
function mouseMoveHandler(e: MouseEvent) {
|
||||
const dx = e.clientX - pos.x
|
||||
const dy = e.clientY - pos.y
|
||||
|
||||
@@ -23,7 +23,7 @@ function mouseUpHandler() {
|
||||
document.removeEventListener('mouseup', mouseUpHandler)
|
||||
}
|
||||
|
||||
function mouseDownHandler(e: any) {
|
||||
function mouseDownHandler(e: MouseEvent) {
|
||||
if (treeRef.value === null) return
|
||||
treeRef.value.style.cursor = 'grabbing'
|
||||
treeRef.value.style.userSelect = 'none'
|
||||
|
||||
Reference in new issue
Block a user