Merge pull request #367 from jamebal/dev

fix: 解决打开 Excalidraw 文件时偶尔出现内容为空的问题
This commit is contained in:
jmal 2025-02-10 15:02:43 +08:00 committed by GitHub
commit 5a6d961349
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -71,7 +71,7 @@ export default {
}, },
data() { data() {
return { return {
excalidrawUrl: `${window.location.origin}/excalidraw/app/`, excalidrawUrl: null ,
excalidrawData: { excalidrawData: {
elements: [], elements: [],
appState: {}, appState: {},
@ -130,6 +130,7 @@ export default {
this.file.path = res.data.path this.file.path = res.data.path
this.loadData(res.data.contentText) this.loadData(res.data.contentText)
this.currentContext = res.data.contentText this.currentContext = res.data.contentText
this.excalidrawUrl = `${window.location.origin}/excalidraw/app/`
}) })
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.historyPopover.loadHistoryList(this.file.id) this.$refs.historyPopover.loadHistoryList(this.file.id)