Skip to content

Commit

Permalink
fix: #19
Browse files Browse the repository at this point in the history
  • Loading branch information
rashagu committed Dec 10, 2024
1 parent 9fdfbe4 commit c2ba4c0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/semi-ui-vue/src/components/chat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const vuePropsType = vuePropsMake(chatPropTypes, defaultProps);
const index = defineComponent({
props: { ...vuePropsType },
name: 'index',
setup(props, { attrs }) {
setup(props, { expose, attrs }) {
const slots = useSlots();

let dragStatus = false;
Expand Down Expand Up @@ -259,6 +259,13 @@ const index = defineComponent({
foundation.onMessageSend(content, attachment);
}

expose({
resetMessage,
clearContext,
scrollToBottom,
sendMessage,
})

watch(
[() => props.chats, () => props.hints, () => state.chats, () => state.cacheHints, () => state.wheelScroll],
(value, oldValue, onCleanup) => {
Expand Down

0 comments on commit c2ba4c0

Please sign in to comment.