Browse Source

Merge remote-tracking branch 'origin/master'

ZaiZai 1 year ago
parent
commit
852d270945
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/views/home/pdf.vue

+ 10 - 0
src/views/home/pdf.vue

@@ -1,5 +1,11 @@
 <template>
     <hc-new-card>
+        <template #extra>
+            <el-button type="primary" @click="goBack">
+                <HcIcon name="close" />
+                关闭
+            </el-button>
+        </template>
         <hc-pdf :src="pdfUrl" :download="isDownload" :print="isPrint" />
     </hc-new-card>
 </template>
@@ -9,6 +15,7 @@ import { isNullES } from 'js-fast-way'
 import { onActivated, ref } from 'vue'
 import { useRoute } from 'vue-router'
 import { btnAuth, decode } from '~uti/btn-auth'
+import router from '~src/router/index'
 
 //初始变量
 const useRoutes = useRoute()
@@ -40,4 +47,7 @@ onActivated(() => {
     //两个都有的情况下,以code为准
     pdfUrl.value = decode(code ?? '')
 })
+const goBack = ()=>{
+    router.back()
+}
 </script>