feat: improve types
This commit is contained in:
@ -200,7 +200,7 @@ function handleEnter(e: KeyboardEvent) {
|
||||
}
|
||||
|
||||
function focusTaskInput() {
|
||||
newTaskInput.value.focus()
|
||||
newTaskInput.value?.focus()
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
|
@ -117,7 +117,7 @@ async function removeLabel(label: LabelModel) {
|
||||
|
||||
for (const l in labels.value) {
|
||||
if (labels.value[l].id === label.id) {
|
||||
labels.value.splice(l, 1)
|
||||
labels.value.splice(l, 1) // FIXME: l should be index
|
||||
}
|
||||
}
|
||||
emit('update:modelValue', labels.value)
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<multiselect
|
||||
<Multiselect
|
||||
class="control is-expanded"
|
||||
:placeholder="$t('list.search')"
|
||||
@search="findLists"
|
||||
@ -13,7 +13,7 @@
|
||||
<span class="list-namespace-title search-result">{{ namespace(props.option.namespaceId) }} ></span>
|
||||
{{ props.option.title }}
|
||||
</template>
|
||||
</multiselect>
|
||||
</Multiselect>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@ -45,8 +45,8 @@ const props = defineProps({
|
||||
return false
|
||||
}
|
||||
|
||||
const isDate = (e: any) => e instanceof Date
|
||||
const isString = (e: any) => typeof e === 'string'
|
||||
const isDate = (e: unknown) => e instanceof Date
|
||||
const isString = (e: unknown) => typeof e === 'string'
|
||||
|
||||
for (const e of prop) {
|
||||
if (!isDate(e) && !isString(e)) {
|
||||
|
Reference in New Issue
Block a user