美文网首页
Cannot assign to read only prope

Cannot assign to read only prope

作者: survivorsfyh | 来源:发表于2024-02-05 10:07 被阅读0次

创建对象的时候抛出如下异常

Cannot assign to read only property 'name' of function 'function Object() { [native code] }'
let dict: any = Object;

方法改造后即可

let dict: any = Object.assign({});

以上便是此次分享的全部内容,希望能对大家有所帮助!

相关文章

网友评论

      本文标题:Cannot assign to read only prope

      本文链接:https://www.haomeiwen.com/subject/dmdqadtx.html