fix: 从原型链添加toJson方法
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user