zhuliu 7 månader sedan
förälder
incheckning
899d0c3cc3
1 ändrade filer med 2 tillägg och 3 borttagningar
  1. 2 3
      src/components/VabOnlyOffice/index.vue

+ 2 - 3
src/components/VabOnlyOffice/index.vue

@@ -199,7 +199,6 @@ import mixins from './index.js'
        
         // eslint-disable-next-line no-undef,no-unused-vars
         this.docEditor = new DocsAPI.DocEditor('vabOnlyOffice', config)
-
       },
       async onRequestHistory(event){
         var params = {
@@ -213,14 +212,14 @@ import mixins from './index.js'
           }
         })
         
-        if((this.historyData && this.historyData.length == 0) || !this.currentVersion){
+        if((this.historyData && this.historyData.length == 0) || !this.historyData || !this.currentVersion){
           that.docEditor.refreshHistory({
             currentVersion:'',
             history:[]
           })
           return
         }
-        var currentVersion = this.currentVersion.currentVersion
+        var currentVersion = this.currentVersion
         this.option.version = currentVersion
         var history = []
         for(var i = 0;i<that.historyData.length;i++){