|
|
@@ -33,13 +33,14 @@
|
|
|
currentFile.name
|
|
|
}}</span>
|
|
|
<el-button
|
|
|
- v-if="currentFile.url"
|
|
|
+ v-if="showActions && currentFile.url"
|
|
|
type="text"
|
|
|
icon="el-icon-view"
|
|
|
@click="handleOpenWindow"
|
|
|
>新窗口打开</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
+ v-if="showActions"
|
|
|
type="text"
|
|
|
icon="el-icon-download"
|
|
|
:disabled="!currentFile.storePath"
|
|
|
@@ -96,8 +97,13 @@
|
|
|
<!-- 其它格式:仅支持下载 -->
|
|
|
<div v-else class="fp-status">
|
|
|
<i class="el-icon-document" />
|
|
|
- <p>该格式暂不支持在线预览,请下载后查看</p>
|
|
|
- <el-button type="primary" size="small" @click="handleDownload"
|
|
|
+ <p v-if="showActions">该格式暂不支持在线预览,请下载后查看</p>
|
|
|
+ <p v-else>该格式暂不支持在线预览</p>
|
|
|
+ <el-button
|
|
|
+ v-if="showActions"
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="handleDownload"
|
|
|
>下载文件</el-button
|
|
|
>
|
|
|
</div>
|
|
|
@@ -139,6 +145,11 @@
|
|
|
ids: {
|
|
|
type: [Array, String],
|
|
|
default: () => []
|
|
|
+ },
|
|
|
+ // 是否显示「新窗口打开」「下载」操作,为false时仅做在线预览
|
|
|
+ showActions: {
|
|
|
+ type: Boolean,
|
|
|
+ default: true
|
|
|
}
|
|
|
},
|
|
|
data() {
|