From c8a636df4ed2a6e8230f9b1ad34510b980792ac8 Mon Sep 17 00:00:00 2001 From: LiuJiaNan <15703339975@163.com> Date: Fri, 26 Dec 2025 14:35:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96Pdf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Pdf/index.d.ts | 2 ++ src/components/Pdf/index.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Pdf/index.d.ts b/src/components/Pdf/index.d.ts index 5f98608..ac549ac 100644 --- a/src/components/Pdf/index.d.ts +++ b/src/components/Pdf/index.d.ts @@ -7,6 +7,8 @@ export interface PdfProps { name?: string; /** 是否显示弹窗 */ visible?: boolean; + /** 弹窗的标题,默认 ”PDF预览“ */ + title?: string; /** 关闭弹窗的方法 */ onCancel?: () => void; /** 是否使用内联模式,true为不使用弹窗,默认 false */ diff --git a/src/components/Pdf/index.js b/src/components/Pdf/index.js index 86ae661..4899762 100644 --- a/src/components/Pdf/index.js +++ b/src/components/Pdf/index.js @@ -18,6 +18,7 @@ function Pdf(props) { file, name, inline = false, + title = "PDF预览", style = {}, } = props; @@ -94,7 +95,7 @@ function Pdf(props) { open={visible} maskClosable={false} width={isFullscreen ? "100vw" : pdfWidth + 100} - title="PDF预览" + title={title} onCancel={() => { isFullscreen && exitFullscreen(); onCancel();