提交 3f09fdd0 authored 作者: haodaking's avatar haodaking

fix type

上级 de6e7e16
...@@ -16,8 +16,8 @@ onMounted(() => { ...@@ -16,8 +16,8 @@ onMounted(() => {
fetchReport() fetchReport()
}) })
// office文件 // office文件
const getUrl = (url) => { const getUrl = (url: string) => {
const fileExtensionName = url.split('.').pop() const fileExtensionName = url.split('.').pop() || ''
return ['pptx', 'doc', 'docx', 'xls', 'xlsx'].includes(fileExtensionName) return ['pptx', 'doc', 'docx', 'xls', 'xlsx'].includes(fileExtensionName)
? `https://view.officeapps.live.com/op/view.aspx?src=${url}` ? `https://view.officeapps.live.com/op/view.aspx?src=${url}`
: url : url
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论