Skip to content

Commit dfe4b5d

Browse files
chore: updated TODOs with SFC link
1 parent cf0d61f commit dfe4b5d

12 files changed

+71
-71
lines changed

src/api/application-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ app.directive('focus', {
138138

139139
#### vnode
140140

141-
A blueprint of the real DOM element received as el argument above. See the [VNode API](TODO) for full details.
141+
A blueprint of the real DOM element received as el argument above.
142142

143143
#### prevNode
144144

src/api/basic-reactivity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Basic Reactivity APIs
22

3-
> This section uses [single-file component](TODO: SFC) syntax for code examples
3+
> This section uses [single-file component](../guide/single-file-component.html) syntax for code examples
44
55
## `reactive`
66

src/api/composition-api.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Composition API
22

3-
> This section uses [single-file component](TODO: SFC) syntax for code examples
3+
> This section uses [single-file component](../guide/single-file-component.html) syntax for code examples
44
55
## `setup`
66

@@ -104,24 +104,24 @@ If `setup` returns an object, the properties on the object will be merged into t
104104
</template>
105105

106106
<script>
107-
import { ref, reactive } from 'vue'
108-
109-
export default {
110-
setup() {
111-
const count = ref(0)
112-
const object = reactive({ foo: 'bar' })
113-
114-
// expose to template
115-
return {
116-
count,
117-
object
107+
import { ref, reactive } from 'vue'
108+
109+
export default {
110+
setup() {
111+
const count = ref(0)
112+
const object = reactive({ foo: 'bar' })
113+
114+
// expose to template
115+
return {
116+
count,
117+
object
118+
}
118119
}
119120
}
120-
}
121121
</script>
122122
```
123123

124-
Note that [refs](./refs-api.html#ref) returned from `setup` are [automatically unwrapped](./refs-api.html#access-in-templates ) when accessed in the template so you shouldn't use `.value` in templates.
124+
Note that [refs](./refs-api.html#ref) returned from `setup` are [automatically unwrapped](./refs-api.html#access-in-templates) when accessed in the template so you shouldn't use `.value` in templates.
125125

126126
### Usage with Render Functions
127127

@@ -299,22 +299,22 @@ When using the Composition API, the concept of [reactive refs](./refs-api.html#r
299299
</template>
300300
301301
<script>
302-
import { ref, onMounted } from 'vue'
302+
import { ref, onMounted } from 'vue'
303303
304-
export default {
305-
setup() {
306-
const root = ref(null)
304+
export default {
305+
setup() {
306+
const root = ref(null)
307307
308-
onMounted(() => {
309-
// the DOM element will be assigned to the ref after initial render
310-
console.log(root.value) // <div/>
311-
})
308+
onMounted(() => {
309+
// the DOM element will be assigned to the ref after initial render
310+
console.log(root.value) // <div/>
311+
})
312312
313-
return {
314-
root
313+
return {
314+
root
315+
}
315316
}
316317
}
317-
}
318318
</script>
319319
```
320320

@@ -352,23 +352,23 @@ Composition API template refs do not have special handling when used inside `v-f
352352
</template>
353353

354354
<script>
355-
import { ref, reactive, onBeforeUpdate } from 'vue'
355+
import { ref, reactive, onBeforeUpdate } from 'vue'
356356

357-
export default {
358-
setup() {
359-
const list = reactive([1, 2, 3])
360-
const divs = ref([])
357+
export default {
358+
setup() {
359+
const list = reactive([1, 2, 3])
360+
const divs = ref([])
361361

362-
// make sure to reset the refs before each update
363-
onBeforeUpdate(() => {
364-
divs.value = []
365-
})
362+
// make sure to reset the refs before each update
363+
onBeforeUpdate(() => {
364+
divs.value = []
365+
})
366366

367-
return {
368-
list,
369-
divs
367+
return {
368+
list,
369+
divs
370+
}
370371
}
371372
}
372-
}
373373
</script>
374374
```

src/api/computed-watch-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Computed and watch
22

3-
> This section uses [single-file component](TODO: SFC) syntax for code examples
3+
> This section uses [single-file component](../guide/single-file-component.html) syntax for code examples
44
55
## `computed`
66

@@ -218,7 +218,7 @@ type StopHandle = () => void
218218

219219
## `watch`
220220

221-
The `watch` API is the exact equivalent of the Options API [this.$watch](./instance-methods.html#watch) (and the corresponding [watch](./options-data.html#watch) option). `watch` requires watching a specific data source and applies side effects in a separate callback function. It also is lazy by default - i.e. the callback is only called when the watched source has changed.
221+
The `watch` API is the exact equivalent of the Options API [this.\$watch](./instance-methods.html#watch) (and the corresponding [watch](./options-data.html#watch) option). `watch` requires watching a specific data source and applies side effects in a separate callback function. It also is lazy by default - i.e. the callback is only called when the watched source has changed.
222222

223223
- Compared to [watchEffect](#watcheffect), `watch` allows us to:
224224

src/api/directives.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
Dynamically rendering arbitrary HTML on your website can be very dangerous because it can easily lead to [XSS attacks](https://en.wikipedia.org/wiki/Cross-site_scripting). Only use `v-html` on trusted content and **never** on user-provided content.
3131
:::
3232

33-
In [single-file components](TODO:../guide/single-file-components.html), `scoped` styles will not apply to content inside `v-html`, because that HTML is not processed by Vue's template compiler. If you want to target `v-html` content with scoped CSS, you can instead use [CSS modules](https://vue-loader.vuejs.org/en/features/css-modules.html) or an additional, global `<style>` element with a manual scoping strategy such as BEM.
33+
In [single-file components](../guide/single-file-component.html), `scoped` styles will not apply to content inside `v-html`, because that HTML is not processed by Vue's template compiler. If you want to target `v-html` content with scoped CSS, you can instead use [CSS modules](https://vue-loader.vuejs.org/en/features/css-modules.html) or an additional, global `<style>` element with a manual scoping strategy such as BEM.
3434

3535
- **Example:**
3636

src/api/refs-api.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Refs
22

3-
> This section uses [single-file component](TODO: SFC) syntax for code examples
3+
> This section uses [single-file component](../guide/single-file-component.html) syntax for code examples
44
55
## `ref`
66

@@ -29,15 +29,15 @@ When a ref is returned as a property on the render context (the object returned
2929
</template>
3030

3131
<script>
32-
import { ref } from 'vue'
33-
export default {
34-
setup() {
35-
const count = ref(0)
36-
return {
37-
count
32+
import { ref } from 'vue'
33+
export default {
34+
setup() {
35+
const count = ref(0)
36+
return {
37+
count
38+
}
3839
}
3940
}
40-
}
4141
</script>
4242
```
4343

@@ -52,19 +52,19 @@ However, if we decide to change the inline event handler on button click to the
5252
</template>
5353

5454
<script>
55-
import { ref } from 'vue'
56-
export default {
57-
setup() {
58-
const count = ref(0)
59-
function increment() {
60-
count.value++ // ref is not unwrapped outside the template
61-
}
62-
return {
63-
count,
64-
increment
55+
import { ref } from 'vue'
56+
export default {
57+
setup() {
58+
const count = ref(0)
59+
function increment() {
60+
count.value++ // ref is not unwrapped outside the template
61+
}
62+
return {
63+
count,
64+
increment
65+
}
6566
}
6667
}
67-
}
6868
</script>
6969
```
7070

src/guide/component-basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ app.component('blog-post', {
432432
It should be noted that **these limitations does _not_ apply if you are using string templates from one of the following sources**:
433433

434434
- String templates (e.g. `template: '...'`)
435-
- [Single-file (`.vue`) components](TODO:single-file-components.html)
435+
- [Single-file (`.vue`) components](../guide/single-file-component.html)
436436
- `<script type="text/x-template">`
437437

438438
That's all you need to know about DOM template parsing caveats for now - and actually, the end of Vue's _Essentials_. Congratulations! There's still more to learn, but first, we recommend taking a break to play with Vue yourself and build something fun.

src/guide/component-props.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,10 @@ app.component('my-component', {
198198
propG: {
199199
type: Function,
200200
// Unlike object or array default, this is not a factory function - this is a function to serve as a default value
201-
default: function () {
201+
default: function() {
202202
return 'Default function'
203-
},
204-
},
203+
}
204+
}
205205
}
206206
})
207207
```
@@ -283,7 +283,7 @@ If you do **not** want the a component to automatically inherit attributes, you
283283
There are two common scenarios when attribute inheritance needs to be disabled:
284284

285285
1. When attributes need to be applied to other elements besides the root node
286-
1. When a component has multiple root nodes (i.e., a [fragment](TODO:fragment.md))
286+
1. When a component has multiple root nodes
287287

288288
By setting the `inheritAttrs` option to `false`, this gives you access to the component's `$attrs` property, which includes all attributes not included to component `props` and `emits` properties (e.g., `class`, `style`, `v-on` listeners, etc.).
289289

src/guide/component-registration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ app.component('my-component-name', {
1616

1717
The component's name is the first argument of `app.component`. In the example above, the component's name is "my-component-name".
1818

19-
The name you give a component may depend on where you intend to use it. When using a component directly in the DOM (as opposed to in a string template or [single-file component](TODO), we strongly recommend following the [W3C rules](https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name) for custom tag names:
19+
The name you give a component may depend on where you intend to use it. When using a component directly in the DOM (as opposed to in a string template or [single-file component](../guide/single-file-component.html), we strongly recommend following the [W3C rules](https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name) for custom tag names:
2020

2121
1. All lowercase
2222
2. Contains a hyphen (i.e., has multiple words connected with the hyphen symbol)

src/guide/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ version** in your published site, replacing `vue.js` with `vue.min.js`. This is
2929

3030
> Currently not available for Vue 3
3131
32-
NPM is the recommended installation method when building large scale applications with Vue. It pairs nicely with module bundlers such as [Webpack](https://webpack.js.org/) or [Browserify](http://browserify.org/). Vue also provides accompanying tools for authoring [Single File Components](TODO:single-file-components.html).
32+
NPM is the recommended installation method when building large scale applications with Vue. It pairs nicely with module bundlers such as [Webpack](https://webpack.js.org/) or [Browserify](http://browserify.org/). Vue also provides accompanying tools for authoring [Single File Components](../guide/single-file-component.html).
3333

3434
```bash
3535
# latest stable

src/guide/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## What is Vue.js?
44

5-
Vue (pronounced /vjuː/, like **view**) is a **progressive framework** for building user interfaces. Unlike other monolithic frameworks, Vue is designed from the ground up to be incrementally adoptable. The core library is focused on the view layer only, and is easy to pick up and integrate with other libraries or existing projects. On the other hand, Vue is also perfectly capable of powering sophisticated Single-Page Applications when used in combination with [modern tooling](TODO:single-file-components.html) and [supporting libraries](https://github.com/vuejs/awesome-vue#components--libraries).
5+
Vue (pronounced /vjuː/, like **view**) is a **progressive framework** for building user interfaces. Unlike other monolithic frameworks, Vue is designed from the ground up to be incrementally adoptable. The core library is focused on the view layer only, and is easy to pick up and integrate with other libraries or existing projects. On the other hand, Vue is also perfectly capable of powering sophisticated Single-Page Applications when used in combination with [modern tooling](../guide/single-file-component.html) and [supporting libraries](https://github.com/vuejs/awesome-vue#components--libraries).
66

77
If you’d like to learn more about Vue before diving in, we <a id="modal-player" href="#">created a video</a> walking through the core principles and a sample project.
88

src/guide/mixins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,4 @@ In Vue 2, mixins were the primary tool to abstract parts of component logic into
219219

220220
- Reusability is limited: we cannot pass any parameters to the mixin to change its logic which reduces their flexibility in terms of abstracting logic
221221

222-
To address these issues, we added a new way to organize code by logical concerns: the [Composition API](TODO).
222+
To address these issues, we added a new way to organize code by logical concerns: the [Composition API](composition-api-introduction.html).

0 commit comments

Comments
 (0)