|
123 | 123 | const app = createApp({})
|
124 | 124 |
|
125 | 125 | // register an options object
|
126 |
| - app.component('my-component', { |
| 126 | + app.component('MyComponent', { |
127 | 127 | /* ... */
|
128 | 128 | })
|
129 | 129 |
|
130 | 130 | // retrieve a registered component
|
131 |
| - const MyComponent = app.component('my-component') |
| 131 | + const MyComponent = app.component('MyComponent') |
132 | 132 | ```
|
133 | 133 |
|
134 | 134 | - **مشاهده بیشتر** [ثبت المان](/guide/components/registration)
|
|
156 | 156 | })
|
157 | 157 |
|
158 | 158 | // register (object directive)
|
159 |
| - app.directive('my-directive', { |
| 159 | + app.directive('myDirective', { |
160 | 160 | /* custom directive hooks */
|
161 | 161 | })
|
162 | 162 |
|
163 | 163 | // register (function directive shorthand)
|
164 |
| - app.directive('my-directive', () => { |
| 164 | + app.directive('myDirective', () => { |
165 | 165 | /* ... */
|
166 | 166 | })
|
167 | 167 |
|
168 | 168 | // retrieve a registered directive
|
169 |
| - const myDirective = app.directive('my-directive') |
| 169 | + const myDirective = app.directive('myDirective') |
170 | 170 | ```
|
171 | 171 |
|
172 | 172 | - **مشاهده بیشتر** [دایرکتیوهای شخصی سازی شده](/guide/reusability/custom-directives)
|
@@ -632,13 +632,13 @@ console.log(app.config)
|
632 | 632 | - **مثال**
|
633 | 633 |
|
634 | 634 | ```js
|
635 |
| - app.config.idPrefix = 'my-app' |
| 635 | + app.config.idPrefix = 'myApp' |
636 | 636 | ```
|
637 | 637 |
|
638 | 638 | ```js
|
639 | 639 | // in a component:
|
640 |
| - const id1 = useId() // 'my-app:0' |
641 |
| - const id2 = useId() // 'my-app:1' |
| 640 | + const id1 = useId() // 'myApp:0' |
| 641 | + const id2 = useId() // 'myApp:1' |
642 | 642 | ```
|
643 | 643 |
|
644 | 644 | ## app.config.throwUnhandledErrorInProduction <sup class="vt-badge" data-text="3.5+" /> {#app-config-throwunhandlederrorinproduction}
|
|
0 commit comments