Files
Enterprise-Knowledge-Base/frontend/src/components/picture-preview.vue
T
wizardchen 233c398d7a feat: Enhance image preview functionality in WikiBrowser component
- Updated the `picture-preview.vue` component to conditionally render images based on the `reviewUrl` prop, improving performance and usability.
- Integrated image preview functionality into the `WikiBrowser` component, allowing users to view images in a modal when clicked.
- Added references for `drawerBodyRef` and `readerBodyRef` to facilitate image loading and hydration, ensuring images are displayed correctly.
- Enhanced the `prompts_wiki.go` file to include new image handling rules for summaries, ensuring images are contextually relevant in generated content.

These changes improve the user experience by providing a seamless image viewing option within the WikiBrowser interface.
2026-04-22 21:17:28 +08:00

16 lines
425 B
Vue

<script setup lang="ts">
import { watch } from "vue"
const props = defineProps(['reviewImg', 'reviewUrl'])
const emit = defineEmits(['closePreImg'])
const close = () => {
emit('closePreImg')
}
</script>
<template>
<t-image-viewer :visible="reviewImg" closeOnOverlay closeOnEscKeydown @close="close"
:images="reviewUrl ? [reviewUrl] : []">
</t-image-viewer>
</template>
<style scoped lang="less"></style>