diff --git a/packages/cw/cw_office_sdk/components/cw-doc-preview/index.vue b/packages/cw/cw_office_sdk/components/cw-doc-preview/index.vue index e7c27398..d098f83f 100644 --- a/packages/cw/cw_office_sdk/components/cw-doc-preview/index.vue +++ b/packages/cw/cw_office_sdk/components/cw-doc-preview/index.vue @@ -45,11 +45,11 @@ export default { } }, mounted() { - this.getData(this.value) + this.getData(this.value.trim()) }, methods: { async getData(url) { - if (url.startsWith("http")) { + if (typeof url === 'string') { let buf = await fetch(url).then(r => r.arrayBuffer()); this.docxRender(buf); }