소스 검색

调整部署到测试环境的配置、解决pdf预览模糊的问题

yangguanjin 5 일 전
부모
커밋
f3b78d263a
7개의 변경된 파일596개의 추가작업 그리고 170개의 파일을 삭제
  1. 4 0
      env/.env.development
  2. 7 1
      env/.env.production
  3. 15 1
      env/.env.test
  4. 21 21
      package.json
  5. 118 118
      pnpm-lock.yaml
  6. 424 24
      src/components/PDFViewer/index.vue
  7. 7 5
      vite.config.ts

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 4 - 0
env/.env.development


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 7 - 1
env/.env.production


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 15 - 1
env/.env.test


+ 21 - 21
package.json

@@ -76,25 +76,25 @@
     "@dcloudio/uni-mp-weixin": "3.0.0-4030620241128001",
     "@dcloudio/uni-mp-xhs": "3.0.0-4030620241128001",
     "@dcloudio/uni-quickapp-webview": "3.0.0-4030620241128001",
-    "@grapecity-software/spread-excelio": "^19.0.3",
-    "@grapecity-software/spread-sheets": "^19.0.3",
-    "@grapecity-software/spread-sheets-barcode": "^19.0.3",
-    "@grapecity-software/spread-sheets-charts": "^19.0.3",
-    "@grapecity-software/spread-sheets-designer": "^19.0.3",
-    "@grapecity-software/spread-sheets-designer-resources-cn": "^19.0.3",
-    "@grapecity-software/spread-sheets-designer-vue": "^19.0.3",
-    "@grapecity-software/spread-sheets-formula-panel": "^19.0.3",
-    "@grapecity-software/spread-sheets-ganttsheet": "^19.0.3",
-    "@grapecity-software/spread-sheets-io": "^19.0.3",
-    "@grapecity-software/spread-sheets-languagepackages": "^19.0.3",
-    "@grapecity-software/spread-sheets-pdf": "^19.0.3",
-    "@grapecity-software/spread-sheets-pivot-addon": "^19.0.3",
-    "@grapecity-software/spread-sheets-print": "^19.0.3",
-    "@grapecity-software/spread-sheets-reportsheet-addon": "^19.0.3",
-    "@grapecity-software/spread-sheets-resources-zh": "^19.0.3",
-    "@grapecity-software/spread-sheets-shapes": "^19.0.3",
-    "@grapecity-software/spread-sheets-slicers": "^19.0.3",
-    "@grapecity-software/spread-sheets-tablesheet": "^19.0.3",
+    "@grapecity-software/spread-excelio": "^18.0.4",
+    "@grapecity-software/spread-sheets": "^18.0.4",
+    "@grapecity-software/spread-sheets-barcode": "^18.0.4",
+    "@grapecity-software/spread-sheets-charts": "^18.0.4",
+    "@grapecity-software/spread-sheets-designer": "^18.0.4",
+    "@grapecity-software/spread-sheets-designer-resources-cn": "^18.0.4",
+    "@grapecity-software/spread-sheets-designer-vue": "^18.0.4",
+    "@grapecity-software/spread-sheets-formula-panel": "^18.0.4",
+    "@grapecity-software/spread-sheets-ganttsheet": "^18.0.4",
+    "@grapecity-software/spread-sheets-io": "^18.0.4",
+    "@grapecity-software/spread-sheets-languagepackages": "^18.0.4",
+    "@grapecity-software/spread-sheets-pdf": "^18.0.4",
+    "@grapecity-software/spread-sheets-pivot-addon": "^18.0.4",
+    "@grapecity-software/spread-sheets-print": "^18.0.4",
+    "@grapecity-software/spread-sheets-reportsheet-addon": "^18.0.4",
+    "@grapecity-software/spread-sheets-resources-zh": "^18.0.4",
+    "@grapecity-software/spread-sheets-shapes": "^18.0.4",
+    "@grapecity-software/spread-sheets-slicers": "^18.0.4",
+    "@grapecity-software/spread-sheets-tablesheet": "^18.0.4",
     "@tanstack/vue-query": "^5.62.16",
     "@vant/area-data": "^2.0.0",
     "abortcontroller-polyfill": "^1.7.8",
@@ -169,11 +169,11 @@
     "unocss": "^0.58.9",
     "unocss-applet": "^0.7.8",
     "unplugin-auto-import": "^0.17.8",
-    "vconsole": "^3.15.1",
+    "vconsole": "3.15.1",
     "vite": "5.2.8",
     "vite-plugin-mock": "^3.0.2",
     "vite-plugin-restart": "^0.4.2",
-    "vite-plugin-vconsole": "^2.1.1",
+    "vite-plugin-vconsole": "2.1.1",
     "vitepress": "^1.5.0",
     "vue-tsc": "^1.0.24"
   }

+ 118 - 118
pnpm-lock.yaml

@@ -57,62 +57,62 @@ importers:
         specifier: 3.0.0-4030620241128001
         version: 3.0.0-4030620241128001(@vueuse/core@11.3.0(vue@3.4.21(typescript@5.7.2)))(postcss@8.4.49)(rollup@4.28.0)(vue@3.4.21(typescript@5.7.2))
       '@grapecity-software/spread-excelio':
-        specifier: ^19.0.3
-        version: 19.0.3
+        specifier: ^18.0.4
+        version: 18.0.4
       '@grapecity-software/spread-sheets':
-        specifier: ^19.0.3
-        version: 19.0.3
+        specifier: ^18.0.4
+        version: 18.0.4
       '@grapecity-software/spread-sheets-barcode':
-        specifier: ^19.0.3
-        version: 19.0.3
+        specifier: ^18.0.4
+        version: 18.0.4
       '@grapecity-software/spread-sheets-charts':
-        specifier: ^19.0.3
-        version: 19.0.3
+        specifier: ^18.0.4
+        version: 18.0.4
       '@grapecity-software/spread-sheets-designer':
-        specifier: ^19.0.3
-        version: 19.0.3
+        specifier: ^18.0.4
+        version: 18.0.4
       '@grapecity-software/spread-sheets-designer-resources-cn':
-        specifier: ^19.0.3
-        version: 19.0.3
+        specifier: ^18.0.4
+        version: 18.0.4
       '@grapecity-software/spread-sheets-designer-vue':
-        specifier: ^19.0.3
-        version: 19.0.3
+        specifier: ^18.0.4
+        version: 18.0.4
       '@grapecity-software/spread-sheets-formula-panel':
-        specifier: ^19.0.3
-        version: 19.0.3
+        specifier: ^18.0.4
+        version: 18.0.4
       '@grapecity-software/spread-sheets-ganttsheet':
-        specifier: ^19.0.3
-        version: 19.0.3
+        specifier: ^18.0.4
+        version: 18.0.4
       '@grapecity-software/spread-sheets-io':
-        specifier: ^19.0.3
-        version: 19.0.3
+        specifier: ^18.0.4
+        version: 18.0.4
       '@grapecity-software/spread-sheets-languagepackages':
-        specifier: ^19.0.3
-        version: 19.0.3
+        specifier: ^18.0.4
+        version: 18.0.4
       '@grapecity-software/spread-sheets-pdf':
-        specifier: ^19.0.3
-        version: 19.0.3
+        specifier: ^18.0.4
+        version: 18.0.4
       '@grapecity-software/spread-sheets-pivot-addon':
-        specifier: ^19.0.3
-        version: 19.0.3
+        specifier: ^18.0.4
+        version: 18.0.4
       '@grapecity-software/spread-sheets-print':
-        specifier: ^19.0.3
-        version: 19.0.3
+        specifier: ^18.0.4
+        version: 18.0.4
       '@grapecity-software/spread-sheets-reportsheet-addon':
-        specifier: ^19.0.3
-        version: 19.0.3
+        specifier: ^18.0.4
+        version: 18.0.4
       '@grapecity-software/spread-sheets-resources-zh':
-        specifier: ^19.0.3
-        version: 19.0.3
+        specifier: ^18.0.4
+        version: 18.0.4
       '@grapecity-software/spread-sheets-shapes':
-        specifier: ^19.0.3
-        version: 19.0.3
+        specifier: ^18.0.4
+        version: 18.0.4
       '@grapecity-software/spread-sheets-slicers':
-        specifier: ^19.0.3
-        version: 19.0.3
+        specifier: ^18.0.4
+        version: 18.0.4
       '@grapecity-software/spread-sheets-tablesheet':
-        specifier: ^19.0.3
-        version: 19.0.3
+        specifier: ^18.0.4
+        version: 18.0.4
       '@tanstack/vue-query':
         specifier: ^5.62.16
         version: 5.62.16(vue@3.4.21(typescript@5.7.2))
@@ -331,7 +331,7 @@ importers:
         specifier: ^0.17.8
         version: 0.17.8(@vueuse/core@11.3.0(vue@3.4.21(typescript@5.7.2)))(rollup@4.28.0)
       vconsole:
-        specifier: ^3.15.1
+        specifier: 3.15.1
         version: 3.15.1
       vite:
         specifier: 5.2.8
@@ -343,7 +343,7 @@ importers:
         specifier: ^0.4.2
         version: 0.4.2(vite@5.2.8(@types/node@20.17.9)(sass@1.77.6)(terser@5.36.0))
       vite-plugin-vconsole:
-        specifier: ^2.1.1
+        specifier: 2.1.1
         version: 2.1.1
       vitepress:
         specifier: ^1.5.0
@@ -1603,62 +1603,62 @@ packages:
   '@exodus/schemasafe@1.3.0':
     resolution: {integrity: sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==}
 
-  '@grapecity-software/spread-excelio@19.0.3':
-    resolution: {integrity: sha512-Qahf+kTFIJYRr8kp/WOe9gdPJ22b5WK2x6co4BGx/kQceH8DPI/No8b9RFgohi5po4kzWHorTRMBS8TEXnajSg==}
+  '@grapecity-software/spread-excelio@18.0.4':
+    resolution: {integrity: sha512-a1oNrKpNywxgZ+Y3E7EipiD30mFJEyE6dH1BKAxlGKZQk1kVPgX/FF0gQ6/5hpmAcAYXE4Ktq4cQWWQg0R/8VA==}
 
-  '@grapecity-software/spread-sheets-barcode@19.0.3':
-    resolution: {integrity: sha512-aQeKx5YeMrRVfC82rYZQ5+yE/QYp1/j81Bhvr+3F8G39A6jqNSaqxdmqevVItM7BChCsoVoD8HEXjYPZ5j5FTw==}
+  '@grapecity-software/spread-sheets-barcode@18.0.4':
+    resolution: {integrity: sha512-MlIe5g1mSN1DWiaNDvQEALIYVW5Hev8Hyw6MLsowWvTMh3hJpQ9I0+qQwhJmUP9URv7yCqIZ/TWIg0/JGirC6g==}
 
-  '@grapecity-software/spread-sheets-charts@19.0.3':
-    resolution: {integrity: sha512-XcZ20ykBn0wWfsmABZHSxPZ4Ij04WDccXV2xW4bRSifLQ/TvLERSyXsZzrdAeuDjubZXYcge56xjO0MiePBnsg==}
+  '@grapecity-software/spread-sheets-charts@18.0.4':
+    resolution: {integrity: sha512-RQlCR9yo6ge3FvEHPCecC6Yv+zVACD3Kl+tYORwMHpu3tyGUAgnGQfX3BydyX/DAITT/c5LLPB+yR63UnOLICQ==}
 
-  '@grapecity-software/spread-sheets-designer-resources-cn@19.0.3':
-    resolution: {integrity: sha512-1FEg13ZrCyg7ap2aDUrZb8UseqD0sQLuEHRVB4+3X4rSaIvDDVGFt591LuqeTd/GS6ZYKlwAP7QI7wf1eijyxw==}
+  '@grapecity-software/spread-sheets-designer-resources-cn@18.0.4':
+    resolution: {integrity: sha512-jUcNd89sSkiTDK+oqJIki28HKPvPVnhB3aRhxz4nnLwMqL8JFejblTjDJwJKKqQ5itnHstDhzNQ58BzcIXdaRA==}
 
-  '@grapecity-software/spread-sheets-designer-vue@19.0.3':
-    resolution: {integrity: sha512-M3eoe9BCPR90WZH5oyvZu5100i+d9lovrGcMAEmw0pHc9zgyyARPNnLtbOhlE9mLzm+b9239F1W5wYy3cjwgiA==}
+  '@grapecity-software/spread-sheets-designer-vue@18.0.4':
+    resolution: {integrity: sha512-nVWZOgKcQlaDJ+tf+I+Evp6UB2zyORhis+nEiqE+Ixkhc4UJr0BojnNhA9CA+0eBsPCUtYCPAnz/W45ttrR7rg==}
 
-  '@grapecity-software/spread-sheets-designer@19.0.3':
-    resolution: {integrity: sha512-uAYIKXgu7rxFE95ZIR8lY6Q0iIHTZVMHafbnXQTpJVxx0LD0OPTCvVslcSlUO//jGof/gOf5fb8NBWiri/+/YA==}
+  '@grapecity-software/spread-sheets-designer@18.0.4':
+    resolution: {integrity: sha512-aexIhr4T99s41SpkVrAhfcl4eiAOpJdSauIjKNPoc3d5dRdS+uJrcQGmGKypvhO3ArejAdiGCHkDZadsvKHgoQ==}
 
-  '@grapecity-software/spread-sheets-formula-panel@19.0.3':
-    resolution: {integrity: sha512-hGKuZm/j/gT6Ga+PIqbLBj5jb0GoiZtAfP8xxhFtMQ8jeajtQxUbbImDF/Fu3sYOct5RU9qOUt5eLmqIUAC0aQ==}
+  '@grapecity-software/spread-sheets-formula-panel@18.0.4':
+    resolution: {integrity: sha512-jCqlSe0RYiC8besCUVyXiZe/o1Kc5S40QcQBWrBMHM0FfbKVeF1qf5kKkozAWg0wdZLfpmd/h/emyGCafYxBwA==}
 
-  '@grapecity-software/spread-sheets-ganttsheet@19.0.3':
-    resolution: {integrity: sha512-k14tFCwFHFnwbwWc+UJETRMqMvZ/lwjcrFLBoLB7001n5p1Qic2vZ0JCZIU+wotbaYLl177pMBPgTnWK/+sQCg==}
+  '@grapecity-software/spread-sheets-ganttsheet@18.0.4':
+    resolution: {integrity: sha512-6GYO76CAQPUfqmO0XN2H5yRSRVOmckeLjmuag3nhKvc/nfAIYrVBm9hyYc/UoUt3hsIDF/7oSrJUyQ+Y3kE6Kw==}
 
-  '@grapecity-software/spread-sheets-io@19.0.3':
-    resolution: {integrity: sha512-CP5/jAQ3kYRBdifiweaMFKjEvUjnup65TgtjLMUYT+HIOEwpkOPUO1vKicd2ykpoPk1qakQRQ2wIwYfWizirUw==}
+  '@grapecity-software/spread-sheets-io@18.0.4':
+    resolution: {integrity: sha512-SJyKtZQEjCsqO9Eoq8jXlH/MgW4cB+5E3z7GF68JNSSnJ9vBgYSJ1kimEGFeCWUa9/mbrZWBF0tbwbWpGLqp0g==}
 
-  '@grapecity-software/spread-sheets-languagepackages@19.0.3':
-    resolution: {integrity: sha512-Jt4NssvSVlRV0YwOy0xpNHMm5YECrts5EGmXA2i00DZMOM4KjScaWdKhGHm6TsoKpItWdxP9txnhzmhxOoRrWA==}
+  '@grapecity-software/spread-sheets-languagepackages@18.0.4':
+    resolution: {integrity: sha512-xMEskSA39LFaMQRuz6Tr2k0muEh1Q1e0O4vFeW0uU5TKSJrDss06sH8NTpoiPSF1AIl1Jh8ElzV+Qh7HM9rk1w==}
 
-  '@grapecity-software/spread-sheets-pdf@19.0.3':
-    resolution: {integrity: sha512-v8jWOJU48FmZyz7lAKOVBnLIX4Z9a7k5EQMxfzQGQ2E14o8X/7yTj4hick518d2ACYi0cgOmfBd9AOEPtNvSEQ==}
+  '@grapecity-software/spread-sheets-pdf@18.0.4':
+    resolution: {integrity: sha512-SpgsrStTvF8jKo1GXjPEIRl12etW1ke0ERptdJjDubmMKXZnZVpEUGGJ/BT9oWGPULHje9h6bA+lEZTBnJHYSw==}
 
-  '@grapecity-software/spread-sheets-pivot-addon@19.0.3':
-    resolution: {integrity: sha512-s5/2jAD6hVAHwBJJNlUlrvkjlBtkhay7TVhgUHi2NemG8OhP2lEus90sHdV8Cz3r847zRvbE1UuAT6KoWJBvKw==}
+  '@grapecity-software/spread-sheets-pivot-addon@18.0.4':
+    resolution: {integrity: sha512-Vkr0x/aZMj86VR5JTfuoT6nj6nI+myUmkhM2cbLSqp7PRIo9Pk/2czMV1yyRUom4h2j7jOA7uzmHxvSQHM5c6A==}
 
-  '@grapecity-software/spread-sheets-print@19.0.3':
-    resolution: {integrity: sha512-gLCWpUIvODf0jiME3YuV51MhaAELc7MUlzQ3cZREgDSyvd8nK6WcS0tW8WqCGEn+KRadgL3pzcPSRvMOuuI11A==}
+  '@grapecity-software/spread-sheets-print@18.0.4':
+    resolution: {integrity: sha512-PBTgVEsQ1vv0e8noUM2Z9BP9FX4ZCaeGXfiRI8VrmpcaVVhFsoNHyTasaCXKl7LhEk6ek5JHUyvSrcw6fxpU4A==}
 
-  '@grapecity-software/spread-sheets-reportsheet-addon@19.0.3':
-    resolution: {integrity: sha512-t/PU8geMbx7IY9TC9xkTwsDQal3Tx0AgRSXjinNisrquqD4nNPDU9NzhY6akxA2uAhk9DtLqY7oW35BKZhWdAA==}
+  '@grapecity-software/spread-sheets-reportsheet-addon@18.0.4':
+    resolution: {integrity: sha512-m6REN62ru8t3Z6sv7rltmPdzQ95oPC0k4blBqCm2RD/oEnlp1l2NtlSLYYt2Uilb7T1eB5ARhYbQ4KmbyzkIWw==}
 
-  '@grapecity-software/spread-sheets-resources-zh@19.0.3':
-    resolution: {integrity: sha512-7jlZk7a/NDsKT9KKG8M8EmHS5zNrKLD0DfLVpNP8flh+TwWQj2g9o6LLSYKXlxA1nwuW4nWRB+l+nTVQEUr+Tw==}
+  '@grapecity-software/spread-sheets-resources-zh@18.0.4':
+    resolution: {integrity: sha512-a67tmT4I1bsk2eLKga3zfDlwMUOt6kyHXJQFnGK6frob3OLoGkhOsa2Xs4fq+rJnKpm0Z6GjBD7npIumllOOlA==}
 
-  '@grapecity-software/spread-sheets-shapes@19.0.3':
-    resolution: {integrity: sha512-Dx7XcXhs6zxe8Rabkfeqm4TCyOJluCnZPpdHfEm3Qgr8eMZ+B1nW3WrN8LbXInyB82nRITDSV95ddMjYp/OWtg==}
+  '@grapecity-software/spread-sheets-shapes@18.0.4':
+    resolution: {integrity: sha512-8qH0oXGjJnjQO4AP1daQZyTZEaqSOgPesDuUi1n5RPEYIfEOMEZR2KXBBkqWgDsrMvO+9LApL/Kay/iVK64QXQ==}
 
-  '@grapecity-software/spread-sheets-slicers@19.0.3':
-    resolution: {integrity: sha512-gWa21qVVCI7pxrFS/ypKuihlk7QId225B+izmrul6KBhWmxwjuVXD5eLAZ83Mkcm6kkIsMZSbMCMB9ZBcp+fjQ==}
+  '@grapecity-software/spread-sheets-slicers@18.0.4':
+    resolution: {integrity: sha512-isGDzN+fh4hxfarGyxkFn3mbUIELeeGxRhbH5PjA+nWXAEauxCbGXSIEPQ0r3OG+fwi5gG4ri3fCtwLtF9YKKA==}
 
-  '@grapecity-software/spread-sheets-tablesheet@19.0.3':
-    resolution: {integrity: sha512-MRlkKufB3uIAoAhQpMHgS9idffThQV0RabZXVQLId74SXNoikXxOPp1qRumVEvWj6UfynT/h5RCk4PMx0lPcLg==}
+  '@grapecity-software/spread-sheets-tablesheet@18.0.4':
+    resolution: {integrity: sha512-K+aBUbm1SupFldc5pYKCClCa58ak+Q6ZVkno9i+XO9PSV+SOZ0A03DRQiy7S9HgnsYTewNVfpyO+IxGKqQ5Zfg==}
 
-  '@grapecity-software/spread-sheets@19.0.3':
-    resolution: {integrity: sha512-dGmr6gTUicLiV247UQHeJg8Yxd6O5m6e/8FPL8ZrtmxFqwqivzCWLnTmvPS1DFW+kSMOjjX3ggKcCHt1Dx07Aw==}
+  '@grapecity-software/spread-sheets@18.0.4':
+    resolution: {integrity: sha512-xGli6qXVwg18sstSJlgkGwd3K4ytTS8xoRiYr43cN2RBLrGUaPvmfKduJkB9IfkBKzScoZODOVfV4QO42eonTg==}
 
   '@humanwhocodes/config-array@0.13.0':
     resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==}
@@ -8984,79 +8984,79 @@ snapshots:
 
   '@exodus/schemasafe@1.3.0': {}
 
-  '@grapecity-software/spread-excelio@19.0.3':
+  '@grapecity-software/spread-excelio@18.0.4':
     dependencies:
-      '@grapecity-software/spread-sheets': 19.0.3
+      '@grapecity-software/spread-sheets': 18.0.4
 
-  '@grapecity-software/spread-sheets-barcode@19.0.3':
+  '@grapecity-software/spread-sheets-barcode@18.0.4':
     dependencies:
-      '@grapecity-software/spread-sheets': 19.0.3
+      '@grapecity-software/spread-sheets': 18.0.4
 
-  '@grapecity-software/spread-sheets-charts@19.0.3':
+  '@grapecity-software/spread-sheets-charts@18.0.4':
     dependencies:
-      '@grapecity-software/spread-sheets': 19.0.3
-      '@grapecity-software/spread-sheets-shapes': 19.0.3
+      '@grapecity-software/spread-sheets': 18.0.4
+      '@grapecity-software/spread-sheets-shapes': 18.0.4
 
-  '@grapecity-software/spread-sheets-designer-resources-cn@19.0.3': {}
+  '@grapecity-software/spread-sheets-designer-resources-cn@18.0.4': {}
 
-  '@grapecity-software/spread-sheets-designer-vue@19.0.3': {}
+  '@grapecity-software/spread-sheets-designer-vue@18.0.4': {}
 
-  '@grapecity-software/spread-sheets-designer@19.0.3': {}
+  '@grapecity-software/spread-sheets-designer@18.0.4': {}
 
-  '@grapecity-software/spread-sheets-formula-panel@19.0.3':
+  '@grapecity-software/spread-sheets-formula-panel@18.0.4':
     dependencies:
-      '@grapecity-software/spread-sheets': 19.0.3
+      '@grapecity-software/spread-sheets': 18.0.4
 
-  '@grapecity-software/spread-sheets-ganttsheet@19.0.3':
+  '@grapecity-software/spread-sheets-ganttsheet@18.0.4':
     dependencies:
-      '@grapecity-software/spread-sheets': 19.0.3
-      '@grapecity-software/spread-sheets-tablesheet': 19.0.3
+      '@grapecity-software/spread-sheets': 18.0.4
+      '@grapecity-software/spread-sheets-tablesheet': 18.0.4
 
-  '@grapecity-software/spread-sheets-io@19.0.3':
+  '@grapecity-software/spread-sheets-io@18.0.4':
     dependencies:
-      '@grapecity-software/spread-sheets': 19.0.3
+      '@grapecity-software/spread-sheets': 18.0.4
 
-  '@grapecity-software/spread-sheets-languagepackages@19.0.3':
+  '@grapecity-software/spread-sheets-languagepackages@18.0.4':
     dependencies:
-      '@grapecity-software/spread-sheets': 19.0.3
+      '@grapecity-software/spread-sheets': 18.0.4
 
-  '@grapecity-software/spread-sheets-pdf@19.0.3':
+  '@grapecity-software/spread-sheets-pdf@18.0.4':
     dependencies:
-      '@grapecity-software/spread-sheets': 19.0.3
-      '@grapecity-software/spread-sheets-print': 19.0.3
+      '@grapecity-software/spread-sheets': 18.0.4
+      '@grapecity-software/spread-sheets-print': 18.0.4
 
-  '@grapecity-software/spread-sheets-pivot-addon@19.0.3':
+  '@grapecity-software/spread-sheets-pivot-addon@18.0.4':
     dependencies:
-      '@grapecity-software/spread-sheets': 19.0.3
-      '@grapecity-software/spread-sheets-shapes': 19.0.3
+      '@grapecity-software/spread-sheets': 18.0.4
+      '@grapecity-software/spread-sheets-shapes': 18.0.4
 
-  '@grapecity-software/spread-sheets-print@19.0.3':
+  '@grapecity-software/spread-sheets-print@18.0.4':
     dependencies:
-      '@grapecity-software/spread-sheets': 19.0.3
+      '@grapecity-software/spread-sheets': 18.0.4
 
-  '@grapecity-software/spread-sheets-reportsheet-addon@19.0.3':
+  '@grapecity-software/spread-sheets-reportsheet-addon@18.0.4':
     dependencies:
-      '@grapecity-software/spread-sheets': 19.0.3
-      '@grapecity-software/spread-sheets-print': 19.0.3
+      '@grapecity-software/spread-sheets': 18.0.4
+      '@grapecity-software/spread-sheets-print': 18.0.4
 
-  '@grapecity-software/spread-sheets-resources-zh@19.0.3':
+  '@grapecity-software/spread-sheets-resources-zh@18.0.4':
     dependencies:
-      '@grapecity-software/spread-sheets': 19.0.3
+      '@grapecity-software/spread-sheets': 18.0.4
 
-  '@grapecity-software/spread-sheets-shapes@19.0.3':
+  '@grapecity-software/spread-sheets-shapes@18.0.4':
     dependencies:
-      '@grapecity-software/spread-sheets': 19.0.3
+      '@grapecity-software/spread-sheets': 18.0.4
 
-  '@grapecity-software/spread-sheets-slicers@19.0.3':
+  '@grapecity-software/spread-sheets-slicers@18.0.4':
     dependencies:
-      '@grapecity-software/spread-sheets': 19.0.3
-      '@grapecity-software/spread-sheets-shapes': 19.0.3
+      '@grapecity-software/spread-sheets': 18.0.4
+      '@grapecity-software/spread-sheets-shapes': 18.0.4
 
-  '@grapecity-software/spread-sheets-tablesheet@19.0.3':
+  '@grapecity-software/spread-sheets-tablesheet@18.0.4':
     dependencies:
-      '@grapecity-software/spread-sheets': 19.0.3
+      '@grapecity-software/spread-sheets': 18.0.4
 
-  '@grapecity-software/spread-sheets@19.0.3': {}
+  '@grapecity-software/spread-sheets@18.0.4': {}
 
   '@humanwhocodes/config-array@0.13.0':
     dependencies:

+ 424 - 24
src/components/PDFViewer/index.vue

@@ -8,13 +8,45 @@
     </view>
     <template v-else>
       <!-- #ifdef H5 -->
-      <view class="pdf-viewer-wrapper">
-        <view class="pdf-container" :id="containerId"></view>
+      <view class="pdf-viewport" :id="viewportId" :style="{ height: viewerHeight }">
+        <view class="pdf-transform-layer" :style="transformStyle">
+          <view class="pdf-container" :id="containerId"></view>
+        </view>
+      </view>
+      <view class="pdf-zoom-bar">
+        <view class="zoom-btn" @click="zoomOut">
+          <text class="zoom-btn-text">−</text>
+        </view>
+        <text class="zoom-label">{{ zoomPercent }}%</text>
+        <view class="zoom-btn" @click="zoomIn">
+          <text class="zoom-btn-text">+</text>
+        </view>
+        <view class="zoom-btn zoom-btn-reset" @click="resetZoom">
+          <text class="zoom-btn-text">重置</text>
+        </view>
       </view>
       <!-- #endif -->
       <!-- #ifndef H5 -->
-      <view v-if="imageSrc" class="pdf-image-container">
-        <image :src="imageSrc" mode="aspectFit" class="pdf-image" />
+      <view v-if="imageSrc" class="pdf-image-area" :style="{ height: viewerHeight }">
+        <movable-area class="pdf-movable-area">
+          <movable-view
+            v-if="imageWidth > 0 && imageHeight > 0"
+            direction="all"
+            :scale="true"
+            scale-min="0.5"
+            scale-max="5"
+            :scale-value="1"
+            class="pdf-movable-view"
+            :style="{ width: imageWidth + 'px', height: imageHeight + 'px' }"
+          >
+            <image
+              :src="imageSrc"
+              mode="aspectFit"
+              class="pdf-image"
+              :style="{ width: imageWidth + 'px' }"
+            />
+          </movable-view>
+        </movable-area>
       </view>
       <view v-else class="pdf-placeholder">
         <text class="placeholder-text">暂无PDF预览</text>
@@ -25,14 +57,16 @@
 </template>
 
 <script lang="ts" setup>
-import { ref, watch, onMounted, onUnmounted, nextTick } from 'vue'
+import { ref, computed, watch, onMounted, onUnmounted, nextTick } from 'vue'
 
 interface Props {
   source: ArrayBuffer | Blob | null
+  viewerHeight?: string
 }
 
 const props = withDefaults(defineProps<Props>(), {
   source: null,
+  viewerHeight: '100vh',
 })
 
 const emit = defineEmits<{
@@ -40,10 +74,9 @@ const emit = defineEmits<{
   error: [message: string]
 }>()
 
-const containerId = ref(`pdf-viewer-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`)
+const containerId = ref(`pdf-c-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`)
 const loading = ref(false)
 const errorMsg = ref('')
-
 const pageCount = ref(0)
 let pdfDoc: any = null
 
@@ -54,9 +87,261 @@ const imageHeight = ref(0)
 let isMounted = false
 
 // #ifdef H5
-import * as pdfjsLib from 'pdfjs-dist'
-import pdfjsWorker from 'pdfjs-dist/build/pdf.worker.min.mjs?url'
-// #endif
+import * as pdfjsLib from 'pdfjs-dist/legacy/build/pdf.mjs'
+import pdfjsWorker from 'pdfjs-dist/legacy/build/pdf.worker.min.mjs?url'
+
+const viewportId = ref(`pdf-vp-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`)
+
+const MIN_ZOOM = 0.5
+const MAX_ZOOM = 5
+const ZOOM_STEP = 0.25
+
+const zoomScale = ref(1)
+const panX = ref(0)
+const panY = ref(0)
+
+let contentHeight = 0
+
+const zoomPercent = computed(() => Math.round(zoomScale.value * 100))
+
+const transformStyle = computed(() => ({
+  transform: `translate(${panX.value}px, ${panY.value}px) scale(${zoomScale.value})`,
+  transformOrigin: '0 0',
+}))
+
+let touchStartDistance = 0
+let touchStartScale = 1
+let touchStartPanX = 0
+let touchStartPanY = 0
+let pinchCenterX = 0
+let pinchCenterY = 0
+let isPinching = false
+let isPanning = false
+let isScrolling = false
+let singleTouchStartX = 0
+let singleTouchStartY = 0
+let scrollMoveStartY = 0
+let touchStartClientY = 0
+let lastTapTime = 0
+let scrollVelocity = 0
+let momentumAnimId = 0
+let lastTouchY = 0
+let lastTouchTime = 0
+
+function getTouchDistance(touches: TouchList): number {
+  const dx = touches[0].clientX - touches[1].clientX
+  const dy = touches[0].clientY - touches[1].clientY
+  return Math.sqrt(dx * dx + dy * dy)
+}
+
+function getTouchCenter(touches: TouchList): { x: number; y: number } {
+  return {
+    x: (touches[0].clientX + touches[1].clientX) / 2,
+    y: (touches[0].clientY + touches[1].clientY) / 2,
+  }
+}
+
+function clampScroll() {
+  if (zoomScale.value > 1.01) return
+  panX.value = 0
+  const viewport = document.getElementById(viewportId.value)
+  if (!viewport) return
+  const vh = viewport.clientHeight
+  const maxScroll = Math.max(0, contentHeight - vh)
+  panY.value = Math.max(-maxScroll, Math.min(0, panY.value))
+}
+
+function onTouchStart(e: TouchEvent) {
+  cancelAnimationFrame(momentumAnimId)
+  scrollVelocity = 0
+
+  const viewport = document.getElementById(viewportId.value)
+  if (!viewport) return
+  const rect = viewport.getBoundingClientRect()
+
+  if (e.touches.length === 2) {
+    isPinching = true
+    isPanning = false
+    isScrolling = false
+    touchStartDistance = getTouchDistance(e.touches)
+    touchStartScale = zoomScale.value
+    touchStartPanX = panX.value
+    touchStartPanY = panY.value
+    const center = getTouchCenter(e.touches)
+    pinchCenterX = center.x - rect.left
+    pinchCenterY = center.y - rect.top
+    e.preventDefault()
+  } else if (e.touches.length === 1) {
+    const now = Date.now()
+    touchStartClientY = e.touches[0].clientY
+    if (now - lastTapTime < 300) {
+      if (zoomScale.value > 1.05) {
+        zoomScale.value = 1
+        panX.value = 0
+        clampScroll()
+      } else {
+        const cx = e.touches[0].clientX - rect.left
+        const cy = e.touches[0].clientY - rect.top
+        const newScale = 2
+        const ratio = newScale / zoomScale.value
+        panX.value = cx - cx * ratio
+        panY.value = cy - (cy - panY.value) * ratio
+        zoomScale.value = newScale
+      }
+      e.preventDefault()
+    } else if (zoomScale.value > 1.01) {
+      isPanning = true
+      isPinching = false
+      isScrolling = false
+      singleTouchStartX = e.touches[0].clientX
+      singleTouchStartY = e.touches[0].clientY
+      touchStartPanX = panX.value
+      touchStartPanY = panY.value
+    } else {
+      isScrolling = true
+      isPanning = false
+      isPinching = false
+      scrollMoveStartY = e.touches[0].clientY
+      lastTouchY = scrollMoveStartY
+      lastTouchTime = Date.now()
+    }
+    lastTapTime = now
+  }
+}
+
+function onTouchMove(e: TouchEvent) {
+  if (isPinching && e.touches.length >= 2) {
+    e.preventDefault()
+    const currentDistance = getTouchDistance(e.touches)
+    const newScale = Math.min(
+      MAX_ZOOM,
+      Math.max(MIN_ZOOM, touchStartScale * (currentDistance / touchStartDistance)),
+    )
+    const ratio = newScale / touchStartScale
+    panX.value = pinchCenterX - (pinchCenterX - touchStartPanX) * ratio
+    panY.value = pinchCenterY - (pinchCenterY - touchStartPanY) * ratio
+    zoomScale.value = newScale
+  } else if (isPanning && e.touches.length === 1) {
+    e.preventDefault()
+    panX.value = touchStartPanX + (e.touches[0].clientX - singleTouchStartX)
+    panY.value = touchStartPanY + (e.touches[0].clientY - singleTouchStartY)
+  } else if (isScrolling && e.touches.length === 1) {
+    e.preventDefault()
+    const y = e.touches[0].clientY
+    if (Math.abs(y - touchStartClientY) > 10) {
+      lastTapTime = 0
+    }
+    const now = Date.now()
+    const dt = now - lastTouchTime
+    if (dt > 0) {
+      scrollVelocity = ((lastTouchY - y) / dt) * 16
+    }
+    lastTouchY = y
+    lastTouchTime = now
+    panY.value += y - scrollMoveStartY
+    scrollMoveStartY = y
+    clampScroll()
+  }
+}
+
+function onTouchEnd(e: TouchEvent) {
+  if (e.touches.length === 0) {
+    if (isScrolling) {
+      isScrolling = false
+      startMomentumScroll()
+    }
+    isPinching = false
+    isPanning = false
+    if (zoomScale.value >= 0.95 && zoomScale.value < 1.05) {
+      zoomScale.value = 1
+      panX.value = 0
+      clampScroll()
+    }
+  } else if (e.touches.length === 1 && isPinching) {
+    isPinching = false
+    if (zoomScale.value > 1.01) {
+      isPanning = true
+      singleTouchStartX = e.touches[0].clientX
+      singleTouchStartY = e.touches[0].clientY
+      touchStartPanX = panX.value
+      touchStartPanY = panY.value
+    }
+  }
+}
+
+function startMomentumScroll() {
+  const friction = 0.95
+  function step() {
+    if (Math.abs(scrollVelocity) < 0.5) return
+    panY.value += scrollVelocity
+    scrollVelocity *= friction
+    clampScroll()
+    momentumAnimId = requestAnimationFrame(step)
+  }
+  momentumAnimId = requestAnimationFrame(step)
+}
+
+function onWheel(e: WheelEvent) {
+  e.preventDefault()
+  const viewport = document.getElementById(viewportId.value)
+  if (!viewport) return
+  const rect = viewport.getBoundingClientRect()
+
+  if (e.ctrlKey || e.metaKey) {
+    const delta = -e.deltaY
+    const factor = delta > 0 ? 1.1 : 1 / 1.1
+    const newScale = Math.min(MAX_ZOOM, Math.max(MIN_ZOOM, zoomScale.value * factor))
+    const cx = e.clientX - rect.left
+    const cy = e.clientY - rect.top
+    const ratio = newScale / zoomScale.value
+    panX.value = cx - (cx - panX.value) * ratio
+    panY.value = cy - (cy - panY.value) * ratio
+    zoomScale.value = newScale
+    if (newScale <= 1.01) {
+      panX.value = 0
+      clampScroll()
+    }
+  } else {
+    if (zoomScale.value > 1.01) {
+      panY.value -= e.deltaY
+      panX.value -= e.deltaX
+    } else {
+      panY.value -= e.deltaY
+      clampScroll()
+    }
+  }
+}
+
+function applyZoom(newScale: number, cx: number, cy: number) {
+  const ratio = newScale / zoomScale.value
+  panX.value = cx - (cx - panX.value) * ratio
+  panY.value = cy - (cy - panY.value) * ratio
+  zoomScale.value = newScale
+  if (newScale <= 1.01) {
+    panX.value = 0
+    clampScroll()
+  }
+}
+
+function zoomIn() {
+  const viewport = document.getElementById(viewportId.value)
+  if (!viewport) return
+  const rect = viewport.getBoundingClientRect()
+  applyZoom(Math.min(MAX_ZOOM, zoomScale.value + ZOOM_STEP), rect.width / 2, rect.height / 2)
+}
+
+function zoomOut() {
+  const viewport = document.getElementById(viewportId.value)
+  if (!viewport) return
+  const rect = viewport.getBoundingClientRect()
+  applyZoom(Math.max(MIN_ZOOM, zoomScale.value - ZOOM_STEP), rect.width / 2, rect.height / 2)
+}
+
+function resetZoom() {
+  zoomScale.value = 1
+  panX.value = 0
+  panY.value = 0
+}
 
 const renderAllPages = async () => {
   if (!pdfDoc) return
@@ -67,6 +352,8 @@ const renderAllPages = async () => {
     container.innerHTML = ''
 
     const containerWidth = uni.getSystemInfoSync().windowWidth - 32
+    const dpr = window.devicePixelRatio || 1
+    let totalHeight = 0
 
     for (let i = 1; i <= pdfDoc.numPages; i++) {
       const page = await pdfDoc.getPage(i)
@@ -75,23 +362,28 @@ const renderAllPages = async () => {
       const viewport = page.getViewport({ scale })
 
       const canvas = document.createElement('canvas')
-      canvas.width = viewport.width
-      canvas.height = viewport.height
+      canvas.width = Math.floor(viewport.width * dpr)
+      canvas.height = Math.floor(viewport.height * dpr)
       canvas.style.display = 'block'
       canvas.style.width = viewport.width + 'px'
       canvas.style.height = viewport.height + 'px'
 
       const context = canvas.getContext('2d')
+      context!.scale(dpr, dpr)
       await page.render({ canvasContext: context!, viewport }).promise
 
       container.appendChild(canvas)
+      totalHeight += viewport.height
     }
+
+    contentHeight = totalHeight
   } catch (error) {
     console.error('PDF页面渲染失败:', error)
     errorMsg.value = 'PDF页面渲染失败'
     emit('error', 'PDF页面渲染失败')
   }
 }
+// #endif
 
 const loadPDFFromArrayBuffer = async (data: ArrayBuffer) => {
   loading.value = true
@@ -161,6 +453,15 @@ const resetViewer = () => {
   pageCount.value = 0
   imageSrc.value = ''
   errorMsg.value = ''
+
+  // #ifdef H5
+  zoomScale.value = 1
+  panX.value = 0
+  panY.value = 0
+  contentHeight = 0
+  scrollVelocity = 0
+  cancelAnimationFrame(momentumAnimId)
+  // #endif
 }
 
 watch(
@@ -191,6 +492,16 @@ watch(
 onMounted(async () => {
   isMounted = true
 
+  // #ifdef H5
+  const viewport = document.getElementById(viewportId.value)
+  if (viewport) {
+    viewport.addEventListener('touchstart', onTouchStart, { passive: false })
+    viewport.addEventListener('touchmove', onTouchMove, { passive: false })
+    viewport.addEventListener('touchend', onTouchEnd, { passive: false })
+    viewport.addEventListener('wheel', onWheel, { passive: false })
+  }
+  // #endif
+
   if (props.source) {
     if (props.source instanceof Blob) {
       await loadPDFFromBlob(props.source)
@@ -202,6 +513,18 @@ onMounted(async () => {
 
 onUnmounted(() => {
   isMounted = false
+
+  // #ifdef H5
+  cancelAnimationFrame(momentumAnimId)
+  const viewport = document.getElementById(viewportId.value)
+  if (viewport) {
+    viewport.removeEventListener('touchstart', onTouchStart)
+    viewport.removeEventListener('touchmove', onTouchMove)
+    viewport.removeEventListener('touchend', onTouchEnd)
+    viewport.removeEventListener('wheel', onWheel)
+  }
+  // #endif
+
   resetViewer()
 })
 
@@ -212,6 +535,7 @@ defineExpose({
 
 <style lang="scss" scoped>
 .pdf-viewer {
+  position: relative;
   width: 100%;
 }
 
@@ -245,32 +569,108 @@ defineExpose({
   }
 }
 
-.pdf-viewer-wrapper {
+/* #ifdef H5 */
+.pdf-viewport {
+  position: relative;
   width: 100%;
-  margin-bottom: 16px;
+  overflow: hidden;
+  touch-action: none;
+  user-select: none;
+  -webkit-user-select: none;
+  background-color: #f5f5f5;
+  border-radius: 8px;
+}
+
+.pdf-transform-layer {
+  will-change: transform;
 }
 
 .pdf-container {
   display: flex;
   flex-direction: column;
   width: 100%;
-  overflow: auto;
-  background-color: #f5f5f5;
-  border-radius: 8px;
-  min-height: 200px;
+
+  canvas {
+    display: block;
+  }
+}
+
+.pdf-zoom-bar {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  gap: 8px;
+  padding: 6px 12px;
+  margin: 8px auto 0;
+  background-color: rgba(0, 0, 0, 0.65);
+  border-radius: 20px;
+  width: fit-content;
+}
+
+.zoom-btn {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 32px;
+  height: 32px;
+  background-color: rgba(255, 255, 255, 0.2);
+  border-radius: 50%;
+  cursor: pointer;
+  transition: background-color 0.2s;
+
+  &:active {
+    background-color: rgba(255, 255, 255, 0.4);
+  }
+}
+
+.zoom-btn-text {
+  font-size: 16px;
+  color: #fff;
+  line-height: 1;
+}
+
+.zoom-btn-reset {
+  width: auto;
+  padding: 0 10px;
+  border-radius: 12px;
+  margin-left: 4px;
+
+  .zoom-btn-text {
+    font-size: 12px;
+  }
 }
 
-.pdf-image-container {
+.zoom-label {
+  font-size: 13px;
+  color: #fff;
+  min-width: 40px;
+  text-align: center;
+}
+/* #endif */
+
+/* #ifndef H5 */
+.pdf-image-area {
   width: 100%;
-  overflow: hidden;
   background-color: #f5f5f5;
   border-radius: 8px;
+  overflow: hidden;
+}
 
-  .pdf-image {
-    display: block;
-    width: 100%;
-  }
+.pdf-movable-area {
+  width: 100%;
+  height: 100%;
+}
+
+.pdf-movable-view {
+  display: flex;
+  align-items: flex-start;
+  justify-content: center;
+}
+
+.pdf-image {
+  display: block;
 }
+/* #endif */
 
 .pdf-placeholder {
   display: flex;

+ 7 - 5
vite.config.ts

@@ -48,21 +48,23 @@ export default ({ command, mode }) => {
     VITE_APP_PROXY,
     VITE_APP_PROXY_PREFIX,
     VITE_USE_MOCK,
+    VITE_ENABLE_VCONSOLE,
   } = env
   console.log('环境变量 env -> ', env)
   // 在h5平台把vite环境变量提取出来替换成window上的属性
   const define = UNI_PLATFORM === 'h5' && mode === 'production' ? createDynamicDefine(env) : {}
   return defineConfig({
+    base: UNI_PLATFORM === 'h5' ? env.VITE_APP_PUBLIC_BASE : '/',
     envDir: './env', // 自定义env目录
 
     plugins: [
       viteVConsole({
-        entry: path.resolve('src/main.ts'), // 入口文件
-        localEnabled: true, // 本地启用
-        enabled: mode === 'development', // 仅开发环境启用
+        entry: path.resolve('src/main.ts'),
+        localEnabled: true,
+        enabled: mode === 'development' || VITE_ENABLE_VCONSOLE === 'true',
         config: {
-          maxLogNumber: 1000, // 最大日志数量
-          theme: 'light', // 主题颜色,可选 'dark'
+          maxLogNumber: 1000,
+          theme: 'light',
         },
       }),
       generateComponentTypes(),