mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-04-28 10:28:33 -05:00
fix(components): add type annotations in MentionList.vue
- Import PropType and MentionNodeAttrs - Add MentionItem interface - Add PropType for items array and command function
This commit is contained in:
@@ -37,15 +37,25 @@
|
||||
|
||||
<script lang="ts">
|
||||
/* eslint-disable vue/component-api-style */
|
||||
import type {PropType} from 'vue'
|
||||
import type {MentionNodeAttrs} from '@tiptap/extension-mention'
|
||||
|
||||
interface MentionItem extends MentionNodeAttrs {
|
||||
id: string
|
||||
label: string
|
||||
username: string
|
||||
avatarUrl: string
|
||||
}
|
||||
|
||||
export default {
|
||||
props: {
|
||||
items: {
|
||||
type: Array,
|
||||
type: Array as PropType<MentionItem[]>,
|
||||
required: true,
|
||||
},
|
||||
|
||||
command: {
|
||||
type: Function,
|
||||
type: Function as PropType<(item: MentionItem) => void>,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user