You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/config-provider/index.en-US.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,26 @@ Some components use dynamic style to support wave effect. You can config `csp` p
56
56
| pageHeader | Unify the ghost of pageHeader ,Ref [pageHeader](<(/components/page-header)> | { ghost:boolean } | 'true' | 1.5.0 |
57
57
| transformCellText | Table data can be changed again before rendering. The default configuration of general user empty data. | Function({ text, column, record, index }) => any | - | 1.5.4 | |
Copy file name to clipboardExpand all lines: components/modal/index.en-US.md
+21-6Lines changed: 21 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,7 @@ Modal dialogs.
9
9
10
10
## When To Use
11
11
12
-
When requiring users to interact with the application, but without jumping to a new page and interrupting
13
-
the user's workflow, you can use `Modal` to create a new floating layer over the current page to get user
14
-
feedback or display information.
15
-
Additionally, if you need show a simple confirmation dialog, you can use `antd.Modal.confirm()`,
16
-
and so on.
12
+
When requiring users to interact with the application, but without jumping to a new page and interrupting the user's workflow, you can use `Modal` to create a new floating layer over the current page to get user feedback or display information. Additionally, if you need show a simple confirmation dialog, you can use `antd.Modal.confirm()`, and so on.
17
13
18
14
## API
19
15
@@ -89,7 +85,7 @@ The items listed above are all functions, expecting a settings object as paramet
89
85
| zIndex | The `z-index` of the Modal | Number | 1000 ||
90
86
| onCancel | Specify a function that will be called when the user clicks the Cancel button. The parameter of this function is a function whose execution should include closing the dialog. You can also just return a promise and when the promise is resolved, the modal dialog will also be closed | function | - ||
91
87
| onOk | Specify a function that will be called when the user clicks the OK button. The parameter of this function is a function whose execution should include closing the dialog. You can also just return a promise and when the promise is resolved, the modal dialog will also be closed | function | - ||
92
-
|parentContext| The parent context of the popup is generally used to get the parent provider, such as the configuration of `ConfigProvider`| vue instance| - ||
88
+
|appContext| The context of the pop-up window is generally used to obtain content such as global registered components, vuex, etc. | -| - ||
93
89
94
90
All the `Modal.method`s will return a reference, and then we can update and close the modal dialog by the reference.
### Why can't the Modal method obtain global registered components, context, vuex, etc. and ConfigProvider `locale/prefixCls` configuration, and can't update data responsively?
119
+
120
+
Call the Modal method directly, and the component will dynamically create a new Vue entity through `Vue.render`. Its context is not the same as the context where the current code is located, so the context information cannot be obtained.
121
+
122
+
When you need context information (for example, using a globally registered component), you can pass the current component context through the `appContext` property. When you need to keep the property responsive, you can use the function to return:
0 commit comments