From 6fae51710b6c40fab8a4612469e7fabb2715b66c Mon Sep 17 00:00:00 2001
From: zhangenming <282126346@qq.com>
Date: Wed, 4 Dec 2024 10:25:12 +0800
Subject: [PATCH 1/3] Update application.md
---
src/api/application.md | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/api/application.md b/src/api/application.md
index 4d063dd706..3e8e29b595 100644
--- a/src/api/application.md
+++ b/src/api/application.md
@@ -123,12 +123,12 @@ Registers a global component if passing both a name string and a component defin
const app = createApp({})
// register an options object
- app.component('my-component', {
+ app.component('myComponent', {
/* ... */
})
// retrieve a registered component
- const MyComponent = app.component('my-component')
+ const MyComponent = app.component('myComponent')
```
- **See also** [Component Registration](/guide/components/registration)
@@ -156,17 +156,17 @@ Registers a global custom directive if passing both a name string and a directiv
})
// register (object directive)
- app.directive('my-directive', {
+ app.directive('myDirective', {
/* custom directive hooks */
})
// register (function directive shorthand)
- app.directive('my-directive', () => {
+ app.directive('myDirective', () => {
/* ... */
})
// retrieve a registered directive
- const myDirective = app.directive('my-directive')
+ const myDirective = app.directive('myDirective')
```
- **See also** [Custom Directives](/guide/reusability/custom-directives)
@@ -636,13 +636,13 @@ Configure a prefix for all IDs generated via [useId()](/api/composition-api-help
- **Example**
```js
- app.config.idPrefix = 'my-app'
+ app.config.idPrefix = 'myApp'
```
```js
// in a component:
- const id1 = useId() // 'my-app:0'
- const id2 = useId() // 'my-app:1'
+ const id1 = useId() // 'myApp:0'
+ const id2 = useId() // 'myApp:1'
```
## app.config.throwUnhandledErrorInProduction {#app-config-throwunhandlederrorinproduction}
From a825cc488d4bebf99295a84b7099d68ad0f90601 Mon Sep 17 00:00:00 2001
From: zhangenming <282126346@qq.com>
Date: Thu, 2 Jan 2025 10:44:24 +0800
Subject: [PATCH 2/3] Update src/api/application.md
Co-authored-by: Natalia Tepluhina
---
src/api/application.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/api/application.md b/src/api/application.md
index 3e8e29b595..5b2ba36963 100644
--- a/src/api/application.md
+++ b/src/api/application.md
@@ -123,7 +123,7 @@ Registers a global component if passing both a name string and a component defin
const app = createApp({})
// register an options object
- app.component('myComponent', {
+ app.component('MyComponent', {
/* ... */
})
From 0b347c2c5d41629a90f2034f0b8d9a14bd64853f Mon Sep 17 00:00:00 2001
From: zhangenming <282126346@qq.com>
Date: Thu, 2 Jan 2025 10:45:15 +0800
Subject: [PATCH 3/3] Update application.md
---
src/api/application.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/api/application.md b/src/api/application.md
index 5b2ba36963..f6e96bbe73 100644
--- a/src/api/application.md
+++ b/src/api/application.md
@@ -128,7 +128,7 @@ Registers a global component if passing both a name string and a component defin
})
// retrieve a registered component
- const MyComponent = app.component('myComponent')
+ const MyComponent = app.component('MyComponent')
```
- **See also** [Component Registration](/guide/components/registration)