Apply suggestions from code review

Co-authored-by: Ramires Viana <59319979+ramiresviana@users.noreply.github.com>
This commit is contained in:
niubility000 2021-11-12 22:37:55 +08:00 committed by GitHub
parent 177bf18bfa
commit 3bb38c4dba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -320,12 +320,12 @@ export default {
return;
}
},
prefetchUrl: function(item, routePath) {
prefetchUrl: function(item) {
const key = Date.parse(item.modified);
if (item.type === "image" && !this.fullSize) {
return `${baseURL}/api/preview/big${routePath.slice(6)}?k=${key}`;
return `${baseURL}/api/preview/big${item.path}?k=${key}&inline=true`;
} else if (item.type === "image"){
return `${baseURL}/api/raw${routePath.slice(6)}?k=${key}`;
return `${baseURL}/api/raw${item.path}?k=${key}&inline=true`;
} else{
return "";
}