【更新】文件预览组件更新

pull/138/head v2.2.14
小诺 1 year ago committed by 俞宝山
parent 3d06d1de5d
commit df4803471d

@ -10,20 +10,20 @@
</a-space> </a-space>
<a-card :bordered="false" :body-style="{ padding: '0px' }"> <a-card :bordered="false" :body-style="{ padding: '0px' }">
<vue-office-docx <vue-office-docx
v-if="props.fileType === 'doc' || props.fileType === 'docx'" v-if="props.fileType.toLowerCase() === 'doc' || props.fileType.toLowerCase() === 'docx'"
:src="props.src" :src="props.src"
style="height: 82vh" style="height: 82vh"
@rendered="renderedHandler" @rendered="renderedHandler"
/> />
<vue-office-excel <vue-office-excel
v-else-if="props.fileType === 'xls' || props.fileType === 'xlsx'" v-else-if="props.fileType.toLowerCase() === 'xls' || props.fileType.toLowerCase() === 'xlsx'"
:src="props.src" :src="props.src"
style="height: 82vh" style="height: 82vh"
@rendered="renderedHandler" @rendered="renderedHandler"
@error="errorHandler" @error="errorHandler"
/> />
<vue-office-pdf <vue-office-pdf
v-else-if="props.fileType === 'pdf'" v-else-if="props.fileType.toLowerCase() === 'pdf'"
:src="props.src" :src="props.src"
@rendered="renderedHandler" @rendered="renderedHandler"
@error="errorHandler" @error="errorHandler"
@ -65,7 +65,7 @@
default: '', default: '',
required: true required: true
}, },
// defaults || drag //
fileType: { fileType: {
type: String, type: String,
default: 'defaults', default: 'defaults',

Loading…
Cancel
Save