瀏覽代碼

fixed/improved documentation of ui.dialog

Rodja Trappe 2 年之前
父節點
當前提交
9d34d21cf6
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      nicegui/elements/dialog.py

+ 4 - 4
nicegui/elements/dialog.py

@@ -9,11 +9,11 @@ class Dialog(ValueElement):
     def __init__(self, *, value: bool = False) -> None:
         """Dialog
 
-        Creates a dialog.
-        By default it is non-modal.
-        To make it modal, set `.props('persistent')` on the dialog element.
+        Creates a modal dialog.
+        By default it is dismissible by clicking or pressing ESC.
+        To make it persistent, set `.props('persistent')` on the dialog element.
 
-        :param value: whether the dialog is already opened (default: `False`)
+        :param value: whether the dialog should be opened on creation (default: `False`)
         """
         super().__init__(tag='q-dialog', value=value, on_value_change=None)
         self._result: Any = None