Skip to content

Commit 7e643ff

Browse files
committed
docs: reduce the reliance on the global Vue in API Reference examples
vuejs/docs@35f5b52#diff-4bcba432c725c343e09028bc45d74c2a76af05e7148214dc7da62a8aace1718b
1 parent 4d94ce9 commit 7e643ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/api/application-config.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Every Vue application exposes a `config` object that contains the configuration settings for that application:
44

55
```js
6-
const app = Vue.createApp({})
6+
const app = createApp({})
77

88
console.log(app.config)
99
```
@@ -73,7 +73,7 @@ app.component('child-component', {
7373
Vue.prototype.$http = () => {}
7474

7575
// After
76-
const app = Vue.createApp({})
76+
const app = createApp({})
7777
app.config.globalProperties.$http = () => {}
7878
```
7979

@@ -107,7 +107,7 @@ This config option is only respected when using the runtime compiler. If you are
107107
- **使用方法:**
108108

109109
```js
110-
const app = Vue.createApp({
110+
const app = createApp({
111111
mounted() {
112112
console.log(this.$options.hello)
113113
}

0 commit comments

Comments
 (0)