From 7add2e70c24c6b690879b500106f8f5b885c8172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=85=D8=AD=D9=85=D8=AF=20=D8=B4=D8=B1=D9=81=DB=8C?= <80104926+MMDShen@users.noreply.github.com> Date: Sun, 24 Dec 2023 21:59:11 +0330 Subject: [PATCH 01/23] Update built-in-special-attributes.md to fa version --- src/api/built-in-special-attributes.md | 78 +++++++++++++------------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/src/api/built-in-special-attributes.md b/src/api/built-in-special-attributes.md index 3dfb7523..a3afe85d 100644 --- a/src/api/built-in-special-attributes.md +++ b/src/api/built-in-special-attributes.md @@ -1,18 +1,18 @@ -# Built-in Special Attributes {#built-in-special-attributes} +# ویژگیهای خاص ساخته شده {#built-in-special-attributes} -## key {#key} +## کلید {#key} -The `key` special attribute is primarily used as a hint for Vue's virtual DOM algorithm to identify vnodes when diffing the new list of nodes against the old list. +ویژگی خاص `key` به عنوان یک راهنما برای الگوریتم DOM مجازی Vue استفاده میشود تا هنگام تفاوتیابی لیست جدید گرهها با لیست قدیمی، vnodes را شناسایی کند. -- **Expects:** `number | string | symbol` +- **انتظارات:** `number | string | symbol` -- **Details** +- **جزئیات** - Without keys, Vue uses an algorithm that minimizes element movement and tries to patch/reuse elements of the same type in-place as much as possible. With keys, it will reorder elements based on the order change of keys, and elements with keys that are no longer present will always be removed / destroyed. +بدون Vue ، Key از یک الگوریتم استفاده میکند که حرکت عناصر را به حداقل میرساند و سعی میکند عناصر هم نوع را در جای خود ترمیم/باز استفاده کند تا حد امکان. با key، این عناصر را بر اساس تغییر ترتیب keyها مرتب میکند و عناصری که دارای `key`هایی هستند که دیگر وجود ندارند، همیشه حذف / نابود میشوند. - Children of the same common parent must have **unique keys**. Duplicate keys will cause render errors. +فرزندان یک والد مشترک باید دارای key های منحصر به فرد باشند. key های تکراری باعث خطاهای رندر میشوند. - The most common use case is combined with `v-for`: +مورد استفاده رایجترین این ویژگی، همراه با `v-for` است: ```vue-html
hello
``` - In Composition API, the reference will be stored in a ref with matching name: + در Composition API, مرجع در یک مرجع با نام منطبق ذخیره می شود: ```vue