Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Dialogue image cannot be enlarged #2327

Merged
merged 1 commit into from
Feb 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ui/src/components/ai-chat/component/answer-content/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<img v-if="application.avatar" :src="application.avatar" height="32px" width="32px" />
<LogoIcon v-else height="32px" width="32px" />
</div>
<div class="content" @click.stop @mouseup="openControl">
<div class="content" @mouseup="openControl">
<el-card shadow="always" class="dialog-card mb-8">
<MdRenderer
v-if="
Expand Down Expand Up @@ -82,7 +82,7 @@ const chatMessage = (question: string, type: 'old' | 'new', other_params_data?:
}
}
const add_answer_text_list = (answer_text_list: Array<any>) => {
answer_text_list.push([ ])
answer_text_list.push([])
}

const openControl = (event: any) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provided code has a minor issue with an empty array being pushed into add_answer_text_list. It should be:

const add_answer_text_list = (answer_text_list: Array<any>) => {
  answer_text_list.push([]);
}

Otherwise, there are no major structural or logical issues that need to be addressed. The code structure appears fine for handling user interactions and rendering card content.

Additional optimizations could include refactoring the function definitions if they become more complex in the future, but this is not needed in the current state.

For further improvements, ensure the usage of event listeners such as @mousedown or @mousewheel is consistent across your application. Also, consider adding type annotations where applicable to improve readability and maintainability.

If you have any specific concerns about performance or additional features to implement, feel free to let me know!

Expand Down