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 @@
-
+