@tato30/vue-pdf
Advanced tools
Comparing version 1.3.0 to 1.3.1
{ | ||
"name": "@tato30/vue-pdf", | ||
"description": "PDF viewer for Vue 3", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "main": "cjs/index.js", |
@@ -178,2 +178,13 @@ # VuePDF | ||
#### **:fit-parent** | ||
Type: `boolean` <br /> | ||
Default: `false` | ||
Fit page with parent width, this prop replace `scale` in width calculation | ||
```html | ||
<VuePDF :pdf="pdf" :page="1" fit-parent /> | ||
``` | ||
#### **:rotation** | ||
@@ -242,2 +253,25 @@ | ||
### **Methods** | ||
#### **reload()** | ||
Allows to reload page render task, useful to update parent width when `fit-parent` prop is used | ||
```vue | ||
<template> | ||
<VuePDF :pdf="pdf" :page="2" ref="VPDF" /> | ||
</template> | ||
setup(){ | ||
const VPDF = ref({}) | ||
return { | ||
VPDF, | ||
someEvent: () => { | ||
VPDF.value.reload() | ||
}, | ||
} | ||
} | ||
``` | ||
### **Events** | ||
@@ -244,0 +278,0 @@ |
67864
446