Vue.js in Action cover

Vue.js in Action

Rating 4.0
Word count
550K words
Chapters
18
ISBN
9787302484929

Tags

Summary

Published by Tsinghua University Press in October 2017, Vue.js in Action is a hands-on introduction to Vue.js written by Liang Hao (known online as Aresn), the creator of the open-source UI component library iView, who previously led visualization infrastructure at TalkingData. Built on Vue.js 2, the book follows a three-part structure—Fundamentals, Advanced Topics, and In Practice—guiding readers from zero to a progressive command of this progressive front-end framework. Part One (Chapters 1–8) starts from the MVVM pattern and covers Vue instances and data binding, the lifecycle, interpolation and filters, computed properties, v-bind with class and style bindings, built-in directives such as v-if, v-show, and v-for, and form handling with v-model, before a systematic treatment of componentization: one-way data flow and validation for props, communication through custom events, slots and scoped slots, dynamic and async components, and custom directives. Part Two (Chapters 9–11) goes deeper into the render function and the virtual DOM, createElement, functional components, and JSX; front-end engineering and webpack configuration; single-file components and vue-loader; and the development of plugins including vue-router, Vuex, and the event-bus plugin vue-bus. Part Three (Chapters 12–15) dissects classic iView components such as Cascader and Collapse, walks through complete projects including a Zhihu Daily reader and an e-commerce site, and closes with an introduction to related open-source projects such as Nuxt.js, axios, and vue-i18n. Rich in examples and focused on hands-on practice, the book covers most of the Vue.js API and suits developers new to Vue.js as well as experienced readers seeking systematic improvement.

Editor's review

这本书在众多 Vue.js 入门书中有两个突出的不同:作者身份与实践视角。梁灏是 iView 组件库的作者,长期在一线做可视化基础架构,因此书中讲组件的章节不是从文档搬运,而是把“怎么写一个别人愿意用的组件”拆给读者看——props 数据验证如何设计、slot 与作用域插槽怎么用在真实场景、动态组件与异步组件在什么时候值得上。Vue.js 作者尤雨溪为本书作推荐序,前端社区的几位实践者也联袂推荐,对 2017 年前后想系统入门 Vue 的读者来说,这是一本分量很足的书。 结构上采用基础篇、进阶篇、实战篇三段递进:基础篇把指令、计算属性、v-model、组件通信讲扎实;进阶篇坦白说才是这本书的精华,Render 函数与虚拟 DOM、函数化组件、webpack 与单文件组件,这些是从“会写页面”跨到“能做工程”的必经门槛;实战篇用知乎日报、电商网站两个完整项目串起路由、状态管理和打包流程。 需要提醒的是,本书基于 Vue.js 2,配套工具链(webpack 配置方式、vue-cli 版本)与今天主流的 Vue 3 + Vite 已有代差,部分 API 与写法不再是官方推荐。但框架的核心思想——响应式、组件化、单向数据流、虚拟 DOM——迁移性很强,把它当作理解 Vue 设计思路的教材,仍然值得一读。

Who it's for

A good fit for

  • 有 HTML/CSS/JavaScript 基础、准备入门 Vue.js 的前端新手
  • 已会用 Vue 写页面,希望系统掌握组件化与工程化的开发者
  • 想通过完整项目了解单页应用开发流程的在校学生与转行者
  • 需要一本体系化教材的培训机构讲师与课程设计者

Not a good fit for

  • 完全零编程基础、尚未接触 JavaScript 的读者
  • 只想要 Vue 3 与 Vite 组合式 API 最新写法的读者
  • 以 React 或 Angular 为主、只需对比参考的资深前端

Reading tips

  1. 按章节顺序读基础篇,每节的示例亲手敲一遍,比通读文字效率高得多。
  2. 组件化(第7章)、Render 函数(第9章)、webpack(第10章)是三个台阶,读不懂可先跑通代码再回头理解。
  3. 读实战篇前先跑通项目源码,再对照书中节选的流程理解结构,避免陷在细节里。
  4. 注意本书基于 Vue.js 2,学完概念后建议对照 Vue 3 官方文档,梳理 API 与工具链的变化。

About the publisher

Tsinghua University Press China · Founded in 1980

Founded in 1980, Tsinghua University Press has 57 titles in our collection, covering popular science, medicine, health, law, philosophy and social sciences. Representative works include medical popular-science books such as Cancer Truth: Doctors Are Reading It Too and New Knowledge on Cancer by Bo Luo (Li Zhizhong), legal titles such as Sunshine Is the Best Preservative: Express Delivery of Major Global Anti-Corruption Cases, and works like Qi Ge's A Brief History of Philosophy with Big Ideas and Liu Yunhao's From the Internet to a New Industrial Revolution. Its authors include science writers, medical researchers, the Renmin University of China anti-corruption master's class and university scholars, reflecting a publishing profile that balances academic seriousness with accessible reading. As public information is limited, this profile is based only on the titles in our collection.

Contents

  1. Part 1 Fundamentals
  2. Chapter 1 Getting to Know Vue.js
  3. Chapter 2 Data Binding and Your First Vue Application
  4. Chapter 3 Computed Properties
  5. Chapter 4 v-bind and class and style Bindings
  6. Chapter 5 Built-in Directives
  7. Chapter 6 Forms and v-model
  8. Chapter 7 Components in Detail
  9. Chapter 8 Custom Directives
  10. Part 2 Advanced Topics
  11. Chapter 9 Render Functions
  12. Chapter 10 Using webpack
  13. Chapter 11 Plugins
  14. Part 3 In Practice
  15. Chapter 12 Dissecting Classic iView Components
  16. Chapter 13 In Practice: Building a Zhihu Daily Reader
  17. Chapter 14 In Practice: Building an E-commerce Site
  18. Chapter 15 Related Open-Source Projects

FAQ

这本书适合零基础学 Vue 吗?
适合有一定 HTML/CSS/JavaScript 基础、但没接触过 Vue 的读者。书中从 MVVM 模式讲起,循序渐进,示例较多;如果完全没有编程基础,建议先补 JavaScript 语法与 DOM 操作,再回来读。
书里的例子现在还能跑起来吗?
书中基于 Vue.js 2 与当时的 webpack、vue-cli 版本,直接照搬较新的 Node 环境可能遇到依赖版本报错。可以按书中的 package.json 固定旧版本依赖来复现,或参考相同思路改写为 Vue 3 写法练习。
这本书和 Vue 3 官方文档该怎么配合?
把本书当“理解框架思想”的教材,重点看响应式原理、组件通信、虚拟 DOM 与 Render 函数;具体 API 与工程配置以 Vue 3 官方文档为准,两者不冲突。
作者的 iView 组件库内容占多大比重?
第12章专门剖析 iView 的 Cascader、Collapse 组件与内置工具函数,属于进阶阅读,帮助理解高质量组件如何组织代码;其余章节不依赖 iView,可独立阅读。
读完后能达到什么水平?
大致能独立用 Vue 开发中等复杂度的单页应用:写组件、做组件通信、配置路由与状态管理、用 webpack 打包上线,并具备阅读源码与开发简单插件的能力。

Comments

Find this book

This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.

Top rated in the same category