From 22a62aaed7e9e03f8f7df97661e6236a23090dda Mon Sep 17 00:00:00 2001 From: han2015 <1019850453@qq.com> Date: Wed, 11 Jun 2025 13:12:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E5=88=86=E4=BA=AB=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A2=84=E8=A7=88=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/doc/share.vue | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/views/doc/share.vue b/src/views/doc/share.vue index 9a04f10..1f8f95f 100644 --- a/src/views/doc/share.vue +++ b/src/views/doc/share.vue @@ -49,14 +49,23 @@ function showShareMessage(row:{uuid:string,code:string,name:string,expireTime:st h(ElText,{style:{'align-self':'flex-start'}},()=>row.name), h(ElText,{style:{'align-self':'flex-start'}},()=>"失效时间:"+row.expireTime), h(ElText,{style:{'align-self':'flex-start'}},()=>"链接:"+_shareURL), - h(ElButton, { - type: 'primary', - style: { width: '20%' }, - onClick: () => { - let _url=apiURL+`/share/zip?shareUuid=${row.uuid}&code=${row.code}&puuid=root&rootUuid=root` - window.open(_url) - } - },()=>'下载') + h('div',[ + h(ElButton, { + type: 'primary', + style: { width: '100px' }, + onClick: () => { + let _url=apiURL+`/share/zip?shareUuid=${row.uuid}&code=${row.code}&puuid=root&rootUuid=root` + window.open(_url) + } + },()=>'下载'), + h(ElButton, { + type: 'primary', + style: { width: '100px',margin:'0 10px' }, + onClick: () => { + onShareView(row) + } + },()=>'预览') + ]) ]), confirmButtonText: '复制分享链接', showCancelButton: true @@ -103,7 +112,7 @@ function onShareMember(row:matterInfo){ //文件预览 function onShareView(row:matterInfo){ - let a=row.name; + let a = row.name ?? ''; if(a.endsWith('...')){ a=`${row.uuid}-${row.code}.zip` }