You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/api/built-in-components.md
+48-48
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,12 @@
2
2
pageClass: api
3
3
---
4
4
5
-
# Built-in Components {#built-in-components}
5
+
# کامپوننتهای نهادینهشده {#built-in-components}
6
6
7
-
:::info Registration and Usage
8
-
Built-in components can be used directly in templates without needing to be registered. They are also tree-shakeable: they are only included in the build when they are used.
7
+
:::info ثبت و استفاده
8
+
کامپوننتهای نهادینه شده میتوانند مستقیما و بدون نیاز به ثبت در تمپلیتها استفاده شوند. آنها همچنین tree-shakable (اصطلاحی است که که برای کدهای غیرقابل استفاده یا کدهای مرده استفاده میگردد) هستند یعنی تنها در ساخت و در هنگامی که استفاده میشوند، شامل میشوند.
9
9
10
-
When using them in [render functions](/guide/extras/render-function), they need to be imported explicitly. For example:
10
+
هنگام استفاده آنها در [توابع رندر](/guide/extras/render-function)، آنها باید به صراحت ایمپورت شوند. برای نمونه:
11
11
12
12
```js
13
13
import { h, Transition } from'vue'
@@ -21,7 +21,7 @@ h(Transition, {
21
21
22
22
## `<Transition>` {#transition}
23
23
24
-
Provides animated transition effects to a **single** element or component.
24
+
جلوه های ترنزیشن متحرک را به یک عنصر یا کامپوننت ارائه می دهد.
25
25
26
26
-**Props**
27
27
@@ -78,7 +78,7 @@ Provides animated transition effects to a **single** element or component.
78
78
}
79
79
```
80
80
81
-
-**Events**
81
+
-**رویدادها**
82
82
83
83
-`@before-enter`
84
84
-`@before-leave`
@@ -92,49 +92,49 @@ Provides animated transition effects to a **single** element or component.
92
92
-`@leave-cancelled` (`v-show` only)
93
93
-`@appear-cancelled`
94
94
95
-
-**Example**
95
+
-**مثال**
96
96
97
-
Simple element:
97
+
عنصر ساده:
98
98
99
99
```vue-html
100
100
<Transition>
101
101
<div v-if="ok">toggled content</div>
102
102
</Transition>
103
103
```
104
104
105
-
Forcing a transition by changing the`key` attribute:
105
+
اعمال یک ترنزیشن به وسیله صفت`key`:
106
106
107
107
```vue-html
108
108
<Transition>
109
109
<div :key="text">{{ text }}</div>
110
110
</Transition>
111
111
```
112
112
113
-
Dynamic component, with transition mode + animate on appear:
113
+
کامپوننت پویا، با mode ترنزیشن + انیمیشن در حالت ظاهرشدن:
@@ -150,19 +150,19 @@ Provides transition effects for **multiple** elements or components in a list.
150
150
}
151
151
```
152
152
153
-
-**Events**
153
+
-**رویدادها**
154
154
155
-
`<TransitionGroup>`emits the same events as `<Transition>`.
155
+
`<TransitionGroup>`رویدادهایی همانند `<Transition>` منتشر میکند.
156
156
157
-
-**Details**
157
+
-**جزییات**
158
158
159
-
By default, `<TransitionGroup>`doesn't render a wrapper DOM element, but one can be defined via the `tag`prop.
159
+
به طور پیشفرض، `<TransitionGroup>`یک المنت پوشاننده دام را رندر نمیکند، اما آن میتواند با پراپ `tag`تعریف شود.
160
160
161
-
Note that every child in a `<transition-group>`must be [**uniquely keyed**](/guide/essentials/list#maintaining-state-with-key)for the animations to work properly.
161
+
توجه کنید که هر فرزند داخل یک `<transition-group>`باید [**uniquely keyed**](/guide/essentials/list#maintaining-state-with-key)(منحصرا کلید گذاری شده) باشد تا انیمیشنها به طور مناسب کار کنند.
162
162
163
-
`<TransitionGroup>`supports moving transitions via CSS transform. When a child's position on screen has changed after an update, it will get applied a moving CSS class (auto generated from the `name`attribute or configured with the`move-class`prop). If the CSS `transform`property is "transition-able" when the moving class is applied, the element will be smoothly animated to its destination using the [FLIP technique](https://aerotwist.com/blog/flip-your-animations/).
163
+
`<TransitionGroup>`ترنزیشنهای متحرک را به وسیله CSS transform پشتیبانی میکند. هنگامی که جایگاه یک فرزند در صفحه پس از یک بروزرسانی تغییر کردهاست، یک کلاس متحرک CSS را اعمال خواهد کرد (یا از صفت `name`تولید شده یا با پراپ`move-class`پیکربندی شده). اگر پراپرتی `transform`در CSS هنگامی که کلاس متحرک اعمال شده "transition-able" باشد، عنصر به آرامی به وسیله [FLIP technique](https://aerotwist.com/blog/flip-your-animations/) به مقصد خود متحرک خواهد شد.
164
164
165
-
-**Example**
165
+
-**مثال**
166
166
167
167
```vue-html
168
168
<TransitionGroup tag="ul" name="slide">
@@ -172,11 +172,11 @@ Provides transition effects for **multiple** elements or components in a list.
When wrapped around a dynamic component, `<KeepAlive>`caches the inactive component instances without destroying them.
206
+
هنگامی که یک کامپوننت پویا به وسیله آن پوشیده میشود،`<KeepAlive>`کامپوننت غیرفعال را بدون نابود کردن آن در حافظه پنهان ذخیره میکند.
207
207
208
-
There can only be one active component instance as the direct child of `<KeepAlive>`at any time.
208
+
همواره تنها یک نمونه کامپوننت فعال میتواند به عنوان فرزند مستقیم `<KeepAlive>`وجود داشته باشد.
209
209
210
-
When a component is toggled inside`<KeepAlive>`, its `activated`and`deactivated`lifecycle hooks will be invoked accordingly, providing an alternative to `mounted`and`unmounted`, which are not called. This applies to the direct child of `<KeepAlive>`as well as to all of its descendants.
210
+
هنگامی که یک کامپوننت در داخل`<KeepAlive>` تغییر میکند، هوکهای `activated`و`deactivated`در چرخه حیات با استناد به آن فراخوانی میشوند و جایگزینهایی برای هوکهای `mounted`و`unmounted` که فراخوانی نشدهاند، فراهم میکنند. این درمورد فرزند مستقیم `<KeepAlive>`و تمام فرزندان آن فرزند صدق میکند.
211
211
212
-
- **Example**
212
+
- **مثال**
213
213
214
-
Basic usage:
214
+
استفاده پایه:
215
215
216
216
```vue-html
217
217
<KeepAlive>
218
218
<component:is="view"></component>
219
219
</KeepAlive>
220
220
```
221
221
222
-
When used with `v-if` / `v-else`branches, there must be only one component rendered at a time:
222
+
هنگامی که با شاخههای `v-if` / `v-else`استفاده شود، باید فقط یک کامپوننت در یک زمان رندر شود:
Used for orchestrating nested async dependencies in a component tree.
314
+
برای هماهنگ کردن وابستگیهای ناهمگام تودرتو در یک درخت کامپوننت استفاده میشود.
315
315
316
316
-**Props**
317
317
@@ -321,16 +321,16 @@ Used for orchestrating nested async dependencies in a component tree.
321
321
}
322
322
```
323
323
324
-
-**Events**
324
+
-**رویدادها**
325
325
326
326
-`@resolve`
327
327
-`@pending`
328
328
-`@fallback`
329
329
330
-
-**Details**
330
+
-**جزییات**
331
331
332
-
`<Suspense>`accepts two slots: the`#default`slot and the `#fallback` slot. It will display the content of the fallback slot while rendering the default slot in memory.
332
+
`<Suspense>`دو slot را میپذیرد: اسلات`#default`و اسلات `#fallback`. محتوای اسلات fallback را در هنگام رندر کردن اسلات default موجود در حافظه نمایش میدهد.
333
333
334
-
If it encounters async dependencies ([Async Components](/guide/components/async)and components with[`async setup()`](/guide/built-ins/suspense#async-setup)) while rendering the default slot, it will wait until all of them are resolved before displaying the default slot.
334
+
اگر با وابستگیهای ناهمگام مواجه شود ([کامپوننتهای ناهمگام](/guide/components/async)و کامپوننتهای با[`()async setup`](/guide/built-ins/suspense#async-setup)) در هنگام رندر اسلات default، منتظر خواهد ماند تا پیش از نمایش اسلات default، همگی آنها resolve شوند.
0 commit comments