From 039abb556571749e67019d1d806d2e4a7997859c Mon Sep 17 00:00:00 2001 From: zyn Date: Wed, 13 Dec 2023 17:18:23 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=E5=8A=A0=E8=BD=BD=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/preview/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/common/preview/index.js b/src/common/preview/index.js index 626d94777..4176911a2 100644 --- a/src/common/preview/index.js +++ b/src/common/preview/index.js @@ -5,7 +5,14 @@ import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig' import { getBusStandFileByAttId } from 'api/process' let Base64 = require('js-base64').Base64; import store from '@/store' +import { Loading } from "element-ui"; + export default attId => { + const loading = Loading.service({ + lock: true, + text: '正在加载文件', + spinner: 'el-icon-loading', + }) getBusStandFileByAttId({ attId }).then(res => { @@ -22,6 +29,7 @@ export default attId => { } } - }).catch(e => { + }).finally(() => { + loading.close() }) }