官术网_书友最值得收藏!

How does Vue achieve this?

Vue stores its data in the data option, which is either a function or an object:

...
data: {
// the model goes here
}
...

Any change in the data model is reflected in the view (on the screen). Vue achieves this reactivity with the help of getters and setters. When the data object is received by the Vue instance, all the properties of the data object will be updated as getters and setters. This is done with the help of the Object.defineProperty API.

主站蜘蛛池模板: 巴青县| 韶山市| 金沙县| 台湾省| 沙洋县| 新绛县| 县级市| 闽侯县| 桓仁| 会同县| 亳州市| 师宗县| 闻喜县| 夏邑县| 土默特右旗| 绍兴县| 黄大仙区| 竹山县| 和田市| 固安县| 宽城| 滦南县| 翼城县| 康平县| 楚雄市| 刚察县| 辽阳市| 林口县| 信宜市| 沈丘县| 临高县| 凤冈县| 镇宁| 甘泉县| 贵德县| 阜平县| 太原市| 深州市| 金塔县| 陕西省| 韶关市|