Skip to content
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

use PascalCase #3123

Merged
merged 3 commits into from
Jan 5, 2025
Merged
Changes from 1 commit
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
16 changes: 8 additions & 8 deletions src/api/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
zhangenming marked this conversation as resolved.
Show resolved Hide resolved
/* ... */
})

// retrieve a registered component
const MyComponent = app.component('my-component')
const MyComponent = app.component('myComponent')
```

- **See also** [Component Registration](/guide/components/registration)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 <sup class="vt-badge" data-text="3.5+" /> {#app-config-throwunhandlederrorinproduction}
Expand Down