同时支持文件下载及预览。
需要设置name属性和url属性,接收String,目前文件预览只支持word,ppt,excel。如果非上面几种类型文件则不展示预览
<template> <div> 文件下载: <h-file-preview :name="name" :url="url"></h-file-preview> <br /> 文件下载2: <h-file-preview :name="name" :url="url" :size="'mini'"></h-file-preview> </div> </template> <script> export default { data() { return { name: '文件11', url: 'https://ys-internal-resource.haigeek.com/ossresource/selfService/hardware/devicemappingexcel/设备模型与六位码对应关系表-商用干衣机-111c120024000810050101818000180000000000000000000000000000000000-3102-20221118180410663.xlsx' } } } </script>
← upload 上传组件 file-upload 文件上传 →