Skip to content

Switch javascript code blocks to js #1020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/guide/migration/custom-directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ It's generally recommended to keep directives independent of the component insta

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

```javascript
```js
bind(el, binding, vnode) {
const vm = vnode.context
}
```

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

```javascript
```js
mounted(el, binding, vnode) {
const vm = binding.instance
}
Expand Down
2 changes: 1 addition & 1 deletion src/guide/migration/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ If you are using filters that were globally registered and then used throughout

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

```javascript
```js
// main.js
const app = createApp(App)

Expand Down
4 changes: 2 additions & 2 deletions src/guide/migration/listeners-removed.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ badges:

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

```javascript
```js
{
text: 'this is an attribute',
onClose: () => console.log('close Event triggered')
Expand Down Expand Up @@ -54,7 +54,7 @@ export default {

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

```javascript
```js
{
id: 'my-input',
onClose: () => console.log('close Event triggered')
Expand Down
2 changes: 1 addition & 1 deletion src/guide/render-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ For the `.passive`, `.capture`, and `.once` event modifiers, they can be concate

For example:

```javascript
```js
render() {
return h('input', {
onClickCapture: this.doThisInCapturingMode,
Expand Down
4 changes: 2 additions & 2 deletions src/guide/single-file-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ touch rollup.config.js

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

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

##### rollup.config.js
```javascript
```js
output: [
...
{
Expand Down