File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const router = createRouter({
1010 { path : '/calc' , component : ( ) => import ( './views/Calc.vue' ) } ,
1111 { path : '/file-byte' , component : ( ) => import ( './views/FileByte.vue' ) } ,
1212 { path : '/nes-color' , component : ( ) => import ( './views/NesColor.vue' ) } ,
13+ { path : '/pdf-viewer' , component : ( ) => import ( './views/PdfViewer.vue' ) } ,
1314 ] ,
1415} ) ;
1516
Original file line number Diff line number Diff line change 44 <li ><RouterLink to =" /calc" >计算器</RouterLink ></li >
55 <li ><RouterLink to =" /file-byte" >文件字节 File Byte</RouterLink ></li >
66 <li ><RouterLink to =" /nes-color" >Nes Color</RouterLink ></li >
7+ <li ><RouterLink to =" /pdf-viewer" >PDF Viewer</RouterLink ></li >
78 </ol >
89</template >
Original file line number Diff line number Diff line change 1+ <template >
2+ <input type =" file" @change =" e => handleViewClick(e.target.files[0])" >
3+ </template >
4+
5+ <script setup>
6+ function handleViewClick (file )
7+ {
8+ location .href = ` /pdfviewer/web/viewer.html?file=${ URL .createObjectURL (file)} ` ;
9+ }
10+ </script >
You can’t perform that action at this time.
0 commit comments