File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @libresign/vue-pdf-editor" ,
33 "description" : " vue2 pdf editor component" ,
4- "version" : " 1.4.8 " ,
4+ "version" : " 1.5.0 " ,
55 "author" : " LibreCode" ,
66 "private" : false ,
77 "main" : " dist/vue-pdf-editor.umd.js" ,
Original file line number Diff line number Diff line change @@ -318,12 +318,16 @@ export default {
318318 type: Boolean ,
319319 default: false ,
320320 },
321+ initialScale: {
322+ type: Number ,
323+ default: 1 ,
324+ },
321325 },
322326 data () {
323327 return {
324328 wheelZoomCount: 0 ,
325329 narrowEnlargeShow: false ,
326- scale: 1 ,
330+ scale: this . initialScale ,
327331 pdfFile: null ,
328332 pdfName: ' ' ,
329333 numPages: null ,
@@ -340,6 +344,11 @@ export default {
340344 }
341345 },
342346 watch: {
347+ scale (newScale , oldScale ) {
348+ if (newScale !== oldScale) {
349+ this .$emit (' scale-changed' , newScale)
350+ }
351+ },
343352 },
344353 async mounted () {
345354 await this .init ()
@@ -386,6 +395,9 @@ export default {
386395 fetchFont (this .currentFont )
387396 this .narrowEnlargeShow = true
388397 this .initTextField ()
398+ this .$nextTick (() => {
399+ this .$emit (' pdf-editor:ready' )
400+ })
389401 } catch (e) {
390402 console .log (e)
391403 }
You can’t perform that action at this time.
0 commit comments