-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f291eb
commit 8e06cd5
Showing
5 changed files
with
33 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
.vitepress/theme/components/nitwikit-ui/packages/image-viewer/image-viewer.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<script lang="ts" setup> | ||
import { onActivated, onMounted, onBeforeUnmount, ref } from 'vue' | ||
import Viewer from 'viewerjs'; | ||
import 'viewerjs/dist/viewer.css' | ||
const instance = ref() | ||
onMounted(() => { | ||
instance.value = new Viewer(document.querySelector('.vp-doc')); | ||
}) | ||
onBeforeUnmount(() => { | ||
instance.value?.destroy() | ||
}) | ||
</script> |
3 changes: 3 additions & 0 deletions
3
.vitepress/theme/components/nitwikit-ui/packages/image-viewer/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import $NwImageViewer from "./image-viewer.vue"; | ||
|
||
export const NwImageViewer = $NwImageViewer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters