From fdb0ed498f295b50c072c4b3652c08e2d60a747a Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期三, 03 十二月 2025 16:29:57 +0800
Subject: [PATCH] 增加pdf,xlsx,docx文件预览功能
---
src/main.js | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/src/main.js b/src/main.js
index f27273d..b59d4eb 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,3 +1,11 @@
+/*
+ * @Author: 鏉庡枂(寮�鍙戠粍) lzhe@yxqiche.com
+ * @Date: 2025-05-28 12:03:55
+ * @LastEditors: 鏉庡枂(寮�鍙戠粍) lzhe@yxqiche.com
+ * @LastEditTime: 2025-08-05 10:18:04
+ * @FilePath: /mdmweb/src/main.js
+ * @Description: 杩欐槸榛樿璁剧疆,璇疯缃甡customMade`, 鎵撳紑koroFileHeader鏌ョ湅閰嶇疆 杩涜璁剧疆: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
+ */
import { createApp } from 'vue';
import website from './config/website';
import axios from './axios';
@@ -34,6 +42,15 @@
import formSetting from './views/tool/formsetting.vue';
import tenantPackage from './views/system/tenantpackage.vue';
import tenantDatasource from './views/system/tenantdatasource.vue';
+//鏂囦欢瀵规瘮
+import CodeDiff from 'v-code-diff'
+import mitt from 'mitt'
+import VuePdfEmbed from 'vue-pdf-embed';
+import VueOfficeDocx from '@vue-office/docx';
+import VueOfficeExcel from '@vue-office/excel';
+
+const myemitter = mitt()
+window.myemitter = myemitter;
window.$crudCommon = crudCommon;
debug();
@@ -42,6 +59,7 @@
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.component(key, component);
}
+
app.component('basicContainer', basicContainer);
app.component('basicBlock', basicBlock);
app.component('highlight', highlight);
@@ -53,6 +71,11 @@
app.component('formSetting', formSetting);
app.component('tenantPackage', tenantPackage);
app.component('tenantDatasource', tenantDatasource);
+
+app.component('VuePdfEmbed', VuePdfEmbed);
+app.component('VueOfficeDocx', VueOfficeDocx);
+app.component('VueOfficeExcel', VueOfficeExcel);
+
app.config.globalProperties.$app = app;
app.config.globalProperties.$dayjs = dayjs;
app.config.globalProperties.website = website;
@@ -69,6 +92,7 @@
calcHeight: 10,
locale: messages[language],
});
+app.use(CodeDiff);
app.use(avueUeditor, { axios });
app.use(VueClipboard, {
autoSetContainer: true,
--
Gitblit v1.9.3