Vue JS 在 IE / Microsoft Edge 上呈现错误
Vue JS render error on IE / Microsoft Edge
页面在除 IE 11 和 Microsoft Edge 之外的所有浏览器上都能正确加载。我能看到的唯一错误是“SCRIPT1028: SCRIPT1028: Expected identifier, string or number
块供应商。8615b873.js (1407,41419)”。
代码:
this.form.addEventListener("submit",async e=>{
try{
this.$emit("loading",!0),e.preventDefault();
const{
,error:n
}=await this.$stripe.createToken({...this.card,amount:1e3});
错误是否指向使用 { ...obj }
object rest/spread properties? The syntax is a part of ECMAScript 2018 which is not supported by Edge Legacy and IE. You could also refer to and 的行,它们有类似的问题。
您需要使用 Babel 来转译它。通过 运行:
安装 @babel/plugin-proposal-object-rest-spread
npm install --save-dev @babel/plugin-proposal-object-rest-spread
然后根据 usage.
将其作为插件包含在内
页面在除 IE 11 和 Microsoft Edge 之外的所有浏览器上都能正确加载。我能看到的唯一错误是“SCRIPT1028: SCRIPT1028: Expected identifier, string or number 块供应商。8615b873.js (1407,41419)”。 代码:
this.form.addEventListener("submit",async e=>{
try{
this.$emit("loading",!0),e.preventDefault();
const{
,error:n
}=await this.$stripe.createToken({...this.card,amount:1e3});
错误是否指向使用 { ...obj }
object rest/spread properties? The syntax is a part of ECMAScript 2018 which is not supported by Edge Legacy and IE. You could also refer to
您需要使用 Babel 来转译它。通过 运行:
安装 @babel/plugin-proposal-object-rest-spreadnpm install --save-dev @babel/plugin-proposal-object-rest-spread
然后根据 usage.
将其作为插件包含在内