From db905ecd14f63dba9337b4f4715584ef2d7e8c7e Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: 星期五, 07 三月 2025 14:45:00 +0800
Subject: [PATCH] 修改

---
 src/main.js |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/src/main.js b/src/main.js
index 686802e..1a8a6f8 100644
--- a/src/main.js
+++ b/src/main.js
@@ -39,6 +39,13 @@
 import DictData from '@/components/DictData'
 import '@/utils/filter'
 import '@/utils/validate'
+import Print from 'vue-print-nb'
+import FileSaver from 'file-saver'
+import * as XLSX from 'xlsx';
+//import XLSX from 'xlsx'  //无效导入,XLSX是undefined
+
+// 将excel表格模板设置全局
+
 // 全局方法挂载
 Vue.prototype.getDicts = getDicts
 Vue.prototype.getConfigKey = getConfigKey
@@ -49,7 +56,8 @@
 Vue.prototype.selectDictLabels = selectDictLabels
 Vue.prototype.download = download
 Vue.prototype.handleTree = handleTree
-
+Vue.prototype.$FileSaver = FileSaver
+Vue.prototype.$XLSX = XLSX
 // 全局组件挂载
 Vue.component('DictTag', DictTag)
 Vue.component('Pagination', Pagination)
@@ -62,6 +70,7 @@
 Vue.use(directive)
 Vue.use(plugins)
 Vue.use(VueMeta)
+Vue.use(Print)
 DictData.install()
 
 /**
@@ -76,6 +85,14 @@
 Vue.use(Element, {
   size: Cookies.get('size') || 'medium' // set element-ui default size
 })
+Vue.directive('removeAriaHidden', {
+  bind(el, binding) {
+    const ariaEls = el.querySelectorAll('.el-radio__original')
+    ariaEls.forEach((item) => {
+      item.removeAttribute('aria-hidden')
+    })
+  }
+})
 
 Vue.config.productionTip = false
 

--
Gitblit v1.9.2