Procházet zdrojové kódy

PDF预览头部固定

songxy před 1 měsícem
rodič
revize
e73a8fc0ca

+ 1 - 0
ais_search_zj/web/components.d.ts

@@ -14,6 +14,7 @@ declare module 'vue' {
     BasicCurdPage: typeof import('./src/components/curd/BasicCurdPage.vue')['default']
     BasicCurdPageFrame: typeof import('./src/components/curd/frame/BasicCurdPageFrame.vue')['default']
     BasicQueryForm: typeof import('./src/components/query/BasicQueryForm.vue')['default']
+    copy: typeof import('./src/components/pdf/PDFViewerSearch copy.vue')['default']
     HomeCard: typeof import('./src/components/home-card/HomeCard.vue')['default']
     IframePage: typeof import('./src/components/iframe-page/IframePage.vue')['default']
     MarkdownToc: typeof import('./src/components/markdown-toc/MarkdownToc.vue')['default']

+ 14 - 2
ais_search_zj/web/src/components/pdf/PdfCanvas.vue

@@ -296,15 +296,27 @@ const renderPage = (page, PDFJS, num) => {
   position: relative;
   .header {
     height: 40px;
-    position: relative;
+    position: sticky;
     display: flex;
     justify-content: center;
     align-items: center;
     border-bottom: 1px solid #eee;
-
+    top: 0px;
+    z-index: 9999999;
+    background: #fff;
+    width: 100%;
+    right: 0px;
+    left: 0px;
     .title {
       font-size: 18px;
       font-weight: bolder;
+      text-overflow: ellipsis;
+      width: 0px;
+      white-space: nowrap;
+      flex-grow: 1;
+      overflow: hidden;
+      margin-left: 30px;
+      margin-right: 40px;
     }
     .close-icon {
       position: absolute;

+ 1 - 1
ais_search_zj/web/src/views/ai-home/index.vue

@@ -347,7 +347,7 @@
       <template #right v-if="showDoc">
         <div
           class="docs_box"
-          style="background-color: white;overflow: auto"
+          style="background-color: white;"
         >
           <p-d-f-viewer
             v-if="fileType === 'pdf'"