{"meta":"<h2 id=\"Guide\">Guide <a class=\"header-anchor scroll-count-item\" href=\"#Guide\" data-scroll-id=\"Guide\">#</a></h2>\n<h2 id=\"When To Use\">When To Use <a class=\"header-anchor scroll-count-item\" href=\"#When To Use\" data-scroll-id=\"When To Use\">#</a></h2>\n<p>The dialog is used to provide the user with an auxiliary window for quickly performing a simple operation, confirming user information, or providing a feedback prompt without leaving the main path.</p>\n<h3 id=\"V 2 Update\"><code>v2</code> update <a class=\"header-anchor scroll-count-item\" href=\"#V 2 Update\" data-scroll-id=\"V 2 Update\">#</a></h3>\n<p>version 1.25 add api <code>v2</code> to support open new version Dialog, feature as list:</p>\n<p>feature&#xFF1A;</p>\n<ul>\n<li>use css (not js) to compute position, will easier</li>\n<li>add <code>closeIcon</code> to controll icon display</li>\n<li>add <code>width</code> to fix width of dialog, or you can set <code>width=auto</code> to follow content width</li>\n<li>add <code>dialogRender</code> use with <code>react-draggable</code> support draggable</li>\n</ul>\n<p>changes&#xFF1A;</p>\n<ul>\n<li>deprecated <code>align</code> <code>shouldUpdatePosition</code>, Dialog will update position autoly</li>\n<li>deprecated <code>minMargin</code> , use <code>top</code> <code>bottom</code> insteaded</li>\n<li>deprecated <code>isFullScreen</code> , use <code>overflowScroll</code> insteaded</li>\n</ul>\n","api":"<h2 id=\"API\">API <a class=\"header-anchor scroll-count-item\" href=\"#API\" data-scroll-id=\"API\">#</a></h2>\n<h3 id=\"Dialog\">Dialog <a class=\"header-anchor scroll-count-item\" href=\"#Dialog\" data-scroll-id=\"Dialog\">#</a></h3>\n<table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n<th>Type</th>\n<th>Default Value</th>\n<th>Required</th>\n<th>Supported Version</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>visible</td>\n<td>Whether to show</td>\n<td>boolean</td>\n<td>false</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>title</td>\n<td>Title</td>\n<td>React.ReactNode</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>children</td>\n<td>Content</td>\n<td>React.ReactNode</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>footer</td>\n<td>Footer content, set to false to hide</td>\n<td>boolean | React.ReactNode</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>footerAlign</td>\n<td>Footer button alignment</td>\n<td>&apos;left&apos; | &apos;center&apos; | &apos;right&apos;</td>\n<td>&apos;right&apos;</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>footerActions</td>\n<td>Specify whether to exist and how to arrange the confirm and cancel buttons</td>\n<td>Array&lt;&apos;ok&apos; | &apos;cancel&apos;&gt;</td>\n<td>[&apos;ok&apos;, &apos;cancel&apos;]</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>cache</td>\n<td>Whether to retain the child node when hiding</td>\n<td>boolean</td>\n<td>false</td>\n<td></td>\n<td>1.23</td>\n</tr>\n<tr>\n<td>onOk</td>\n<td>Callback function when the confirm button is clicked</td>\n<td>(event: React.MouseEvent) =&gt; void</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>onCancel</td>\n<td>Callback function when the cancel button is clicked</td>\n<td>(event: React.MouseEvent) =&gt; void</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>okProps</td>\n<td>Properties for the confirm button</td>\n<td>ButtonProps</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>cancelProps</td>\n<td>Properties for the cancel button</td>\n<td>ButtonProps</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>closeable</td>\n<td>[Deprecated] Control the way the dialog is closed</td>\n<td>&apos;close&apos; | &apos;mask&apos; | &apos;esc&apos; | boolean | &apos;close,mask&apos; | &apos;close,esc&apos; | &apos;mask,esc&apos;</td>\n<td>&apos;esc,close&apos;</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>closeMode</td>\n<td>Control the way the dialog is closed</td>\n<td>CloseMode[] | CloseMode</td>\n<td>-</td>\n<td></td>\n<td>1.21</td>\n</tr>\n<tr>\n<td>onClose</td>\n<td>Callback function when the dialog is closed</td>\n<td>(trigger: string, event: React.MouseEvent | KeyboardEvent) =&gt; void</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>afterClose</td>\n<td>Callback function after the dialog is closed, if there is an animation, it will be triggered after the animation ends</td>\n<td>() =&gt; void</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>hasMask</td>\n<td>Whether to show the mask</td>\n<td>boolean</td>\n<td>true</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>animation</td>\n<td>Animation playback method when showing and hiding</td>\n<td>Record&lt;&apos;in&apos; | &apos;out&apos;, string&gt; | false</td>\n<td>{ in: &apos;fadeInUp&apos;, out: &apos;fadeOutUp&apos; }</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>autoFocus</td>\n<td>Whether to automatically obtain focus when the dialog is displayed</td>\n<td>boolean</td>\n<td>false</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>align</td>\n<td>[v2 Deprecated] Dialog alignment, see Overlay documentation</td>\n<td>string | boolean</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>isFullScreen</td>\n<td>[v2 Deprecated] Whether to display all content instead of appearing a scroll bar to ensure that the dialog is displayed completely in the browser viewport, and this attribute only takes effect when the dialog is vertically and horizontally centered, that is, when align is set to &apos;cc cc&apos;</td>\n<td>boolean</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>shouldUpdatePosition</td>\n<td>[v2 Deprecated] Whether to update the dialog position immediately when the dialog is re</td>\n<td>boolean</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>minMargin</td>\n<td>[v2 Deprecated] The minimum spacing between the dialog and the top and bottom of the browser, and the isFullScreen property is set to true and the align property is set to &apos;cc cc&apos; is not effective</td>\n<td>number</td>\n<td>40</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>overlayProps</td>\n<td>Properties for the overlay component</td>\n<td>OverlayProps</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>locale</td>\n<td>Customized internationalized text</td>\n<td>Partial&lt;{<br> ok: string;<br> cancel: string;<br> }&gt;</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>height</td>\n<td>Dialog height style</td>\n<td>string | number</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>width</td>\n<td>Dialog width</td>\n<td>string | number</td>\n<td>-</td>\n<td></td>\n<td>1.25</td>\n</tr>\n<tr>\n<td>popupContainer</td>\n<td>Custom mount position</td>\n<td>string | HTMLElement | ((target?: HTMLElement) =&gt; HTMLElement)</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>v2</td>\n<td>Enable v2 version</td>\n<td>false | undefined</td>\n<td>false</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>noPadding</td>\n<td>Remove body spacing</td>\n<td>boolean</td>\n<td>false</td>\n<td></td>\n<td>1.26</td>\n</tr>\n<tr>\n<td>closeIcon</td>\n<td>Customize the close button icon</td>\n<td>React.ReactNode</td>\n<td>-</td>\n<td></td>\n<td>1.25</td>\n</tr>\n</tbody>\n</table>\n<h3 id=\"Dialog V 2\">Dialog V2 <a class=\"header-anchor scroll-count-item\" href=\"#Dialog V 2\" data-scroll-id=\"Dialog V 2\">#</a></h3>\n<table>\n<thead>\n<tr>\n<th>Param</th>\n<th>Description</th>\n<th>Type</th>\n<th>Default Value</th>\n<th>Required</th>\n<th>Supported Version</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>visible</td>\n<td>Whether to show</td>\n<td>boolean</td>\n<td>false</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>title</td>\n<td>Title</td>\n<td>React.ReactNode</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>children</td>\n<td>Content</td>\n<td>React.ReactNode</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>footer</td>\n<td>Footer content, set to false to hide</td>\n<td>boolean | React.ReactNode</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>footerAlign</td>\n<td>Footer button alignment</td>\n<td>&apos;left&apos; | &apos;center&apos; | &apos;right&apos;</td>\n<td>&apos;right&apos;</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>footerActions</td>\n<td>Specify whether to exist and how to arrange the confirm and cancel buttons</td>\n<td>Array&lt;&apos;ok&apos; | &apos;cancel&apos;&gt;</td>\n<td>[&apos;ok&apos;, &apos;cancel&apos;]</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>cache</td>\n<td>Whether to retain the child node when hiding</td>\n<td>boolean</td>\n<td>false</td>\n<td></td>\n<td>1.23</td>\n</tr>\n<tr>\n<td>onOk</td>\n<td>Callback function when the confirm button is clicked</td>\n<td>(event: React.MouseEvent) =&gt; void</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>onCancel</td>\n<td>Callback function when the cancel button is clicked</td>\n<td>(event: React.MouseEvent) =&gt; void</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>okProps</td>\n<td>Properties for the confirm button</td>\n<td>ButtonProps</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>cancelProps</td>\n<td>Properties for the cancel button</td>\n<td>ButtonProps</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>closeMode</td>\n<td>Control the way the dialog is closed</td>\n<td>CloseMode[] | CloseMode</td>\n<td>-</td>\n<td></td>\n<td>1.21</td>\n</tr>\n<tr>\n<td>onClose</td>\n<td>Callback function when the dialog is closed</td>\n<td>(trigger: string, event: React.MouseEvent | KeyboardEvent) =&gt; void</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>afterClose</td>\n<td>Callback function after the dialog is closed, if there is an animation, it will be triggered after the animation ends</td>\n<td>() =&gt; void</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>hasMask</td>\n<td>Whether to show the mask</td>\n<td>boolean</td>\n<td>true</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>animation</td>\n<td>Animation playback method when showing and hiding</td>\n<td>Record&lt;&apos;in&apos; | &apos;out&apos;, string&gt; | false</td>\n<td>{ in: &apos;fadeInUp&apos;, out: &apos;fadeOutUp&apos; }</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>autoFocus</td>\n<td>Whether to automatically obtain focus when the dialog is displayed</td>\n<td>boolean</td>\n<td>false</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>isFullScreen</td>\n<td>[v2 Deprecated] Whether to display all content instead of appearing a scroll bar to ensure that the dialog is displayed completely in the browser viewport, and this attribute only takes effect when the dialog is vertically and horizontally centered, that is, when align is set to &apos;cc cc&apos;</td>\n<td>boolean</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>minMargin</td>\n<td>[v2 Deprecated] The minimum spacing between the dialog and the top and bottom of the browser, and the isFullScreen property is set to true and the align property is set to &apos;cc cc&apos; is not effective</td>\n<td>number</td>\n<td>40</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>overlayProps</td>\n<td>Properties for the overlay component</td>\n<td>OverlayProps</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>locale</td>\n<td>Customized internationalized text</td>\n<td>Partial&lt;{<br> ok: string;<br> cancel: string;<br> }&gt;</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>height</td>\n<td>Dialog height style</td>\n<td>string | number</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>popupContainer</td>\n<td>Custom mount position</td>\n<td>string | HTMLElement | ((target?: HTMLElement) =&gt; HTMLElement)</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>v2</td>\n<td>Enable v2 version</td>\n<td>true</td>\n<td>false</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>closeIcon</td>\n<td>Customize the close button icon</td>\n<td>React.ReactNode</td>\n<td>-</td>\n<td></td>\n<td>1.25</td>\n</tr>\n<tr>\n<td>width</td>\n<td>Dialog width</td>\n<td>string | number</td>\n<td>-</td>\n<td></td>\n<td>1.25</td>\n</tr>\n<tr>\n<td>noPadding</td>\n<td>Remove body spacing</td>\n<td>boolean</td>\n<td>false</td>\n<td></td>\n<td>1.26</td>\n</tr>\n<tr>\n<td>top</td>\n<td>[v2] Dialog top margin, default 100, when centered=true, default 40</td>\n<td>number</td>\n<td>-</td>\n<td></td>\n<td>1.25</td>\n</tr>\n<tr>\n<td>bottom</td>\n<td>[v2] Dialog bottom margin</td>\n<td>number</td>\n<td>40</td>\n<td></td>\n<td>1.25</td>\n</tr>\n<tr>\n<td>overflowScroll</td>\n<td>[v2] Whether to display a scroll bar when the dialog height exceeds the browser viewport height</td>\n<td>boolean</td>\n<td>-</td>\n<td></td>\n<td>1.25</td>\n</tr>\n<tr>\n<td>centered</td>\n<td>[v2] Dialog center alignment</td>\n<td>boolean</td>\n<td>-</td>\n<td></td>\n<td>1.25</td>\n</tr>\n<tr>\n<td>dialogRender</td>\n<td>[v2] Custom rendering the dialog</td>\n<td>(modal: React.ReactNode) =&gt; React.ReactNode</td>\n<td>-</td>\n<td></td>\n<td>-</td>\n</tr>\n<tr>\n<td>wrapperClassName</td>\n<td>[v2] The className of the outer wrapper</td>\n<td>string</td>\n<td>-</td>\n<td></td>\n<td>1.26</td>\n</tr>\n<tr>\n<td>wrapperStyle</td>\n<td>[v2] The style of the outer wrapper</td>\n<td>React.CSSProperties</td>\n<td>-</td>\n<td></td>\n<td>1.26</td>\n</tr>\n</tbody>\n</table>\n<!-- api-extra-start -->\n<h3 id=\"Dialog Alert Config Dialog Confirm Config\">Dialog.alert(config)/Dialog.confirm(config) <a class=\"header-anchor scroll-count-item\" href=\"#Dialog Alert Config Dialog Confirm Config\" data-scroll-id=\"Dialog Alert Config Dialog Confirm Config\">#</a></h3>\n<p>The following only list common properties that config can pass, and other properties of the Dialog can also be passed in.</p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:left\">Param</th>\n<th style=\"text-align:left\">Descripiton</th>\n<th style=\"text-align:left\">Type</th>\n<th style=\"text-align:left\">Default Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\">title</td>\n<td style=\"text-align:left\">title of dialog</td>\n<td style=\"text-align:left\">ReactNode</td>\n<td style=\"text-align:left\">&apos;&apos;</td>\n</tr>\n<tr>\n<td style=\"text-align:left\">content</td>\n<td style=\"text-align:left\">content of dialog</td>\n<td style=\"text-align:left\">ReactNode</td>\n<td style=\"text-align:left\">&apos;&apos;</td>\n</tr>\n<tr>\n<td style=\"text-align:left\">onOk</td>\n<td style=\"text-align:left\">callback function triggered when the ok button is clicked</td>\n<td style=\"text-align:left\">Function</td>\n<td style=\"text-align:left\">() =&gt; {}</td>\n</tr>\n<tr>\n<td style=\"text-align:left\">onCancel</td>\n<td style=\"text-align:left\">callback function triggered when the cancel button is clicked</td>\n<td style=\"text-align:left\">Function</td>\n<td style=\"text-align:left\">() =&gt; {}</td>\n</tr>\n<tr>\n<td style=\"text-align:left\">messageProps</td>\n<td style=\"text-align:left\">properties of Message</td>\n<td style=\"text-align:left\">Object</td>\n<td style=\"text-align:left\">{}</td>\n</tr>\n</tbody>\n</table>\n<h3 id=\"Dialog Show\">Dialog.show <a class=\"header-anchor scroll-count-item\" href=\"#Dialog Show\" data-scroll-id=\"Dialog Show\">#</a></h3>\n<p>The following only list common properties that config can pass, and other properties of the Dialog can also be passed in.</p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:left\">Param</th>\n<th style=\"text-align:left\">Descripiton</th>\n<th style=\"text-align:left\">Type</th>\n<th style=\"text-align:left\">Default Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\">title</td>\n<td style=\"text-align:left\">title of dialog</td>\n<td style=\"text-align:left\">ReactNode</td>\n<td style=\"text-align:left\">&apos;&apos;</td>\n</tr>\n<tr>\n<td style=\"text-align:left\">content</td>\n<td style=\"text-align:left\">content of dialog</td>\n<td style=\"text-align:left\">ReactNode</td>\n<td style=\"text-align:left\">&apos;&apos;</td>\n</tr>\n<tr>\n<td style=\"text-align:left\">onOk</td>\n<td style=\"text-align:left\">callback function triggered when the ok button is clicked</td>\n<td style=\"text-align:left\">Function</td>\n<td style=\"text-align:left\">() =&gt; {}</td>\n</tr>\n<tr>\n<td style=\"text-align:left\">onCancel</td>\n<td style=\"text-align:left\">callback function triggered when the cancel button is clicked</td>\n<td style=\"text-align:left\">Function</td>\n<td style=\"text-align:left\">() =&gt; {}</td>\n</tr>\n</tbody>\n</table>\n<!-- api-extra-end -->\n<h2 id=\"Know Issue\">Know Issue <a class=\"header-anchor scroll-count-item\" href=\"#Know Issue\" data-scroll-id=\"Know Issue\">#</a></h2>\n<h3 id=\"Stay Centered When The Dialog Height Changes\">Stay centered when the dialog height changes <a class=\"header-anchor scroll-count-item\" href=\"#Stay Centered When The Dialog Height Changes\" data-scroll-id=\"Stay Centered When The Dialog Height Changes\">#</a></h3>\n<p>The Dialog uses JS for positioning by default. When the content is too long, JS automatically adjusts the height of the dialog so that the action button appears in the visible area. However, this may result in the inability to perceive the reuse of JS positioning when the height of the dialog changes. There are two solutions:</p>\n<ol>\n<li>\n<p>Set <code>shouldUpdatePosition</code> to true to reposition after content is updated.</p>\n</li>\n<li>\n<p>Use <code>isFullScreen</code> to enable CSS positioning. It can be adaptively centered no matter how the height of the dialog changes, but the action button cannot appear in the visible area when the content is too long.</p>\n</li>\n</ol>\n<h2 id=\"ARIA And Keyboard\">ARIA and Keyboard <a class=\"header-anchor scroll-count-item\" href=\"#ARIA And Keyboard\" data-scroll-id=\"ARIA And Keyboard\">#</a></h2>\n<table>\n<thead>\n<tr>\n<th style=\"text-align:left\">Keyboard</th>\n<th style=\"text-align:left\">Descripiton</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td style=\"text-align:left\">esc</td>\n<td style=\"text-align:left\">pressing ESC will close dialog</td>\n</tr>\n<tr>\n<td style=\"text-align:left\">tab</td>\n<td style=\"text-align:left\">focus on any element that can be focused, the focus remains in the dialog when the dialog is displayed</td>\n</tr>\n<tr>\n<td style=\"text-align:left\">shift+tab</td>\n<td style=\"text-align:left\">back focus on any element that can be focused, the focus remains in the dialog when the dialog is displayed</td>\n</tr>\n</tbody>\n</table>\n"}