Skip to content

Commit

Permalink
perf: 优化excalidraw保存操作
Browse files Browse the repository at this point in the history
  • Loading branch information
jamebal committed Jan 18, 2025
1 parent 4888b4b commit a6a3fd2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/office/ExcalidrawEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ export default {
created() {
},
mounted() {
this.clearExcalidrawCache()
window.addEventListener('message', this.handleMessage)
},
beforeDestroy() {
Expand All @@ -118,6 +117,7 @@ export default {
if (!this.$store.state.user.token) {
request = 'sharePreviewText'
}
this.clearExcalidrawCache()
api[request]({
shareId: this.shareId,
fileId: this.file.id,
Expand Down Expand Up @@ -243,6 +243,7 @@ export default {
this.saved = true
this.title = this.file.name
this.$emit('onEdit', this.saved)
this.$message.success('保存成功')
this.$refs.historyPopover.loadHistoryList(this.file.id)
if (this.thisEditorClosing) {
this.thisEditorClosing = false
Expand Down

0 comments on commit a6a3fd2

Please sign in to comment.