The docs for Vue.js mention the smart auto-change-tracking for plain Javascript objects:
When you pass a plain JavaScript object to a Vue instance as its data option, Vue.js will walk through all of its properties and convert them to getter/setters using Object.defineProperty.
Since Javascript's Map
and Set
datatypes are designed to be used with their in-built get
/set
methods, how can I get Vue to track calls (and therefore, changes) to the internal state of Map
s and Set
s?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…