[ui] Vue 3 - Migrated MatchedText components
<!-- eslint-enable -->
<script lang="ts">
+ import { defineComponent, PropType } from 'vue';
+
import { Suggestion } from './AutocompleteResults';
- import Vue from 'vue';
- import Component from 'vue-class-component';
- import { Prop } from 'vue-property-decorator';
- @Component
- export default class Spinner extends Vue {
- @Prop({ required: true })
- suggestion!: Suggestion;
- @Prop({ required: true })
- filter!: string;
- @Prop({ required: false, default: false })
- isComment?: boolean;
+ export default defineComponent({
+ props: {
+ suggestion: {
+ type: Object as PropType<Suggestion>,
+ required: true
+ },
+ filter: {
+ type: String,
+ required: true
+ },
+ isComment: {
+ type: Boolean,
+ required: false,
+ default: false
+ }
+ },
- get content(): string {
+ computed: {
+ content(): string {
const value =
(this.isComment
? (<{ comment?: string }>this.suggestion.details).comment
return value || '';
}
}
+ });
</script>
