From a446d2350769f58144da53447a75e13f14c4b4fa Mon Sep 17 00:00:00 2001 From: unknown <qq1940665526@163.com> Date: 星期二, 25 六月 2024 10:42:14 +0800 Subject: [PATCH] 优化 --- src/components/pdfview/index.vue | 35 +++-------------------------------- 1 files changed, 3 insertions(+), 32 deletions(-) diff --git a/src/components/pdfview/index.vue b/src/components/pdfview/index.vue index 74fe752..ff893e8 100644 --- a/src/components/pdfview/index.vue +++ b/src/components/pdfview/index.vue @@ -81,7 +81,9 @@ let ele = document.getElementById("imageParent"); this.viewerCon = new Viewer(ele, { inline: false, - container: "body", + container: this.container + ? this.container.querySelector("#app") + : "body", navbar: true, // 鏄剧ず瀵艰埅鏍� toolbar: true, // 鏄剧ず宸ュ叿鏍� title: true, // 鏄剧ず鏍囬 @@ -151,36 +153,5 @@ }; </script> <style scoped lang="less"> -.preview { - width: 100%; - height: 100%; - .imageBox { - height: calc(100% - 30px); - overflow-x: hidden; - overflow-y: auto; - background: #ccc; - box-sizing: border-box; - } - - .imageBox:hover { - cursor: zoom-in !important; - } - - .bottom_tool { - height: 30px; - background-color: rgba(0, 0, 0, 0.8); - display: flex; - justify-content: flex-end; - align-items: center; - svg { - margin-right: 15px; - fill: #d1d1d1; - } - svg:hover { - fill: #fff; - cursor: pointer; - } - } -} </style> -- Gitblit v1.9.1