PDF preview component for mobile with Retina display support
When multiple requests are made to the same interface in a short period of time, pdf-retina can be useful if you need to ensure that the request executed first returns the results first
Read this in other languages: English | 简体中文
Experience the pdf-retina features online Edit in CodeSandbox
# use pnpm
$ pnpm install pdf-retina
# use npm
$ npm install pdf-retina --save
import wrapper from 'pdf-retina'
const pdfRetina = wrapper(axios, {
// unique: false,
// orderly: true
})
export default pdfRetina
import wrapper from 'pdf-retina'
const pdfRetina = wrapper(instance, {
// unique: false,
// orderly: true
})
export default pdfRetina
axios serializer wrapper function
-
Since:
1.0.0
-
Arguments:
Parameters | Description | Type | Optional | Required | Default |
---|---|---|---|---|---|
instance | axios or axios instance | AxiosInstance |
axios/axiosInstance | true | - |
options | serializer options | SerializerOptions |
- | false | - |
-
Returns: new axios instance with serializer
-
Example:
const http = pdfRetina(instance, {
// unique: false,
// orderly: true
})
- Types:
function axiosWithSeries<T = any, R = AxiosResponse<T>, D = any>(
config: SerializerRequestOptions<D>
): Promise<R>
function axiosWithSeries<T = any, R = AxiosResponse<T>, D = any>(
url: string,
config?: SerializerRequestOptions<D>
): Promise<R>
<script src="https://unpkg.com/pdf-retina@1.0.0/dist/index.global.prod.js"></script>
<script>
const http = pdfRetina(axios)
</script>
Please open an issue here.