0.0.14 • Published 3 months ago

jvs-pdf-app-test v0.0.14

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

Vue 3 + TypeScript + Vite

This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.

Recommended IDE Setup

Type Support For .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

设置国际化

安装好插件后需要再依赖路径下面把PDFJS文件夹复制到当前项目的静态文件地址才能使用国际化功能

并在index.html 添加 以下样式连接

<link rel="stylesheet" type="application/l10n" href="./PDFJS/l10n/locale.json">

设置显示使用的工具栏

{
  sidebar: {
    viewThumbnail: true,
    viewOutline: true,
    viewAttachments: true,
    viewLayers: true
  },
  secondaryToolbar: {
    secondaryPresentationMode: true,
    secondaryOpenFile: true,
    secondaryPrint: true,
    secondaryDownload: true,
    secondaryViewBookmark: true,
    firstPage: true,
    lastPage: true,
    pageRotateCw: true,
    pageRotateCcw: true,
    cursorSelectTool: true,
    cursorHandTool: true,
    scrollVertical: true,
    scrollHorizontal: true,
    scrollWrapped: true,
    spreadNone: true,
    spreadOdd: true,
    spreadEven: true,
    documentProperties: true
  },
  toolbar: {
    toolbarViewerLeft: {
      findbar: true,
      previous: true,
      next: true,
      pageNumber: true
    },
    toolbarViewerRight: {
      presentationMode: true,
      openFile: true,
      print: true,
      download: true,
      viewBookmark: true,
      editorHighlight:false,
      editorFreeText:false,
      editorInk:false,
      editorStamp:false,
    },
    toolbarViewerMiddle: {
      zoomOut: true,
      zoomIn: true,
      scaleSelectContainer: true
    }
  },
  errorWrapper: true
}

自定义工具栏的按钮监听实现自定义布局

{
  cursorHandTool?: string;
  cursorSelectTool?: string;
  documentProperties?: string;
  download?: string;
  findbar?: string;
  findEntireWord?: string;
  findHighlightAll?: string;
  findInput?: string;
  findMatchCase?: string;
  findMessage?: string;
  findNext?: string;
  findPrevious?: string;
  findResultsCount?: string;
  firstPage?: string;
  lastPage?: string;
  nextPage?: string;
  numPages?: string;
  openFile?: string;
  pageNumber?: string;
  pageRotateCcw?: string;
  pageRotateCw?: string;
  presentationMode?: string;
  previousPage?: string;
  print?: string;
  scrollHorizontal?: string;
  scrollVertical?: string;
  scrollWrapped?: string;
  sidebarToggle?: string;
  spreadEven?: string;
  spreadNone?: string;
  spreadOdd?: string;
  toggleFindbar?: string;
  viewAttachments?: string;
  viewBookmark?: string;
  viewOutline?: string;
  viewThumbnail?: string;
  zoomIn?: string;
  zoomOut?: string;
  scaleSelect?: string;
  customScaleOption?: string;
  editorFreeText?: string;
  editorHighlight?: string;
  editorInk?: string;
  editorStamp?: string;
  editorFreeTextParamsToolbar?: string;
  editorHighlightParamsToolbar?: string;
  editorInkParamsToolbar?: string;
  editorStampParamsToolbar?: string;
  editorHighlightColorPicker?: string;
  language?: string;
  baseUrl?: string;
  printType?: string;
  printTitle?: string;
  setTitle?: boolean;
}
0.0.11

3 months ago

0.0.12

3 months ago

0.0.13

3 months ago

0.0.14

3 months ago

0.0.9

3 months ago

0.0.8

3 months ago

0.0.7

3 months ago

0.0.6

3 months ago

0.0.5

3 months ago

0.0.4

3 months ago

0.0.3

3 months ago

0.0.1

3 months ago

0.0.2

3 months ago