chore: better variable typing
This commit is contained in:
parent
6f93d6343c
commit
42e72d14a4
7 changed files with 10 additions and 8 deletions
|
@ -63,7 +63,7 @@ const LOAD_NOTIFICATIONS_INTERVAL = 10000
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
|
||||||
const allNotifications = ref([])
|
const allNotifications = ref<NotificationModel[]>([])
|
||||||
const showNotifications = ref(false)
|
const showNotifications = ref(false)
|
||||||
const popup = ref(null)
|
const popup = ref(null)
|
||||||
|
|
||||||
|
|
|
@ -198,7 +198,7 @@ const props = defineProps({
|
||||||
|
|
||||||
const {t} = useI18n({useScope: 'global'})
|
const {t} = useI18n({useScope: 'global'})
|
||||||
|
|
||||||
const linkShares = ref([])
|
const linkShares = ref<LinkShareModel[]>([])
|
||||||
const linkShareService = shallowReactive(new LinkShareService())
|
const linkShareService = shallowReactive(new LinkShareService())
|
||||||
const selectedRight = ref(RIGHTS.READ)
|
const selectedRight = ref(RIGHTS.READ)
|
||||||
const name = ref('')
|
const name = ref('')
|
||||||
|
|
|
@ -188,8 +188,8 @@ const commentEdit = reactive(new TaskCommentModel())
|
||||||
|
|
||||||
const newComment = reactive(new TaskCommentModel())
|
const newComment = reactive(new TaskCommentModel())
|
||||||
|
|
||||||
const saved = ref(null)
|
const saved = ref<TaskModel['id'] | null>(null)
|
||||||
const saving = ref(null)
|
const saving = ref<TaskModel['id'] | null>(null)
|
||||||
|
|
||||||
const userAvatar = computed(() => store.state.auth.info.getAvatarUrl(48))
|
const userAvatar = computed(() => store.state.auth.info.getAvatarUrl(48))
|
||||||
const currentUserId = computed(() => store.state.auth.info.id)
|
const currentUserId = computed(() => store.state.auth.info.id)
|
||||||
|
|
|
@ -47,6 +47,7 @@ const props = defineProps({
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
canWrite: {
|
canWrite: {
|
||||||
|
type: Boolean,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -38,7 +38,7 @@ const emit = defineEmits(['update:modelValue'])
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
const {t} = useI18n({useScope: 'global'})
|
const {t} = useI18n({useScope: 'global'})
|
||||||
|
|
||||||
const list = reactive<ListModel>(new ListModel())
|
const list: ListModel= reactive(new ListModel())
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.modelValue,
|
() => props.modelValue,
|
||||||
|
|
|
@ -62,14 +62,15 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {ref, reactive, watch} from 'vue'
|
import {ref, reactive, watch, type PropType} from 'vue'
|
||||||
import {error} from '@/message'
|
import {error} from '@/message'
|
||||||
import {useI18n} from 'vue-i18n'
|
import {useI18n} from 'vue-i18n'
|
||||||
import type TaskModel from '@/models/task'
|
|
||||||
import {TASK_REPEAT_MODES, type RepeatAfter} from '@/models/task'
|
import {TASK_REPEAT_MODES, type RepeatAfter} from '@/models/task'
|
||||||
|
import type TaskModel from '@/models/task'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
|
type: Object as PropType<TaskModel>,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
|
|
@ -63,7 +63,7 @@ async function createNewList() {
|
||||||
}
|
}
|
||||||
showError.value = false
|
showError.value = false
|
||||||
|
|
||||||
list.namespaceId = parseInt(route.params.namespaceId)
|
list.namespaceId = Number(route.params.namespaceId as string)
|
||||||
const newList = await store.dispatch('lists/createList', list)
|
const newList = await store.dispatch('lists/createList', list)
|
||||||
await router.push({
|
await router.push({
|
||||||
name: 'list.index',
|
name: 'list.index',
|
||||||
|
|
Loading…
Reference in a new issue