From 903faf405e3f668d05c134123005f95f68417e02 Mon Sep 17 00:00:00 2001
From: wangxiaoshuang <825034831@qq.com>
Date: Tue, 16 Dec 2025 09:40:36 +0800
Subject: [PATCH] =?UTF-8?q?=E9=82=AE=E4=BB=B6=E9=99=84=E4=BB=B6=E9=A2=84?=
=?UTF-8?q?=E8=A7=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Preview/fun.js | 4 +--
src/components/Preview/index.vue | 17 ++++-------
src/components/PreviewFile/index.vue | 16 ++++++----
.../email-manage/components/EmailList.vue | 29 +++++++++++++++----
4 files changed, 43 insertions(+), 23 deletions(-)
diff --git a/src/components/Preview/fun.js b/src/components/Preview/fun.js
index 370657d7..4a76f522 100644
--- a/src/components/Preview/fun.js
+++ b/src/components/Preview/fun.js
@@ -4,7 +4,7 @@ import Preview from "./index.vue";
const PreviewConstructor = Vue.extend(Preview);
const preview = options => {
- const { path, type, title } = options;
+ const { path, type, title, isLocal = false } = options;
if (!path) throw `path is requred.but ${path}`
const id = `Preview_${new Date().getTime()}`;
const instance = new PreviewConstructor();
@@ -12,7 +12,7 @@ const preview = options => {
instance.vm = instance.$mount();
if (instance.vm.visible) return;
document.body.appendChild(instance.vm.$el);
- instance.vm.open(path, type, title);
+ instance.vm.open(path, type, title, isLocal);
instance.vm.$on("closed", () => {
document.body.removeChild(instance.vm.$el);
instance.vm.$destroy();
diff --git a/src/components/Preview/index.vue b/src/components/Preview/index.vue
index c44b0194..5b22ac8a 100644
--- a/src/components/Preview/index.vue
+++ b/src/components/Preview/index.vue
@@ -1,15 +1,8 @@
-
+
@@ -24,13 +17,15 @@ export default {
path: null,
type: null,
title: null,
+ isLocal: false
};
},
methods: {
- open(path, type, title) {
+ open(path, type, title, isLocal) {
this.path = path;
this.type = type;
this.title = title;
+ this.isLocal = isLocal;
this.visible = true;
},
handleClose() {
diff --git a/src/components/PreviewFile/index.vue b/src/components/PreviewFile/index.vue
index 53112407..7ee0ddc0 100644
--- a/src/components/PreviewFile/index.vue
+++ b/src/components/PreviewFile/index.vue
@@ -5,16 +5,17 @@
-
+