perf: 优化excalidraw保存操作
This commit is contained in:
parent
4888b4b8c0
commit
a6a3fd286b
@ -100,7 +100,6 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.clearExcalidrawCache()
|
|
||||||
window.addEventListener('message', this.handleMessage)
|
window.addEventListener('message', this.handleMessage)
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
@ -118,6 +117,7 @@ export default {
|
|||||||
if (!this.$store.state.user.token) {
|
if (!this.$store.state.user.token) {
|
||||||
request = 'sharePreviewText'
|
request = 'sharePreviewText'
|
||||||
}
|
}
|
||||||
|
this.clearExcalidrawCache()
|
||||||
api[request]({
|
api[request]({
|
||||||
shareId: this.shareId,
|
shareId: this.shareId,
|
||||||
fileId: this.file.id,
|
fileId: this.file.id,
|
||||||
@ -243,6 +243,7 @@ export default {
|
|||||||
this.saved = true
|
this.saved = true
|
||||||
this.title = this.file.name
|
this.title = this.file.name
|
||||||
this.$emit('onEdit', this.saved)
|
this.$emit('onEdit', this.saved)
|
||||||
|
this.$message.success('保存成功')
|
||||||
this.$refs.historyPopover.loadHistoryList(this.file.id)
|
this.$refs.historyPopover.loadHistoryList(this.file.id)
|
||||||
if (this.thisEditorClosing) {
|
if (this.thisEditorClosing) {
|
||||||
this.thisEditorClosing = false
|
this.thisEditorClosing = false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user