2.0.0 • Published 5 months ago

doc-preview-html v2.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

一个辅助预览docx文件的小工具

提供的方法与参数如下

方法名说明类型默认值版本
docFile2htmldocx文件转html(file, bodyContainer, header) => string-1.1.0+

docFile2html入参参数说明

参数说明默认值
file文档路径、或者文档流默认值
bodyContainer展示文档的html容器默认值
header可选参数,当file为文档路径时,可以通过header参数设置请求头默认值

Vue中示例

<template>
  <div>
    <div ref="content"></div>
  </div>
</template>

<script setup>
import { ref, onMounted } from "vue";
import { docFile2html } from "doc-preview-html";

const content = ref();

onMounted(() => {
  // 调用方法,入参可以是文档地址,可以是二进制文档流
  docFile2html("./test.doc", content.value);
});
</script>

<style scoped></style>
1.1.1

5 months ago

1.1.4

5 months ago

1.1.3

5 months ago

1.1.2

5 months ago

2.0.0

5 months ago

1.1.0

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago