Skip to content

Commit d47e835

Browse files
hootlexyyx990803
authored andcommitted
Add links for free video content at Vue School (#2177)
1 parent 41f82a4 commit d47e835

9 files changed

+16
-1
lines changed

src/v2/cookbook/form-validation.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ order: 3
66

77
## Base Example
88

9+
<div class="vueschool"><a href="https://vueschool.io/lessons/vuejs-form-validation-diy?friend=vuejs" target="_blank" rel="noopener" title="Free Vue.js Form Validation Lesson">Watch a free lesson on Vue School</a></div>
10+
911
Form validation is natively supported by the browser, but sometimes different browsers will handle things in a manner which makes relying on it a bit tricky. Even when validation is supported perfectly, there may be times when custom validations are needed and a more manual, Vue-based solution may be more appropriate. Let's begin with a simple example.
1012

1113
Given a form of three fields, make two required. Let's look at the HTML first:

src/v2/guide/class-and-style.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ order: 6
77
A common need for data binding is manipulating an element's class list and its inline styles. Since they are both attributes, we can use `v-bind` to handle them: we only need to calculate a final string with our expressions. However, meddling with string concatenation is annoying and error-prone. For this reason, Vue provides special enhancements when `v-bind` is used with `class` and `style`. In addition to strings, the expressions can also evaluate to objects or arrays.
88

99
## Binding HTML Classes
10+
<div class="vueschool"><a href="https://vueschool.io/lessons/vuejs-dynamic-classes?friend=vuejs" target="_blank" rel="noopener" title="Free Vue.js Dynamic Classes Lesson">Watch a free video lesson on Vue School</a></div>
1011

1112
### Object Syntax
1213

src/v2/guide/components-dynamic-async.md

+2
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ Check out more details on `<keep-alive>` in the [API reference](../api/#keep-ali
201201

202202
## Async Components
203203

204+
<div class="vueschool"><a href="https://vueschool.io/lessons/dynamically-load-components?friend=vuejs" target="_blank" rel="noopener" title="Free Vue.js Async Components lesson">Watch a free video lesson on Vue School</a></div>
205+
204206
In large applications, we may need to divide the app into smaller chunks and only load a component from the server when it's needed. To make that easier, Vue allows you to define your component as a factory function that asynchronously resolves your component definition. Vue will only trigger the factory function when the component needs to be rendered and will cache the result for future re-renders. For example:
205207

206208
``` js

src/v2/guide/components-registration.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ order: 101
66

77
> This page assumes you've already read the [Components Basics](components.html). Read that first if you are new to components.
88
9+
<div class="vueschool"><a href="https://vueschool.io/lessons/global-vs-local-components?friend=vuejs" target="_blank" rel="noopener" title="Free Vue.js Component Registration lesson">Watch a free video lesson on Vue School</a></div>
10+
911
## Component Names
1012

1113
When registering a component, it will always be given a name. For example, in the global registration we've seen so far:

src/v2/guide/components.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ type: guide
44
order: 11
55
---
66

7+
<div class="vueschool"><a href="https://vueschool.io/courses/vuejs-components-fundamentals?friend=vuejs" target="_blank" rel="noopener" title="Free Vue.js Components Fundamentals Course">Watch a free video course on Vue School</a></div>
8+
79
## Base Example
810

911
Here's an example of a Vue component:

src/v2/guide/custom-directive.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ order: 302
66

77
## Intro
88

9+
<div class="vueschool"><a href="https://vueschool.io/lessons/create-vuejs-directive?friend=vuejs" target="_blank" rel="noopener" title="Free Vue.js Custom Directives lesson">Watch a free video lesson on Vue School</a></div>
10+
911
In addition to the default set of directives shipped in core (`v-model` and `v-show`), Vue also allows you to register your own custom directives. Note that in Vue 2.0, the primary form of code reuse and abstraction is components - however there may be cases where you need some low-level DOM access on plain elements, and this is where custom directives would still be useful. An example would be focusing on an input element, like this one:
1012

1113
{% raw %}

src/v2/guide/instance.md

+2
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ In the future, you can consult the [API reference](../api/#Instance-Properties)
123123

124124
## Instance Lifecycle Hooks
125125

126+
<div class="vueschool"><a href="https://vueschool.io/lessons/understanding-the-vuejs-lifecycle-hooks?friend=vuejs" target="_blank" rel="noopener" title="Free Vue.js Lifecycle Hooks Lesson">Watch a free lesson on Vue School</a></div>
127+
126128
Each Vue instance goes through a series of initialization steps when it's created - for example, it needs to set up data observation, compile the template, mount the instance to the DOM, and update the DOM when data changes. Along the way, it also runs functions called **lifecycle hooks**, giving users the opportunity to add their own code at specific stages.
127129

128130
For example, the [`created`](../api/#created) hook can be used to run code after an instance is created:

src/v2/guide/single-file-components.md

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ order: 401
66

77
## Introduction
88

9+
<div class="vueschool"><a href="https://vueschool.io/lessons/introduction-to-single-file-components?friend=vuejs" target="_blank" rel="noopener" title="Free Vue.js Single File Components lesson">Watch a free video lesson on Vue School</a></div>
10+
911
In many Vue projects, global components will be defined using `Vue.component`, followed by `new Vue({ el: '#container' })` to target a container element in the body of every page.
1012

1113
This can work very well for small to medium-sized projects, where JavaScript is only used to enhance certain views. In more complex projects however, or when your frontend is entirely driven by JavaScript, these disadvantages become apparent:

themes/vue/source/css/_scrimba.styl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.scrimba
1+
.scrimba, .vueschool
22
background-color #e7ecf3
33
padding 1em 1.25em
44
border-radius 2px

0 commit comments

Comments
 (0)