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

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.

主站蜘蛛池模板: 临城县| 辰溪县| 都匀市| 健康| 永寿县| 科技| 富源县| 龙泉市| 平山县| 密云县| 清水县| 凤台县| 板桥市| 安义县| 牡丹江市| 嘉义县| 英山县| 大港区| 郧西县| 平乡县| 邹城市| 广安市| 太和县| 潮州市| 靖边县| 伊金霍洛旗| 玉树县| 吕梁市| 滨州市| 中牟县| 清流县| 襄城县| 曲阜市| 潜江市| 潜山县| 朔州市| 临西县| 梨树县| 崇礼县| 荔浦县| 科技|