ui.data.ActiveDictionary
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
یک ظرف دیکشنری مانند برای داده برای استفاده در اجزای رابط کاربری.
هنگامی که ویژگی یک ui.data.ActiveDictionary (به عنوان مثال myButton.style()) به روز می شود، مؤلفه ای که به آن تعلق دارد به طور خودکار به روز می شود. برای مثال، myButton.style().set('color', 'red') رنگ متن دکمه را به قرمز تغییر می دهد.
استفاده | برمی گرداند | ui.data.ActiveDictionary( object , allowedProperties ) | ui.data.ActiveDictionary |
استدلال | تایپ کنید | جزئیات | object | شیء، اختیاری | یک شی جاوا اسکریپت با ویژگی ها و مقادیر برای مقداردهی اولیه این شی. |
allowedProperties | List<String>، اختیاری است | آرایه ای از ویژگی های مجاز برای این شی. اگر تعریف نشده باشد، هر گونه خاصیت مجاز است. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eui.data.ActiveDictionary is a container for storing data used by UI components, similar to a dictionary.\u003c/p\u003e\n"],["\u003cp\u003eChanges to an ActiveDictionary's properties automatically update the associated UI component, ensuring data and UI stay in sync.\u003c/p\u003e\n"],["\u003cp\u003eYou can create an ActiveDictionary using \u003ccode\u003eui.data.ActiveDictionary(object, allowedProperties)\u003c/code\u003e and optionally provide initial data and allowed properties.\u003c/p\u003e\n"]]],[],null,["# ui.data.ActiveDictionary\n\n\u003cbr /\u003e\n\nA dictionary-like container for data for use in UI components.\n\n\u003cbr /\u003e\n\nWhen a property of a ui.data.ActiveDictionary (e.g. myButton.style()) is updated, the component it belongs to is automatically updated. For example, myButton.style().set('color', 'red') would change the color of button's text to red.\n\n| Usage | Returns |\n|----------------------------------------------------------------|--------------------------|\n| `ui.data.ActiveDictionary(`*object* `, `*allowedProperties*`)` | ui.data.ActiveDictionary |\n\n| Argument | Type | Details |\n|---------------------|--------------------------|---------------------------------------------------------------------------------------------|\n| `object` | Object, optional | A JavaScript object with properties and values to initialize this object with. |\n| `allowedProperties` | List\\\u003cString\\\u003e, optional | An array of allowed properties for this object. If undefined, then any property is allowed. |"]]