Skip to content

Commit 5753b78

Browse files
chore: switch javascript code blocks to js (#1020)
1 parent da874b2 commit 5753b78

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

src/guide/migration/custom-directives.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ It's generally recommended to keep directives independent of the component insta
8585

8686
In Vue 2, the component instance had to be accessed through the `vnode` argument:
8787

88-
```javascript
88+
```js
8989
bind(el, binding, vnode) {
9090
const vm = vnode.context
9191
}
9292
```
9393

9494
In Vue 3, the instance is now part of the `binding`:
9595

96-
```javascript
96+
```js
9797
mounted(el, binding, vnode) {
9898
const vm = binding.instance
9999
}

src/guide/migration/filters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ If you are using filters that were globally registered and then used throughout
7979

8080
Instead, you can make your global filters available to all components through [globalProperties](../../api/application-config.html#globalproperties):
8181

82-
```javascript
82+
```js
8383
// main.js
8484
const app = createApp(App)
8585

src/guide/migration/listeners-removed.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ badges:
1010

1111
The `$listeners` object has been removed in Vue 3. Event listeners are now part of `$attrs`:
1212

13-
```javascript
13+
```js
1414
{
1515
text: 'this is an attribute',
1616
onClose: () => console.log('close Event triggered')
@@ -54,7 +54,7 @@ export default {
5454

5555
If this component received an `id` attribute and a `v-on:close` listener, the `$attrs` object will now look like this:
5656

57-
```javascript
57+
```js
5858
{
5959
id: 'my-input',
6060
onClose: () => console.log('close Event triggered')

src/guide/render-function.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ For the `.passive`, `.capture`, and `.once` event modifiers, they can be concate
354354

355355
For example:
356356

357-
```javascript
357+
```js
358358
render() {
359359
return h('input', {
360360
onClickCapture: this.doThisInCapturingMode,

src/guide/single-file-component.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ touch rollup.config.js
9090

9191
Once the file is created we will need to open it with our editor of choice and add the following code.
9292

93-
```javascript
93+
```js
9494
// import our third party plugins
9595
import commonjs from 'rollup-plugin-commonjs'
9696
import VuePlugin from 'rollup-plugin-vue'
@@ -144,7 +144,7 @@ Here we are specifying:
144144
To also build `umd` and `cjs` modules we can simply add a few lines of configuration to our `rollup.config.js` and `package.json`
145145

146146
##### rollup.config.js
147-
```javascript
147+
```js
148148
output: [
149149
...
150150
{

0 commit comments

Comments
 (0)