You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/v2/cookbook/adding-instance-properties.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ type: cookbook
4
4
order: 2
5
5
---
6
6
7
-
## Simple Example
7
+
## Base Example
8
8
9
9
There may be data/utilities you'd like to use in many components, but you don't want to [pollute the global scope](https://github.com/getify/You-Dont-Know-JS/blob/master/scope%20%26%20closures/ch3.md). In these cases, you can make them available to each Vue instance by defining them on the prototype:
Copy file name to clipboardExpand all lines: src/v2/cookbook/creating-custom-scroll-directives.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ type: cookbook
4
4
order: 7
5
5
---
6
6
7
-
## Simple Example
7
+
## Base Example
8
8
9
9
There are many times that we might want to add a bit of behavior, especially animation, to a scroll event on a site. There are many ways to do so, but the path with the least amount of code and dependencies is perhaps to use a [custom directive](https://vuejs.org/v2/guide/custom-directive.html) to create a hook for anything that fires off a particular scroll event.
Copy file name to clipboardExpand all lines: src/v2/cookbook/form-validation.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ type: cookbook
4
4
order: 3
5
5
---
6
6
7
-
## Simple Example
7
+
## Base Example
8
8
9
9
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.
Copy file name to clipboardExpand all lines: src/v2/cookbook/index.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,32 +35,34 @@ Recipes should generally:
35
35
> * Explain the pros and cons of your strategy, including when it is and isn't appropriate
36
36
> * Mention alternative solutions, if relevant, but leave in-depth explorations to a separate recipe
37
37
38
-
### Simple Example
38
+
We request that you follow the template below. We understand, however, that there are times when you may necessarily need to deviate for clarity or flow. Either way, all recipes should at some point discuss the nuance of the choice made using this pattern, preferably in the form of the alternative patterns section.
39
+
40
+
### Base Example
39
41
40
42
_required_
41
43
42
-
1. Articulate the problem in a sentence or two.
43
-
2. Explain the simplest possible solution in a sentence or two.
44
-
3. Show a small code sample.
45
-
4. Explain what this accomplishes in a sentence.
44
+
1.Articulate the problem in a sentence or two.
45
+
2.Explain the simplest possible solution in a sentence or two.
46
+
3.Show a small code sample.
47
+
4.Explain what this accomplishes in a sentence.
46
48
47
49
### Details about the Value
48
50
49
51
_required_
50
52
51
-
1. Address common questions that one might have while looking at the example. (Blockquotes are great for this)
52
-
2. Show examples of common missteps and how they can be avoided.
53
-
3. Show very simple code samples of good and bad patterns.
54
-
4. Discuss why this may be a compelling pattern. Links for reference are not required but encouraged.
53
+
1.Address common questions that one might have while looking at the example. (Blockquotes are great for this)
54
+
2.Show examples of common missteps and how they can be avoided.
55
+
3.Show very simple code samples of good and bad patterns.
56
+
4.Discuss why this may be a compelling pattern. Links for reference are not required but encouraged.
55
57
56
58
### Real-World Example
57
59
58
60
_required_
59
61
60
62
Demonstrate the code that would power a common or interesting use case, either by:
61
63
62
-
1. Walking through a few terse examples of setup, or
63
-
2. Embedding a codepen/jsfiddle example
64
+
1.Walking through a few terse examples of setup, or
65
+
2.Embedding a codepen/jsfiddle example
64
66
65
67
If you choose to do the latter, you should still talk through what it is and does.
Copy file name to clipboardExpand all lines: src/v2/cookbook/unit-testing-vue-components.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ type: cookbook
4
4
order: 6
5
5
---
6
6
7
-
## Simple Example
7
+
## Base Example
8
8
9
9
Unit testing is a fundamental part of software development. Unit tests execute the smallest units of code in isolation, in order to increase ease of adding new features and track down bugs. Vue's [single-file components](../guide/single-file-components.html) make it straight forward to write unit tests for components in isolation. This lets you develop new features with confidence you are not breaking existing ones, and helps other developers understand what your component does.
Copy file name to clipboardExpand all lines: src/v2/cookbook/using-axios-to-consume-apis.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ type: cookbook
4
4
order: 9
5
5
---
6
6
7
-
## Simple Example
7
+
## Base Example
8
8
9
9
There are many times when building application for the web that you may want to consume and display data from an API. There are several ways to do so, but a very popular approach is to use [axios](https://github.com/axios/axios), a promise-based HTTP client.
0 commit comments