|
@@ -210,66 +210,66 @@ export default {
|
|
|
:::
|
|
:::
|
|
|
## API
|
|
## API
|
|
|
### DialogOptions
|
|
### DialogOptions
|
|
|
-| Attribute | Description | Type | Default |
|
|
|
|
|
-|-----------------------|--------------------------------------------------------------------------------|--------------------------|----------------------|
|
|
|
|
|
-| title | Title | String | - |
|
|
|
|
|
-| id | Identifier, share one instance at the same time, default to multiple instances | string \| object | new Date().getTime() |
|
|
|
|
|
-| content | Content, support HTML | String | - |
|
|
|
|
|
-| teleport | Specifies a target element where Dialog will be mounted | String | "body" |
|
|
|
|
|
-| closeOnClickOverlay | Whether to close when overlay is clicked | Boolean | false |
|
|
|
|
|
-| noFooter | Hide bottom button bar | Boolean | false |
|
|
|
|
|
-| noOkBtn | Hide OK button | Boolean | false |
|
|
|
|
|
-| noCancelBtn | Hide cancel button | Boolean | false |
|
|
|
|
|
-| cancelText | Cancel button text | String | "Cancel" |
|
|
|
|
|
-| okText | OK button text | String | "Confirm" |
|
|
|
|
|
-| cancelAutoClose | Click Cancel to close the popup | Boolean | true |
|
|
|
|
|
-| textAlign | Text alignment direction, the optional value is the same as css text-align | String | "center" |
|
|
|
|
|
-| closeOnPopstate | Whether to close when popstate | Boolean | false |
|
|
|
|
|
-| customClass | Custom dialog class | String | |
|
|
|
|
|
-| overlayClass | Custom mask classname | String | - |
|
|
|
|
|
-| overlayStyle | Custom mask styles | CSSProperties | - |
|
|
|
|
|
-| popClass | Custom popup classname | String | - |
|
|
|
|
|
-| popStyle | Custom popup styles | CSSProperties | - |
|
|
|
|
|
-| onUpdate | Update | Boolean | false |
|
|
|
|
|
-| onOk | Emitted when the confirm button is clicked | Function | - |
|
|
|
|
|
-| onCancel | Emitted when the cancel button is clicked | Function | - |
|
|
|
|
|
-| onOpened | Emitted when Dialog is opened | Function | - |
|
|
|
|
|
-| onClosed | Emitted when Dialog is closed | Function | - |
|
|
|
|
|
-| beforeClose | Callback function before close support return `promise` | Function(action: string) | - |
|
|
|
|
|
|
|
+| Attribute | Description | Type | Default |
|
|
|
|
|
+|---------------------|--------------------------------------------------------------------------------|--------------------------|----------------------|
|
|
|
|
|
+| title | Title | string | - |
|
|
|
|
|
+| id | Identifier, share one instance at the same time, default to multiple instances | string \| object | new Date().getTime() |
|
|
|
|
|
+| content | Content, support HTML | string | - |
|
|
|
|
|
+| teleport | Specifies a target element where Dialog will be mounted | string | "body" |
|
|
|
|
|
+| closeOnClickOverlay | Whether to close when overlay is clicked | boolean | false |
|
|
|
|
|
+| noFooter | Hide bottom button bar | boolean | false |
|
|
|
|
|
+| noOkBtn | Hide OK button | boolean | false |
|
|
|
|
|
+| noCancelBtn | Hide cancel button | boolean | false |
|
|
|
|
|
+| cancelText | Cancel button text | string | "Cancel" |
|
|
|
|
|
+| okText | OK button text | string | "Confirm" |
|
|
|
|
|
+| cancelAutoClose | Click Cancel to close the popup | boolean | true |
|
|
|
|
|
+| textAlign | Text alignment direction, the optional value is the same as css text-align | string | "center" |
|
|
|
|
|
+| closeOnPopstate | Whether to close when popstate | boolean | false |
|
|
|
|
|
+| customClass | Custom dialog class | string | |
|
|
|
|
|
+| overlayClass | Custom mask classname | string | - |
|
|
|
|
|
+| overlayStyle | Custom mask styles | CSSProperties | - |
|
|
|
|
|
+| popClass | Custom popup classname | string | - |
|
|
|
|
|
+| popStyle | Custom popup styles | CSSProperties | - |
|
|
|
|
|
+| onUpdate | Update | boolean | false |
|
|
|
|
|
+| onOk | Emitted when the confirm button is clicked | Function | - |
|
|
|
|
|
+| onCancel | Emitted when the cancel button is clicked | Function | - |
|
|
|
|
|
+| onOpened | Emitted when Dialog is opened | Function | - |
|
|
|
|
|
+| onClosed | Emitted when Dialog is closed | Function | - |
|
|
|
|
|
+| beforeClose | Callback function before close support return `promise` | Function(action: string) | - |
|
|
|
|
|
|
|
|
|
|
|
|
|
### Props
|
|
### Props
|
|
|
|
|
|
|
|
-| Attribute | Description | Type | Default |
|
|
|
|
|
-|------------------------|-----------------------------------------------------------------------------------------------------------|--------------------------|------------|
|
|
|
|
|
-| title | Title | String | - |
|
|
|
|
|
-| content | Content, support HTML | String | - |
|
|
|
|
|
-| teleport | Specifies a target element where Dialog will be mounted | String | "body" |
|
|
|
|
|
-| close-on-click-overlay | Whether to close when overlay is clicked | Boolean | false |
|
|
|
|
|
-| no-footer | Hide bottom button bar | Boolean | false |
|
|
|
|
|
-| no-ok-btn | Hide OK button | Boolean | false |
|
|
|
|
|
-| no-cancel-btn | Hide cancel button | Boolean | false |
|
|
|
|
|
-| cancel-text | Cancel button text | String | "Cancel" |
|
|
|
|
|
-| ok-text | OK button text | String | "Confirm" |
|
|
|
|
|
-| cancel-auto-close | Click Cancel to close the popup | Boolean | true |
|
|
|
|
|
-| text-align | Text alignment direction, the optional value is the same as css text-align | String | "center" |
|
|
|
|
|
-| close-on-popstate | Whether to close when popstate | Boolean | false |
|
|
|
|
|
-| lock-scroll | Whether to lock background scroll | Boolean | false |
|
|
|
|
|
-| footer-direction | The bottom button uses the horizontal and vertical directions. Optional values are horizontal and vertical. | string | horizontal |
|
|
|
|
|
-| overlay-class | Custom mask classname | String | - |
|
|
|
|
|
-| overlay-style | Custom mask styles | CSSProperties | - |
|
|
|
|
|
-| pop-class | Custom popup classname | String | - |
|
|
|
|
|
-| pop-style | Custom popup styles | CSSProperties | - |
|
|
|
|
|
-| custom-class | Custom dialog class | String | - |
|
|
|
|
|
-| before-close | Callback function before close support return `promise` | Function(action: string) | - |
|
|
|
|
|
|
|
+| Attribute | Description | Type | Default |
|
|
|
|
|
+|------------------------|----------------------------------------------------------------------------|--------------------------|------------|
|
|
|
|
|
+| title | Title | string | - |
|
|
|
|
|
+| content | Content, support HTML | string | - |
|
|
|
|
|
+| teleport | Specifies a target element where Dialog will be mounted | string | "body" |
|
|
|
|
|
+| close-on-click-overlay | Whether to close when overlay is clicked | boolean | false |
|
|
|
|
|
+| no-footer | Hide bottom button bar | boolean | false |
|
|
|
|
|
+| no-ok-btn | Hide OK button | boolean | false |
|
|
|
|
|
+| no-cancel-btn | Hide cancel button | boolean | false |
|
|
|
|
|
+| cancel-text | Cancel button text | string | "Cancel" |
|
|
|
|
|
+| ok-text | OK button text | string | "Confirm" |
|
|
|
|
|
+| cancel-auto-close | Click Cancel to close the popup | boolean | true |
|
|
|
|
|
+| text-align | Text alignment direction, the optional value is the same as css text-align | string | "center" |
|
|
|
|
|
+| close-on-popstate | Whether to close when popstate | boolean | false |
|
|
|
|
|
+| lock-scroll | Whether to lock background scroll | boolean | false |
|
|
|
|
|
+| footer-direction | Use `horizontal` and `vertical` optional values | string | horizontal |
|
|
|
|
|
+| overlay-class | Custom mask classname | string | - |
|
|
|
|
|
+| overlay-style | Custom mask styles | CSSProperties | - |
|
|
|
|
|
+| pop-class | Custom popup classname | string | - |
|
|
|
|
|
+| pop-style | Custom popup styles | CSSProperties | - |
|
|
|
|
|
+| custom-class | Custom dialog class | string | - |
|
|
|
|
|
+| before-close | Callback function before close support return `promise` | Function(action: string) | - |
|
|
|
|
|
|
|
|
### Events
|
|
### Events
|
|
|
|
|
|
|
|
-| Event | Description | Type | Default |
|
|
|
|
|
-|-----------------|--------------------------------------------|----------|---------|
|
|
|
|
|
-| ok | Emitted when the confirm button is clicked | Function | - |
|
|
|
|
|
-| cancel | Emitted when the cancel button is clicked | Function | - |
|
|
|
|
|
-| closed | Emitted when Dialog is closed | Function | - |
|
|
|
|
|
|
|
+| Event | Description | Type | Default |
|
|
|
|
|
+|--------|--------------------------------------------|----------|---------|
|
|
|
|
|
+| ok | Emitted when the confirm button is clicked | Function | - |
|
|
|
|
|
+| cancel | Emitted when the cancel button is clicked | Function | - |
|
|
|
|
|
+| closed | Emitted when Dialog is closed | Function | - |
|
|
|
| opened | Emitted when Dialog is Opened | Function | - |
|
|
| opened | Emitted when Dialog is Opened | Function | - |
|
|
|
|
|
|
|
|
|
|
|
|
@@ -287,9 +287,9 @@ export default {
|
|
|
|
|
|
|
|
The component provides the following CSS variables, which can be used to customize styles. Please refer to [ConfigProvider component](#/en-US/config-provider).
|
|
The component provides the following CSS variables, which can be used to customize styles. Please refer to [ConfigProvider component](#/en-US/config-provider).
|
|
|
|
|
|
|
|
-| Name | Default Value | Description |
|
|
|
|
|
-| --------------------------------------- | -------------------------- | ---- |
|
|
|
|
|
-| --nut-dialog-width| _296px_ | - |
|
|
|
|
|
-| --nut-dialog-header-font-weight| _normal_ | - |
|
|
|
|
|
-| --nut-dialog-header-color| _rgba(38, 38, 38, 1)_ | - |
|
|
|
|
|
-| --nut-dialog-footer-justify-content| _space-around_ | - |
|
|
|
|
|
|
|
+| Name | Default Value |
|
|
|
|
|
+|-------------------------------------|-----------------------|
|
|
|
|
|
+| --nut-dialog-width | _296px_ |
|
|
|
|
|
+| --nut-dialog-header-font-weight | _normal_ |
|
|
|
|
|
+| --nut-dialog-header-color | _rgba(38, 38, 38, 1)_ |
|
|
|
|
|
+| --nut-dialog-footer-justify-content | _space-around_ |
|