From f05818d31a429e5fee2f6acf401a9f02289be653 Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Tue, 11 Nov 2025 18:01:47 +0800 Subject: [PATCH] =?UTF-8?q?word=20=E6=96=87=E6=A1=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/common/DocumentSearchWord.vue | 96 ------------------------- 1 file changed, 96 deletions(-) diff --git a/src/views/common/DocumentSearchWord.vue b/src/views/common/DocumentSearchWord.vue index 8f231cd..5ce2bc8 100644 --- a/src/views/common/DocumentSearchWord.vue +++ b/src/views/common/DocumentSearchWord.vue @@ -50,92 +50,6 @@ import * as docxPreview from 'docx-preview/dist/docx-preview.js' const DOCX_CUSTOM_STYLE_ID = 'docx-preview-custom-style' -const DOCX_CUSTOM_STYLE = ` -.docx-wrapper { - margin: 0 auto; - background: linear-gradient(180deg, #fdfdff 0%, #f6f8ff 100%); - border-radius: 16px; - box-shadow: 0 24px 48px rgba(25,64,158,0.16); - overflow: hidden; - border: 1px solid rgba(68,112,255,0.18); -} -.docx-fonts-resolver { - position: absolute; - width: 0; - height: 0; - overflow: hidden; - opacity: 0; - pointer-events: none; -} -.docx-wrapper section { - background: transparent !important; - padding: 48px 56px !important; - line-height: 1.8; - font-size: 14px; - color: #1f2a62; -} -.docx-wrapper table { - width: 100% !important; - border-collapse: separate !important; - border-spacing: 0 !important; - margin: 24px 0 !important; - background: rgba(255,255,255,0.98) !important; - border-radius: 14px; - overflow: hidden; - box-shadow: inset 0 0 0 1px rgba(68,112,255,0.2); -} -.docx-wrapper table thead th { - background: linear-gradient(135deg, rgba(68,112,255,0.45), rgba(68,112,255,0.22)) !important; - color: #f5f7ff !important; - font-weight: 600 !important; - text-transform: uppercase; - letter-spacing: 0.6px; - padding: 14px 18px !important; - border-bottom: 1px solid rgba(36,71,182,0.3) !important; -} -.docx-wrapper table td, -.docx-wrapper table th { - border-left: 1px solid rgba(68,112,255,0.2) !important; - border-right: 1px solid rgba(68,112,255,0.2) !important; - padding: 14px 18px !important; - vertical-align: top !important; - background: transparent !important; - color: #27325d !important; - font-size: 13px !important; -} -.docx-wrapper table tr:nth-child(even) td { - background: rgba(242,245,255,0.9) !important; -} -.docx-wrapper table tr:nth-child(odd) td { - background: rgba(255,255,255,0.98) !important; -} -.docx-wrapper table tr:hover td { - background: rgba(68,112,255,0.16) !important; - color: #1e2a62 !important; -} -.docx-wrapper table td:first-child, -.docx-wrapper table th:first-child { - border-left: none !important; -} -.docx-wrapper table td:last-child, -.docx-wrapper table th:last-child { - border-right: none !important; -} -.docx-wrapper table tr:last-child td { - border-bottom: none !important; -} -.docx-wrapper table caption { - caption-side: top !important; - padding: 12px 0 !important; - font-weight: 600 !important; - color: #3f57c0 !important; - font-size: 15px !important; -} -.docx-wrapper table strong, -.docx-wrapper table b { - color: #2a3aa8 !important; -} -` const DEFAULT_DOC_URL = 'http://192.168.0.14:9090/smart-bid/technicalSolutionDatabase/2025/11/11/887b35d28b2149b6a7555fb639be9411.docx' @@ -183,15 +97,6 @@ export default { } }, - ensureDocxStyleInjected() { - if (document.getElementById(DOCX_CUSTOM_STYLE_ID)) return - const styleTag = document.createElement('style') - styleTag.id = DOCX_CUSTOM_STYLE_ID - styleTag.type = 'text/css' - styleTag.appendChild(document.createTextNode(DOCX_CUSTOM_STYLE)) - document.head.appendChild(styleTag) - }, - async loadDocument() { if (!this.docUrl) return this.loading = true @@ -204,7 +109,6 @@ export default { if (container) { container.innerHTML = '' } - this.ensureDocxStyleInjected() try { const headers = {}