我使用带有webpack的vue cli,我对它非常好。但现在我有一点问题!
我希望来自< object>的数据属性中的路径标签也像……一样编译
使用 require() 帮手
require()
例:
<object :data="require(`../path/to/file-${if-you-need-to-pass-a-variable-here}.svg`)" type="image/svg+xml" >fallback</object>
<img :src="require(`../path/to/file-${if-you-need-to-pass-a-variable-here}.svg`)" alt="">