Не показываем ссылку на оригинал, если это файл с диска

This commit is contained in:
Book Pauk
2019-02-04 20:43:01 +07:00
parent 1382ac12f1
commit 10d1f180bd

View File

@@ -65,7 +65,7 @@
min-width="100px"
>
<template slot-scope="scope">
<a :href="scope.row.url" target="_blank">Оригинал</a><br>
<a v-show="isUrl(scope.row.url)" :href="scope.row.url" target="_blank">Оригинал</a><br>
<a :href="scope.row.path" :download="getFileNameFromPath(scope.row.path)">Скачать FB2</a>
</template>
</el-table-column>
@@ -211,6 +211,10 @@ class HistoryPage extends Vue {
this.close();
}
isUrl(url) {
return (url.indexOf('file://') != 0);
}
close() {
this.$emit('history-toggle');
}