fix: 从原型链添加toJson方法
This commit is contained in:
parent
d41e2fa62a
commit
74946d23fd
@ -31,7 +31,7 @@
|
||||
|
||||
// // JSON快捷方法
|
||||
if(!Object.toJson){
|
||||
Object.defineProperty(Object, "toJson", {
|
||||
Object.defineProperty(Object.prototype, "toJson", {
|
||||
enumerable: false,
|
||||
value: function() {
|
||||
return JSON.stringify(this);
|
||||
|
Loading…
Reference in New Issue
Block a user