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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user