feat: display all pdf pages and add DocumentPreview (#88)

* feat: add DocumentPreview

* feat: display all pdf pages
This commit is contained in:
balibabu
2024-03-01 11:28:58 +08:00
committed by GitHub
parent 3d4315c42a
commit 5fb8989bb1
17 changed files with 813 additions and 43 deletions

View File

@@ -43,6 +43,7 @@ export default {
document_run: `${api_host}/document/run`,
document_change_parser: `${api_host}/document/change_parser`,
document_thumbnails: `${api_host}/document/thumbnails`,
get_document_file: `${api_host}/document/get`,
setDialog: `${api_host}/dialog/set`,
getDialog: `${api_host}/dialog/get`,

View File

@@ -106,7 +106,10 @@ request.interceptors.request.use((url: string, options: any) => {
* 请求response拦截器
* */
request.interceptors.response.use(async (response: any, request) => {
request.interceptors.response.use(async (response: any, options) => {
if (options.responseType === 'blob') {
return response;
}
const data: ResponseType = await response.clone().json();
// response 拦截