更新时间:2021-06-24 18:24:14
coverpage
Title Page
Packt Upsell
Why subscribe?
Packt.com
Contributors
About the author
About the reviewers
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Introducing Vue
What is Vue?
The quickest way to start using Vue2
Mustache template example
Using Vue's data option as a function
What problems does Vue solve?
Vue a jQuery successor
A learning tool for beginners
A versatile and progressive framework
A tool for animations and transitions
Features similar to other modern frontend frameworks and libraries
Why use Vue?
Declarative code
Feels like a right fit for a variety of projects
Easy-to-understand syntax
Directives
Modifiers
Vue methods
Computed properties and watchers
Summary
Basic Concepts of Vue 2
Data-driven views in Vue
What is reactivity?
How does Vue achieve this?
Computed properties and methods
What exactly are these dependencies?
Understanding components templates and props
Adding props and data for better components
Adding content to our components with the help of the data object
Other ways of building component templates in Vue
Building a simple web page out of components
Adding simple components to a Vue instance
Creating a more complex page out of components in Vue
Improving our Vue-based layouts with v-for
Watchers in Vue
Lifecycle hooks
What is a component's lifecycle?
How do we use lifecycle hooks?
Working with Vue-CLI Components Props and Slots
Vue component hierarchy and global and local components
Using Vue-CLI
Installing Git bash
Installing nvm
Why use nvm?
Installing and updating Vue-cli
Initializing a new project with Vue-cli
Setting up code editors to use with Vue
Working with Vue.js in Sublime Text 3
Dowloading Sublime Text 3
Install Package Manager
Working with Vue.js in VS Code
Installing VS Code and extensions
The structure of our Vue-cli-based project
Adding basic functionality to a child component
Adding props to our HelloAgain.vue
Passing data from children to parent components
Introduction to slots
Filters and Mixins
Using filters
An example of a filter that rounds up student grades
Using filters as a replacement for conditional directives
Chaining filters in Vue
Working with mixins
Building a simple app with repetitive functionality in different components
Staying DRY with mixins
Refactoring our viewportSize mixin
Making Your Own Directives and Plugins
Making our own directives
Understanding custom directives
Building a simple custom directive
Using local directives
Passing values to custom directives
Working with Vue plugins
Creating the simplest possible Vue plugin
Creating a plugin with options defined
Publishing a Vue plugin
Adding a simple plugin
Installing our NPM plugin in a Vue project using Vue CLI 3
Additional plugins to learn from