测试onlyoffice
This commit is contained in:
parent
7a5f1f359f
commit
17ad8a9000
|
|
@ -0,0 +1,40 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<OnlyOfficeViewer :document-url="documentUrl" :document-title="documentTitle" :document-key="documentKey"
|
||||||
|
:mode="mode" :type="type" @document-ready="handleDocumentReady" @app-ready="handleAppReady"
|
||||||
|
@error="handleError" @initialized="handleInitialized" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import OnlyOfficeViewer from '@/views/common/OnlyOfficeViewer.vue'
|
||||||
|
export default {
|
||||||
|
name: 'TestOnlyOffice',
|
||||||
|
components: {
|
||||||
|
OnlyOfficeViewer,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
documentUrl: 'http://192.168.0.14:9090/smart-bid/technicalSolutionDatabase/2025/11/03/716d9f3d89434c56bc49296dbbccc226.docx',
|
||||||
|
documentTitle: '716d9f3d89434c56bc49296dbbccc226.docx',
|
||||||
|
documentKey: '716d9f3d89434c56bc49296dbbccc226',
|
||||||
|
mode: 'edit',
|
||||||
|
type: 'desktop', // desktop, mobile embedded
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleDocumentReady() {
|
||||||
|
console.log('文档已准备就绪');
|
||||||
|
},
|
||||||
|
handleAppReady() {
|
||||||
|
console.log('应用已准备就绪');
|
||||||
|
},
|
||||||
|
handleError(error) {
|
||||||
|
console.log('错误:', error);
|
||||||
|
},
|
||||||
|
handleInitialized() {
|
||||||
|
console.log('初始化完成');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
Loading…
Reference in New Issue