如何设置记录 Dirty ExtJs 6

How to set a record Dirty ExtJs 6

我想将商店中的整条记录设为脏。我已经尝试过 record.setDirty() 但这种方法已被弃用。

ExtJS Record#Set

set 的第二个参数接受一个 "options" 对象,您可以在其中指定 dirty: true |假

record.set({ name: 'value', age: 42}, {
  dirty: true
});

record.set({}, {
  dirty: true
});