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.
This commit is contained in:
wizardchen
2026-04-08 21:58:15 +08:00
parent 98e2464831
commit 233c398d7a
3 changed files with 89 additions and 15 deletions
+2 -5
View File
@@ -8,11 +8,8 @@ const close = () => {
}
</script>
<template>
<t-image-viewer :visible="reviewImg" closeOnOverlay closeOnEscKeydown @close="close"
:images="[{
mainImage: reviewUrl,
download: false
}]">
<t-image-viewer :visible="reviewImg" closeOnOverlay closeOnEscKeydown @close="close"
:images="reviewUrl ? [reviewUrl] : []">
</t-image-viewer>
</template>
<style scoped lang="less"></style>