时间:2022-06-06 09:31:40 | 栏目:vue | 点击:次

<el-row type="flex" class="row-bg" justify="space-between">
<el-col :span="12">
<embed
:src='srcSourceLan'
type="application/pdf"
width="90%"
height="700px;"
/>
</el-col>
<el-col :span="12">
<embed
:src="srcTargetLan"
type="application/pdf"
width="90%"
height="700px;"
/>
</el-col>
</el-row>
srcSourceLan和srcTargetLan是请求接口返回的url
预览效果:

修改依赖文件node_modules下worker-loader里的index.js文件里路径
代码如下(示例):
const filename = _loaderUtils2.default.interpolateName(this, options.name || 'static/js/[hash].worker.js', {
context: options.context || this.rootContext || this.options.context,
regExp: options.regExp
});