refactor(editor): Replace mixed style of defineProps with the new style (no-changelog) (#9787)
This commit is contained in:
committed by
GitHub
parent
1e8716a607
commit
08c6e9b571
@@ -1,6 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import type { PropType } from 'vue';
|
||||
import { computed, toRefs } from 'vue';
|
||||
import VueMarkdown from 'vue-markdown-render';
|
||||
import hljs from 'highlight.js/lib/core';
|
||||
@@ -9,12 +8,9 @@ import type MarkdownIt from 'markdown-it';
|
||||
import type { ChatMessage, ChatMessageText } from '@n8n/chat/types';
|
||||
import { useOptions } from '@n8n/chat/composables';
|
||||
|
||||
const props = defineProps({
|
||||
message: {
|
||||
type: Object as PropType<ChatMessage>,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
const props = defineProps<{
|
||||
message: ChatMessage;
|
||||
}>();
|
||||
|
||||
const { message } = toRefs(props);
|
||||
const { options } = useOptions();
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<script lang="ts" setup>
|
||||
import type { PropType } from 'vue';
|
||||
import { computed } from 'vue';
|
||||
import { Message } from './index';
|
||||
import type { ChatMessage } from '@n8n/chat/types';
|
||||
|
||||
const props = defineProps({
|
||||
animation: {
|
||||
type: String as PropType<'bouncing' | 'scaling'>,
|
||||
default: 'bouncing',
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
animation?: 'bouncing' | 'scaling';
|
||||
}>(),
|
||||
{
|
||||
animation: 'bouncing',
|
||||
},
|
||||
});
|
||||
);
|
||||
|
||||
const message: ChatMessage = {
|
||||
id: 'typing',
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
<script lang="ts" setup>
|
||||
import type { PropType } from 'vue';
|
||||
import Message from '@n8n/chat/components/Message.vue';
|
||||
import type { ChatMessage } from '@n8n/chat/types';
|
||||
import MessageTyping from '@n8n/chat/components/MessageTyping.vue';
|
||||
import { useChat } from '@n8n/chat/composables';
|
||||
|
||||
defineProps({
|
||||
messages: {
|
||||
type: Array as PropType<ChatMessage[]>,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
defineProps<{
|
||||
messages: ChatMessage[];
|
||||
}>();
|
||||
|
||||
const chatStore = useChat();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user