|
@@ -0,0 +1,89 @@
|
|
|
+<template>
|
|
|
+ <teleport to="body">
|
|
|
+ <div v-if="store.allPaperModal" class="dialog-container">
|
|
|
+ <header ref="mouseHandler" class="tw-flex tw-place-content-between">
|
|
|
+ <div class="tw-text-2xl tw-cursor-move">全卷切换</div>
|
|
|
+ <div class="tw-mx-8 tw-flex-grow">
|
|
|
+ <span
|
|
|
+ v-for="(u, index) in urls"
|
|
|
+ :key="index"
|
|
|
+ @click="checkedIndex = index"
|
|
|
+ class="image-index hover:tw-bg-gray-300"
|
|
|
+ :class="checkedIndex === index && 'tw-bg-gray-300'"
|
|
|
+ >{{ index + 1 }}</span
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <a-button shape="circle" @click="store.allPaperModal = false">
|
|
|
+ <template #icon><CloseOutlined /></template>
|
|
|
+ </a-button>
|
|
|
+ </header>
|
|
|
+
|
|
|
+ <div>
|
|
|
+ <div
|
|
|
+ v-for="(url, index) in urls"
|
|
|
+ :key="index"
|
|
|
+ style="display: none"
|
|
|
+ :class="index === checkedIndex && 'show-image'"
|
|
|
+ >
|
|
|
+ <img :src="url" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </teleport>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="ts">
|
|
|
+import { computed, defineComponent, onUnmounted, reactive, ref } from "vue";
|
|
|
+import { CloseOutlined } from "@ant-design/icons-vue";
|
|
|
+import { store } from "@/features/mark/store";
|
|
|
+
|
|
|
+export default defineComponent({
|
|
|
+ name: "AllPaperModal",
|
|
|
+ components: { CloseOutlined },
|
|
|
+ props: {},
|
|
|
+ emits: ["close"],
|
|
|
+ setup() {
|
|
|
+ const urls = computed(() => {
|
|
|
+ return (
|
|
|
+ store.currentTask?.sliceUrls.map((s) => store.setting.fileServer + s) ??
|
|
|
+ []
|
|
|
+ );
|
|
|
+ });
|
|
|
+
|
|
|
+ const checkedIndex = ref(0);
|
|
|
+
|
|
|
+ return { store, urls, checkedIndex };
|
|
|
+ },
|
|
|
+});
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.dialog-container {
|
|
|
+ /* always top */
|
|
|
+ z-index: 99999;
|
|
|
+ position: absolute;
|
|
|
+ background-color: white;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 100vw;
|
|
|
+ height: 100vh;
|
|
|
+}
|
|
|
+header {
|
|
|
+ background-color: #eff3f6;
|
|
|
+}
|
|
|
+.image-index {
|
|
|
+ display: inline-block;
|
|
|
+ border: 1px solid grey;
|
|
|
+ width: 25px;
|
|
|
+ margin-right: 10px;
|
|
|
+ margin-top: 5px;
|
|
|
+ text-align: center;
|
|
|
+ border-radius: 5px;
|
|
|
+
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.show-image {
|
|
|
+ display: block !important;
|
|
|
+}
|
|
|
+</style>
|