Skip to content

Commit

Permalink
Merge pull request #324 from jamebal/dev
Browse files Browse the repository at this point in the history
style: OSS目录去掉重建索引的选项
  • Loading branch information
jamebal authored Nov 30, 2024
2 parents 495f68f + cedbbdc commit 0a48640
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/components/preview/FileDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
></icon-file>
</div>
<el-form class="details-form">
<el-form-item label="重建索引:" class="details-scan">
<el-form-item v-if="!isOSSFile(file)" label="重建索引:" class="details-scan">
<el-popover
placement="bottom"
trigger="click">
Expand Down Expand Up @@ -177,7 +177,7 @@ export default {
return false
}
return (this.file.contentType.indexOf('office') > -1 || ['pdf', 'epub'].includes(this.file.suffix))
}
},
},
watch: {
message(msg) {
Expand All @@ -193,6 +193,13 @@ export default {
}
},
methods: {
isOSSFile(file) {
if (!file || !file.id) {
return false
}
// 判断id字符串里是否有斜杠,如果则返回false
return this.file.id.indexOf('/') > -1 || this.file.ossFolder
},
openFile() {
this.$emit('openFile', this.file)
},
Expand Down

0 comments on commit 0a48640

Please sign in to comment.