问题
The page is loading correctly on every browser except IE 11 and Microsoft Edge. The only error that i can see is "SCRIPT1028: SCRIPT1028: Expected identifier, string or number chunk-vendors.8615b873.js (1407,41419)". The code:
this.form.addEventListener("submit",async e=>{
try{
this.$emit("loading",!0),e.preventDefault();
const{
,error:n
}=await this.$stripe.createToken({...this.card,amount:1e3});
回答1:
Does the error point to the line using { ...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 this thread and this thread which have similar issues.
You need to use Babel to transpile it. Install @babel/plugin-proposal-object-rest-spread by running:
npm install --save-dev @babel/plugin-proposal-object-rest-spread
Then include it as plugin according to the usage.
来源:https://stackoverflow.com/questions/60695060/vue-js-render-error-on-ie-microsoft-edge