chore: better variable typing
This commit is contained in:
@ -188,8 +188,8 @@ const commentEdit = reactive(new TaskCommentModel())
|
||||
|
||||
const newComment = reactive(new TaskCommentModel())
|
||||
|
||||
const saved = ref(null)
|
||||
const saving = ref(null)
|
||||
const saved = ref<TaskModel['id'] | null>(null)
|
||||
const saving = ref<TaskModel['id'] | null>(null)
|
||||
|
||||
const userAvatar = computed(() => store.state.auth.info.getAvatarUrl(48))
|
||||
const currentUserId = computed(() => store.state.auth.info.id)
|
||||
|
@ -47,6 +47,7 @@ const props = defineProps({
|
||||
required: true,
|
||||
},
|
||||
canWrite: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
},
|
||||
})
|
||||
|
@ -38,7 +38,7 @@ const emit = defineEmits(['update:modelValue'])
|
||||
const store = useStore()
|
||||
const {t} = useI18n({useScope: 'global'})
|
||||
|
||||
const list = reactive<ListModel>(new ListModel())
|
||||
const list: ListModel= reactive(new ListModel())
|
||||
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
|
@ -62,14 +62,15 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref, reactive, watch} from 'vue'
|
||||
import {ref, reactive, watch, type PropType} from 'vue'
|
||||
import {error} from '@/message'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
import type TaskModel from '@/models/task'
|
||||
import {TASK_REPEAT_MODES, type RepeatAfter} from '@/models/task'
|
||||
import type TaskModel from '@/models/task'
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: Object as PropType<TaskModel>,
|
||||
default: () => ({}),
|
||||
required: true,
|
||||
},
|
||||
|
Reference in New Issue
Block a user