使用 html-loader
就行, 但是 html-loader
和 html-webpack-plugin
冲突 , 自己看着来吧 ;
目前我是将静态资源放在 public
目录下, 例如:
<template>
<div class="receipt-qrcode-agreement">
<iframe ref="iframe" :src="`/html/payment-code-agreement/${language}/index.html`" frameborder="0" />
</div>
</template>
<script>
import { get as getLanguage } from '@/utils/language.js'
export default {
data() {
return {
language: ''
}
},
created() {
this.language = getLanguage()
},
}
</script>
<style lang="scss" scoped src="./index.scss"></style>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…