Browse Source

测试在线表格页面修改

duy 2 years ago
parent
commit
e4f2c06751
1 changed files with 28 additions and 12 deletions
  1. 28 12
      src/views/util/test.vue

+ 28 - 12
src/views/util/test.vue

@@ -1,21 +1,37 @@
 <template>
   <div>
-    <basic-container>测试页</basic-container>
+    1111111111
+    <basic-container>
+       <onlyoffice-editor :src="src" :config="editorConfig" @ready="onReady" />
+    </basic-container>
   </div>
 </template>
 
 <script>
-  export default {
-    name: "wel",
-    data() {
-      return {};
-    },
-    computed: {},
-    created() {
-    },
-    methods: {}
-  };
+export default {
+  data () {
+    return {
+      // src: 'http://IP/web-apps/apps/api/documents/api.js',
+       src: 'http://47.98.223.222:8090/web-apps/apps/api/documents/api.js',
+      editorConfig: {
+        document: {
+          fileType: 'cell',
+          key: 'key.docx',
+          title: '测试.docx',
+          url: 'https://bladex-test-info.oss-cn-chengdu.aliyuncs.com//upload/20220916/0cb657b0f5b70eeac8b8d5fbab86d00c.xlsx'
+       
+        },
+        editorConfig: {
+          callbackUrl: 'http://47.98.223.222:8090/web-apps/apps/api/v1/onlyoffice/callback'
+        }
+      }
+    }
+  },
+  methods: {
+    // 编辑器加载完毕后回调 ready 函数,editor 为当前编辑器实例
+    onReady (editor) {}
+  }
+}
 </script>
-
 <style scoped="scoped" lang="scss">
 </style>