Skip to content

Commit a1cae07

Browse files
Update built-in-components.md (#176)
Translation of api/built-in-components
1 parent 179eac4 commit a1cae07

File tree

1 file changed

+48
-48
lines changed

1 file changed

+48
-48
lines changed

src/api/built-in-components.md

+48-48
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: api
33
---
44

5-
# Built-in Components {#built-in-components}
5+
# کامپوننت‌های نهادینه‌شده {#built-in-components}
66

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 (اصطلاحی است که که برای کدهای غیرقابل استفاده یا کدهای مرده استفاده می‌گردد) هستند یعنی تنها در ساخت و در هنگامی که استفاده می‌شوند، شامل می‌شوند.
99

10-
When using them in [render functions](/guide/extras/render-function), they need to be imported explicitly. For example:
10+
هنگام استفاده آنها در [توابع رندر](/guide/extras/render-function)، آنها باید به صراحت ایمپورت شوند. برای نمونه:
1111

1212
```js
1313
import { h, Transition } from 'vue'
@@ -21,7 +21,7 @@ h(Transition, {
2121

2222
## `<Transition>` {#transition}
2323

24-
Provides animated transition effects to a **single** element or component.
24+
جلوه های ترنزیشن متحرک را به یک عنصر یا کامپوننت ارائه می دهد.
2525

2626
- **Props**
2727

@@ -78,7 +78,7 @@ Provides animated transition effects to a **single** element or component.
7878
}
7979
```
8080

81-
- **Events**
81+
- **رویدادها**
8282

8383
- `@before-enter`
8484
- `@before-leave`
@@ -92,49 +92,49 @@ Provides animated transition effects to a **single** element or component.
9292
- `@leave-cancelled` (`v-show` only)
9393
- `@appear-cancelled`
9494

95-
- **Example**
95+
- **مثال**
9696

97-
Simple element:
97+
عنصر ساده:
9898

9999
```vue-html
100100
<Transition>
101101
<div v-if="ok">toggled content</div>
102102
</Transition>
103103
```
104104

105-
Forcing a transition by changing the `key` attribute:
105+
اعمال یک ترنزیشن به وسیله صفت `key`:
106106

107107
```vue-html
108108
<Transition>
109109
<div :key="text">{{ text }}</div>
110110
</Transition>
111111
```
112112

113-
Dynamic component, with transition mode + animate on appear:
113+
کامپوننت پویا، با mode ترنزیشن + انیمیشن در حالت ظاهرشدن:
114114

115115
```vue-html
116116
<Transition name="fade" mode="out-in" appear>
117117
<component :is="view"></component>
118118
</Transition>
119119
```
120120

121-
Listening to transition events:
121+
گوش‌دادن به رویدادهای ترنزیشن:
122122

123123
```vue-html
124124
<Transition @after-enter="onTransitionComplete">
125125
<div v-show="ok">toggled content</div>
126126
</Transition>
127127
```
128128

129-
- **See also** [Guide - Transition](/guide/built-ins/transition)
129+
- **همچنین ببینید** [راهنما - ترنزیشن](/guide/built-ins/transition)
130130

131131
## `<TransitionGroup>` {#transitiongroup}
132132

133-
Provides transition effects for **multiple** elements or components in a list.
133+
جلوه های ترنزیشن را برای **چندین** عنصر یا کامپوننت در یک لیست ارائه می دهد.
134134

135135
- **Props**
136136

137-
`<TransitionGroup>` accepts the same props as `<Transition>` except `mode`, plus two additional props:
137+
`<TransitionGroup>` پراپ‌های یکسانی همانند `<Transition>` دریافت می‌کند، بجز `mode` و دو پراپ اضافی دیگر:
138138

139139
```ts
140140
interface TransitionGroupProps extends Omit<TransitionProps, 'mode'> {
@@ -150,19 +150,19 @@ Provides transition effects for **multiple** elements or components in a list.
150150
}
151151
```
152152

153-
- **Events**
153+
- **رویدادها**
154154

155-
`<TransitionGroup>` emits the same events as `<Transition>`.
155+
`<TransitionGroup>` رویدادهایی همانند `<Transition>` منتشر می‌کند.
156156

157-
- **Details**
157+
- **جزییات**
158158

159-
By default, `<TransitionGroup>` doesn't render a wrapper DOM element, but one can be defined via the `tag` prop.
159+
به طور پیش‌فرض، `<TransitionGroup>` یک المنت پوشاننده دام را رندر نمی‌کند، اما آن می‌تواند با پراپ `tag` تعریف شود.
160160

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) (منحصرا کلید گذاری شده) باشد تا انیمیشن‌ها به طور مناسب کار کنند.
162162

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/) به مقصد خود متحرک خواهد شد.
164164

165-
- **Example**
165+
- **مثال**
166166

167167
```vue-html
168168
<TransitionGroup tag="ul" name="slide">
@@ -172,11 +172,11 @@ Provides transition effects for **multiple** elements or components in a list.
172172
</TransitionGroup>
173173
```
174174

175-
- **See also** [Guide - TransitionGroup](/guide/built-ins/transition-group)
175+
- **همچنین ببینید** [راهنما - ترنزیشن گروهی](/guide/built-ins/transition-group)
176176

177177
## `<KeepAlive>` {#keepalive}
178178

179-
Caches dynamically toggled components wrapped inside.
179+
حافظه پنهان اجزای پوشیده شده در داخل را به صورت پویا تغییر داده است.
180180

181181
- **Props**
182182

@@ -201,25 +201,25 @@ Caches dynamically toggled components wrapped inside.
201201
type MatchPattern = string | RegExp | (string | RegExp)[]
202202
```
203203
204-
- **Details**
204+
- **جزییات**
205205
206-
When wrapped around a dynamic component, `<KeepAlive>` caches the inactive component instances without destroying them.
206+
هنگامی که یک کامپوننت پویا به وسیله آن پوشیده می‌شود،`<KeepAlive>` کامپوننت غیرفعال را بدون نابود کردن آن در حافظه پنهان ذخیره می‌کند.
207207
208-
There can only be one active component instance as the direct child of `<KeepAlive>` at any time.
208+
همواره تنها یک نمونه کامپوننت فعال می‌تواند به عنوان فرزند مستقیم `<KeepAlive>` وجود داشته باشد.
209209
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>` و تمام فرزندان آن فرزند صدق می‌کند.
211211
212-
- **Example**
212+
- **مثال**
213213
214-
Basic usage:
214+
استفاده پایه:
215215
216216
```vue-html
217217
<KeepAlive>
218218
<component :is="view"></component>
219219
</KeepAlive>
220220
```
221221
222-
When used with `v-if` / `v-else` branches, there must be only one component rendered at a time:
222+
هنگامی که با شاخه‌های `v-if` / `v-else` استفاده شود، باید فقط یک کامپوننت در یک زمان رندر شود:
223223
224224
```vue-html
225225
<KeepAlive>
@@ -228,7 +228,7 @@ Caches dynamically toggled components wrapped inside.
228228
</KeepAlive>
229229
```
230230
231-
Used together with `<Transition>`:
231+
به همراه `<Transition>` استفاده شود:
232232
233233
```vue-html
234234
<Transition>
@@ -238,38 +238,38 @@ Caches dynamically toggled components wrapped inside.
238238
</Transition>
239239
```
240240
241-
Using `include` / `exclude`:
241+
با `include` / `exclude` استفاده شود:
242242
243243
```vue-html
244-
<!-- comma-delimited string -->
244+
<!-- رشته محدود شده با کاما -->
245245
<KeepAlive include="a,b">
246246
<component :is="view"></component>
247247
</KeepAlive>
248248

249-
<!-- regex (use `v-bind`) -->
249+
<!-- ریجکس (استفاده با `v-bind`) -->
250250
<KeepAlive :include="/a|b/">
251251
<component :is="view"></component>
252252
</KeepAlive>
253253

254-
<!-- Array (use `v-bind`) -->
254+
<!-- آرایه (استفاده با `v-bind`) -->
255255
<KeepAlive :include="['a', 'b']">
256256
<component :is="view"></component>
257257
</KeepAlive>
258258
```
259259

260-
Usage with `max`:
260+
در استفاده با `max`:
261261

262262
```vue-html
263263
<KeepAlive :max="10">
264264
<component :is="view"></component>
265265
</KeepAlive>
266266
```
267267

268-
- **See also** [Guide - KeepAlive](/guide/built-ins/keep-alive)
268+
- **همچنین ببینید** [راهنما - زنده نگه داشتن کامپوننت](/guide/built-ins/keep-alive)
269269

270270
## `<Teleport>` {#teleport}
271271

272-
Renders its slot content to another part of the DOM.
272+
محتوای slot خود را به بخش دیگری از DOM رندر می‌کند.
273273

274274
- **Props**
275275

@@ -289,29 +289,29 @@ Renders its slot content to another part of the DOM.
289289
}
290290
```
291291

292-
- **Example**
292+
- **مثال**
293293

294-
Specifying target container:
294+
مشخص کردن نگهدارنده هدف:
295295

296296
```vue-html
297297
<Teleport to="#some-id" />
298298
<Teleport to=".some-class" />
299299
<Teleport to="[data-teleport]" />
300300
```
301301

302-
Conditionally disabling:
302+
غیرفعال کردن شرطی:
303303

304304
```vue-html
305305
<Teleport to="#popup" :disabled="displayVideoInline">
306306
<video src="./my-movie.mp4">
307307
</Teleport>
308308
```
309309

310-
- **See also** [Guide - Teleport](/guide/built-ins/teleport)
310+
- **همچنین ببینید** [راهنما - تلپورت](/guide/built-ins/teleport)
311311

312312
## `<Suspense>` <sup class="vt-badge experimental" /> {#suspense}
313313

314-
Used for orchestrating nested async dependencies in a component tree.
314+
برای هماهنگ کردن وابستگی‌های ناهمگام تودرتو در یک درخت کامپوننت استفاده می‌شود.
315315

316316
- **Props**
317317

@@ -321,16 +321,16 @@ Used for orchestrating nested async dependencies in a component tree.
321321
}
322322
```
323323

324-
- **Events**
324+
- **رویدادها**
325325

326326
- `@resolve`
327327
- `@pending`
328328
- `@fallback`
329329

330-
- **Details**
330+
- **جزییات**
331331

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 موجود در حافظه نمایش می‌دهد.
333333

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 شوند.
335335

336-
- **See also** [Guide - Suspense](/guide/built-ins/suspense)
336+
- **همچنین ببینید** [راهنما - تعلیق](/guide/built-ins/suspense)

0 commit comments

Comments
 (0)