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

Summary

In this chapter, we created our first real Vue app, with several useful functions, like a real-time markdown preview, a note list, and the local persistence of the notes. We introduced different Vue features, such as the computed properties that are automatically updated and cached as needed, the methods to reuse logic inside functions, the watchers to trigger code when properties change, lifecycle hooks to execute code when the Vue instance is created, and the filters to easily process expressions in our template. We also used a lot of Vue directives inside our template, such as ;v-model to bind form inputs, v-html to display dynamic HTML from our JavaScript properties, v-for to repeat elements and display lists, v-on (or @) to listen to events, v-bind (or :) to dynamically bind HTML attributes to JavaScript expressions or to apply CSS classes dynamically, and v-if to include or not template parts, depending on JavaScript expressions. We saw all of these features come together to build a fully functional web application, with Vue superpower helping us to get the work done without getting in the way.

In the next chapter, we will start a new project--a card-based browser game. We will introduce some new Vue features and will keep reusing all we know to continue building better and prettier web apps.

主站蜘蛛池模板: 兴安县| 宽城| 南开区| 大城县| 白朗县| 五大连池市| 讷河市| 长治县| 樟树市| 黔西县| 清水河县| 屯昌县| 平定县| 秦皇岛市| 平南县| 卢氏县| 雷波县| 霸州市| 龙口市| 聂荣县| 新和县| 特克斯县| 麻城市| 都昌县| 龙南县| 天门市| 滕州市| 瑞安市| 巴林右旗| 石城县| 平罗县| 德钦县| 衡山县| 黎川县| 山东省| 文水县| 阿拉善盟| 岢岚县| 平安县| 邛崃市| 宜昌市|