js中对象中的字符串值

时间:2018-11-26 17:19:05

标签: javascript dojo

this._grid.event("dgrid-datachange", lang.hitch(this, function(evt){
  var rowData = evt.cell.row.data;
  switch(evt.cell.column.field){
    case 'gridComments':
			rowData.gridComments = evt.value;
			grid.updateDirty(evt.cell.row.id, 'gridComments', rowData.gridComments);
		break;
			default:
		break;
          }
        grid.get('store').put(rowData);
				grid.refresh();
        });
当编辑值并调试变量rowData时,我发现它就像这样

rowData: TMP
actualQuantity: "44"
   __proto__:
     gridComments: "444"
     id: 638
       __proto__:
         actualQuantity: "44.00"
        deficiencyOrIncrease: -43
        id: 638
        name: "General Product"
        productCode: ""
        quantity: 1

但是我想做的是存储所有值,而不在 proto 中存储旧值...任何帮助???

0 个答案:

没有答案