perf: 该文件版本已经改变了。该页面将被重新加载
This commit is contained in:
parent
d49790ba78
commit
9ad85e01de
@ -90,6 +90,10 @@ export default {
|
|||||||
|
|
||||||
fileName() {
|
fileName() {
|
||||||
return this.value.name;
|
return this.value.name;
|
||||||
|
},
|
||||||
|
|
||||||
|
fileUpdatedAt() {
|
||||||
|
return this.value.updated_at ? $A.Date(this.value.updated_at, true) : '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -148,9 +152,9 @@ export default {
|
|||||||
const config = {
|
const config = {
|
||||||
"document": {
|
"document": {
|
||||||
"fileType": this.fileType,
|
"fileType": this.fileType,
|
||||||
"key": this.fileType + '-' + fileKey,
|
"key": `${this.fileType}-${fileKey}-${this.fileUpdatedAt}`,
|
||||||
"title": fileName,
|
"title": fileName,
|
||||||
"url": 'http://nginx/api/file/content/?id=' + fileKey + '&token=' + this.userToken,
|
"url": `http://nginx/api/file/content/?id=${fileKey}&token=${this.userToken}`,
|
||||||
},
|
},
|
||||||
"editorConfig": {
|
"editorConfig": {
|
||||||
"mode": "edit",
|
"mode": "edit",
|
||||||
@ -162,16 +166,16 @@ export default {
|
|||||||
"customization": {
|
"customization": {
|
||||||
"uiTheme": this.themeIsDark ? "theme-dark" : "theme-classic-light",
|
"uiTheme": this.themeIsDark ? "theme-dark" : "theme-classic-light",
|
||||||
},
|
},
|
||||||
"callbackUrl": 'http://nginx/api/file/content/office?id=' + fileKey + '&token=' + this.userToken,
|
"callbackUrl": `http://nginx/api/file/content/office?id=${fileKey}&token=${this.userToken}`,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (/\/hideenOfficeTitle\//.test(window.navigator.userAgent)) {
|
if (/\/hideenOfficeTitle\//.test(window.navigator.userAgent)) {
|
||||||
config.document.title = " ";
|
config.document.title = " ";
|
||||||
}
|
}
|
||||||
if ($A.leftExists(fileKey, "msgFile_")) {
|
if ($A.leftExists(fileKey, "msgFile_")) {
|
||||||
config.document.url = 'http://nginx/api/dialog/msg/download/?msg_id=' + $A.leftDelete(fileKey, "msgFile_") + '&token=' + this.userToken;
|
config.document.url = `http://nginx/api/dialog/msg/download/?msg_id=${$A.leftDelete(fileKey, "msgFile_")}&token=${this.userToken}`;
|
||||||
} else if ($A.leftExists(fileKey, "taskFile_")) {
|
} else if ($A.leftExists(fileKey, "taskFile_")) {
|
||||||
config.document.url = 'http://nginx/api/project/task/filedown/?file_id=' + $A.leftDelete(fileKey, "taskFile_") + '&token=' + this.userToken;
|
config.document.url = `http://nginx/api/project/task/filedown/?file_id=${$A.leftDelete(fileKey, "taskFile_")}&token=${this.userToken}`;
|
||||||
}
|
}
|
||||||
if (this.readOnly) {
|
if (this.readOnly) {
|
||||||
config.editorConfig.mode = "view";
|
config.editorConfig.mode = "view";
|
||||||
|
@ -99,7 +99,8 @@ export default {
|
|||||||
return {
|
return {
|
||||||
id: this.isOffice ? this.msgDetail.id : 0,
|
id: this.isOffice ? this.msgDetail.id : 0,
|
||||||
type: this.msgDetail.msg.ext,
|
type: this.msgDetail.msg.ext,
|
||||||
name: this.title
|
updated_at: this.msgDetail.created_at,
|
||||||
|
name: this.title,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
officeCode() {
|
officeCode() {
|
||||||
|
@ -99,6 +99,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
id: this.isOffice ? this.fileDetail.id : 0,
|
id: this.isOffice ? this.fileDetail.id : 0,
|
||||||
type: this.fileDetail.ext,
|
type: this.fileDetail.ext,
|
||||||
|
updated_at: this.fileDetail.created_at,
|
||||||
name: this.title
|
name: this.title
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user