|
@@ -0,0 +1,71 @@
|
|
|
+<template>
|
|
|
+ <myUpload @uploadBack="uploadBack" :fileInfo="fileInfo" :fileList="fileInfo.fileList">
|
|
|
+ </myUpload>
|
|
|
+ <!-- <DocumentEditor id="docEditor" documentServerUrl="http://documentserver/" :config="config" /> -->
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+
|
|
|
+import { DocumentEditor } from "@onlyoffice/document-editor-vue";
|
|
|
+import myUpload from '../../../components/upload'
|
|
|
+export default {
|
|
|
+ name: 'ExampleComponent',
|
|
|
+ components: {
|
|
|
+ DocumentEditor,
|
|
|
+ myUpload
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ config: {
|
|
|
+
|
|
|
+ },
|
|
|
+ configs: {
|
|
|
+ document: {
|
|
|
+ fileType: "docx",
|
|
|
+ key: "Khirz6zTPdfd7",
|
|
|
+ title: "Example Document Title.docx",
|
|
|
+ url: "https://example.com/url-to-example-document.docx"
|
|
|
+ },
|
|
|
+ documentType: "word",
|
|
|
+ editorConfig: {
|
|
|
+ callbackUrl: "https://example.com/url-to-callback.ashx"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ fileInfo: {
|
|
|
+ limit: 10,
|
|
|
+ url: '/aps/api/file/upload',
|
|
|
+ fileList: []
|
|
|
+ },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted(){
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getList() {
|
|
|
+ this.$http({
|
|
|
+ url: "/aps/restEdit",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ edit:true,
|
|
|
+ userId:'fanyan',
|
|
|
+ userName:'范岩'
|
|
|
+ },
|
|
|
+ }).then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onDocumentReady() {
|
|
|
+ console.log("Document is loaded");
|
|
|
+ },
|
|
|
+ uploadBack(){
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped></style>
|