Browse Source

fix: icon替换;未上传文档置灰上传xfdf按钮;

wzl 1 year ago
parent
commit
b8dc18a48c

+ 1 - 1
packages/webview/src/components/Annotate/Annotate.vue

@@ -26,7 +26,7 @@
     </Button>
   </div> -->
   <StickyNoteButton />
-  <Button :class="{ active: markupActive && markupTool === 'highlight' }" @click.stop="changeMarkupTool('highlight')"><Annotation /></Button>
+  <Button :class="{ active: markupActive && markupTool === 'highlight' }" @click.stop="changeMarkupTool('highlight')"><Highlight /></Button>
   <Button :class="{ active: markupActive && markupTool === 'underline' }" @click.stop="changeMarkupTool('underline')"><Underline /></Button>
   <Button :class="{ active: markupActive && markupTool === 'strikeout' }" @click.stop="changeMarkupTool('strikeout')"><Strikeout /></Button>
   <Button :class="{ active: markupActive && markupTool === 'squiggly' }" @click.stop="changeMarkupTool('squiggly')"><Squiggle /></Button>

+ 2 - 0
packages/webview/src/components/AnnotationContainer/AnnotationHeader.vue

@@ -7,6 +7,7 @@
         img="icon-export"
         :onClick="onImport"
         title="Import"
+        :disabled="totalPages <= 0"
       ><Export /></Button>
       <Button
         className="button-icon"
@@ -42,6 +43,7 @@
     })
   }
 
+  const totalPages = computed(() => useDocument.getTotalPages)
   const annotations = computed(() => useDocument.getAllAnnotations)
   const optionUrl = computed(() => useDocument.getOptionUrl)
   const info = computed(() => useDocument.info)

+ 2 - 3
packages/webview/src/components/Icon/Annotation.vue

@@ -1,6 +1,5 @@
 <template>
-  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
-    <path fill-rule="evenodd" clip-rule="evenodd" d="M2 2H20L18 18H0L2 2Z" fill="#FEF87C"/>
-    <path fill-rule="evenodd" clip-rule="evenodd" d="M15.6078 15.5L10.6964 3.22144H9.30364L4.39223 15.5H3V16.5H7V15.5H6.00776L7.10772 12.75H12.8923L13.9922 15.5H13V16.5H17V15.5H15.6078ZM12.4923 11.75L10 5.51898L7.5077 11.75H12.4923Z" fill="#43474D"/>
+  <svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
+    <path fill-rule="evenodd" clip-rule="evenodd" d="M16.5 1H2.1L0.5 15H14.9L16.5 1ZM8.84885 2.8143L12.5693 12.1154H13.7692V13.1154H10.6923V12.1154H11.4922L10.7384 10.2308H6.03048L5.27689 12.1154H6.07692V13.1154H3V12.1154H4.19995L7.92038 2.8143H8.84885ZM8.384 4.345L10.3384 9.23077H6.43035L8.384 4.345Z" fill="currentColor"/>
   </svg>
 </template>