From 509f1d71c91242b11fd287cfcdeafe3d19b2d807 Mon Sep 17 00:00:00 2001
From: 马宇豪 <978517621@qq.com>
Date: Tue, 04 Mar 2025 11:11:46 +0800
Subject: [PATCH] 新增
---
src/main.js | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/main.js b/src/main.js
index 3625db9..1a8a6f8 100644
--- a/src/main.js
+++ b/src/main.js
@@ -40,6 +40,11 @@
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
@@ -51,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)
--
Gitblit v1.9.2