- Full-Stack Vue.js 2 and Laravel 5
- Anthony Gore
- 75字
- 2021-07-02 19:57:14
Reactivity
A key feature of Vue's design is its reactivity system. When you modify data, the view automatically updates to reflect that change.
For example, if we create a function that pushes another item to our array of grocery items after the page has already been rendered, the page will automatically re-render to reflect that change:
setTimeout(function() { app.groceries.push('Apples'); }, 2000);
Two seconds after the initial rendering, we see this:
<p id="app"> <h3>Grocery list</h3> <ul> <li>Bread</li> <li>Milk</li> <li>Apples</li> </ul> </p>
推薦閱讀
- 大學計算機基礎(第二版)
- iOS面試一戰到底
- 移動UI設計(微課版)
- Functional Programming in JavaScript
- Linux環境編程:從應用到內核
- 數據結構(C語言)
- 飛槳PaddlePaddle深度學習實戰
- C語言程序設計上機指導與習題解答(第2版)
- Windows Phone 7.5:Building Location-aware Applications
- Access 2010中文版項目教程
- Android群英傳
- 從Excel到Python數據分析:Pandas、xlwings、openpyxl、Matplotlib的交互與應用
- Backbone.js Testing
- Python+Office:輕松實現Python辦公自動化
- Python 快速入門(第3版)