Merge pull request #324 from jamebal/dev

style: OSS目录去掉重建索引的选项
This commit is contained in:
jmal 2024-11-30 16:40:41 +08:00 committed by GitHub
commit 0a48640a02
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,7 +31,7 @@
></icon-file> ></icon-file>
</div> </div>
<el-form class="details-form"> <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 <el-popover
placement="bottom" placement="bottom"
trigger="click"> trigger="click">
@ -177,7 +177,7 @@ export default {
return false return false
} }
return (this.file.contentType.indexOf('office') > -1 || ['pdf', 'epub'].includes(this.file.suffix)) return (this.file.contentType.indexOf('office') > -1 || ['pdf', 'epub'].includes(this.file.suffix))
} },
}, },
watch: { watch: {
message(msg) { message(msg) {
@ -193,6 +193,13 @@ export default {
} }
}, },
methods: { methods: {
isOSSFile(file) {
if (!file || !file.id) {
return false
}
// 判断id字符串里是否有斜杠,如果则返回false
return this.file.id.indexOf('/') > -1 || this.file.ossFolder
},
openFile() { openFile() {
this.$emit('openFile', this.file) this.$emit('openFile', this.file)
}, },