ant-design/9f9547c0-async.6c9da140.js
2025-05-31 08:49:44 +00:00

1 line
16 KiB
JavaScript

(("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd=("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd||[]).push([["9f9547c0"],{"9f9547c0":function(a,e,o){"use strict";o.d(e,"__esModule",{value:!0}),o.d(e,"texts",{enumerable:!0,get:function(){return t;}}),o("00630bea");let t=[{value:"To display a notification message at any of the four corners of the viewport. Typically it can be used in the following cases:",paraId:0,tocIndex:0},{value:"A notification with complex content.",paraId:1,tocIndex:0},{value:"A notification providing a feedback based on the user interaction. Or it may show some details about upcoming steps the user may have to follow.",paraId:1,tocIndex:0},{value:"A notification that is pushed by the application.",paraId:1,tocIndex:0},{value:"Common props ref\uFF1A",paraId:2,tocIndex:14},{value:"Common props",paraId:3,tocIndex:14},{value:"notification.success(config)",paraId:4,tocIndex:14},{value:"notification.error(config)",paraId:4,tocIndex:14},{value:"notification.info(config)",paraId:4,tocIndex:14},{value:"notification.warning(config)",paraId:4,tocIndex:14},{value:"notification.open(config)",paraId:4,tocIndex:14},{value:"notification.destroy(key?: String)",paraId:4,tocIndex:14},{value:"The properties of config are as follows:",paraId:5,tocIndex:14},{value:"Property",paraId:6,tocIndex:14},{value:"Description",paraId:6,tocIndex:14},{value:"Type",paraId:6,tocIndex:14},{value:"Default",paraId:6,tocIndex:14},{value:"Version",paraId:6,tocIndex:14},{value:"actions",paraId:6,tocIndex:14},{value:"Customized button group",paraId:6,tocIndex:14},{value:"ReactNode",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"5.24.0",paraId:6,tocIndex:14},{value:"btn",paraId:6,tocIndex:14},{value:"Customized close button group, please use ",paraId:6,tocIndex:14},{value:"actions",paraId:6,tocIndex:14},{value:" instead",paraId:6,tocIndex:14},{value:"ReactNode",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"className",paraId:6,tocIndex:14},{value:"Customized CSS class",paraId:6,tocIndex:14},{value:"string",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"closeIcon",paraId:6,tocIndex:14},{value:"Custom close icon",paraId:6,tocIndex:14},{value:"ReactNode",paraId:6,tocIndex:14},{value:"true",paraId:6,tocIndex:14},{value:"5.7.0: close button will be hidden when setting to null or false",paraId:6,tocIndex:14},{value:"description",paraId:6,tocIndex:14},{value:"The content of notification box (required)",paraId:6,tocIndex:14},{value:"ReactNode",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"duration",paraId:6,tocIndex:14},{value:"Time in seconds before Notification is closed. When set to 0 or null, it will never be closed automatically",paraId:6,tocIndex:14},{value:"number",paraId:6,tocIndex:14},{value:"4.5",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"showProgress",paraId:6,tocIndex:14},{value:"Show progress bar for auto-closing notification",paraId:6,tocIndex:14},{value:"boolean",paraId:6,tocIndex:14},{value:"5.18.0",paraId:6,tocIndex:14},{value:"pauseOnHover",paraId:6,tocIndex:14},{value:"keep the timer running or not on hover",paraId:6,tocIndex:14},{value:"boolean",paraId:6,tocIndex:14},{value:"true",paraId:6,tocIndex:14},{value:"5.18.0",paraId:6,tocIndex:14},{value:"icon",paraId:6,tocIndex:14},{value:"Customized icon",paraId:6,tocIndex:14},{value:"ReactNode",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"key",paraId:6,tocIndex:14},{value:"The unique identifier of the Notification",paraId:6,tocIndex:14},{value:"string",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"message",paraId:6,tocIndex:14},{value:"The title of notification box (required)",paraId:6,tocIndex:14},{value:"ReactNode",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"placement",paraId:6,tocIndex:14},{value:"Position of Notification, can be one of ",paraId:6,tocIndex:14},{value:"top",paraId:6,tocIndex:14},{value:" | ",paraId:6,tocIndex:14},{value:"topLeft",paraId:6,tocIndex:14},{value:" | ",paraId:6,tocIndex:14},{value:"topRight",paraId:6,tocIndex:14},{value:" | ",paraId:6,tocIndex:14},{value:"bottom",paraId:6,tocIndex:14},{value:" | ",paraId:6,tocIndex:14},{value:"bottomLeft",paraId:6,tocIndex:14},{value:" | ",paraId:6,tocIndex:14},{value:"bottomRight",paraId:6,tocIndex:14},{value:"string",paraId:6,tocIndex:14},{value:"topRight",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"style",paraId:6,tocIndex:14},{value:"Customized inline style",paraId:6,tocIndex:14},{value:"CSSProperties",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"role",paraId:6,tocIndex:14},{value:"The semantics of notification content recognized by screen readers. The default value is ",paraId:6,tocIndex:14},{value:"alert",paraId:6,tocIndex:14},{value:". When set as the default value, the screen reader will promptly interrupt any ongoing content reading and prioritize the notification content for immediate attention.",paraId:6,tocIndex:14},{value:"alert | status",paraId:6,tocIndex:14},{value:"alert",paraId:6,tocIndex:14},{value:"5.6.0",paraId:6,tocIndex:14},{value:"onClick",paraId:6,tocIndex:14},{value:"Specify a function that will be called when the notification is clicked",paraId:6,tocIndex:14},{value:"function",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"onClose",paraId:6,tocIndex:14},{value:"Trigger when notification closed",paraId:6,tocIndex:14},{value:"function",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"props",paraId:6,tocIndex:14},{value:"An object that can contain ",paraId:6,tocIndex:14},{value:"data-*",paraId:6,tocIndex:14},{value:", ",paraId:6,tocIndex:14},{value:"aria-*",paraId:6,tocIndex:14},{value:", or ",paraId:6,tocIndex:14},{value:"role",paraId:6,tocIndex:14},{value:" props, to be put on the notification ",paraId:6,tocIndex:14},{value:"div",paraId:6,tocIndex:14},{value:". This currently only allows ",paraId:6,tocIndex:14},{value:"data-testid",paraId:6,tocIndex:14},{value:" instead of ",paraId:6,tocIndex:14},{value:"data-*",paraId:6,tocIndex:14},{value:" in TypeScript. See ",paraId:6,tocIndex:14},{value:"https://github.com/microsoft/TypeScript/issues/28960",paraId:6,tocIndex:14},{value:".",paraId:6,tocIndex:14},{value:"Object",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"-",paraId:6,tocIndex:14},{value:"notification.useNotification(config)",paraId:7,tocIndex:14},{value:"The properties of config are as follows:",paraId:8,tocIndex:14},{value:"Property",paraId:9,tocIndex:14},{value:"Description",paraId:9,tocIndex:14},{value:"Type",paraId:9,tocIndex:14},{value:"Default",paraId:9,tocIndex:14},{value:"Version",paraId:9,tocIndex:14},{value:"bottom",paraId:9,tocIndex:14},{value:"Distance from the bottom of the viewport, when ",paraId:9,tocIndex:14},{value:"placement",paraId:9,tocIndex:14},{value:" is ",paraId:9,tocIndex:14},{value:"bottom",paraId:9,tocIndex:14},{value:" ",paraId:9,tocIndex:14},{value:"bottomRight",paraId:9,tocIndex:14},{value:" or ",paraId:9,tocIndex:14},{value:"bottomLeft",paraId:9,tocIndex:14},{value:" (unit: pixels)",paraId:9,tocIndex:14},{value:"number",paraId:9,tocIndex:14},{value:"24",paraId:9,tocIndex:14},{value:"closeIcon",paraId:9,tocIndex:14},{value:"Custom close icon",paraId:9,tocIndex:14},{value:"ReactNode",paraId:9,tocIndex:14},{value:"true",paraId:9,tocIndex:14},{value:"5.7.0: close button will be hidden when setting to null or false",paraId:9,tocIndex:14},{value:"getContainer",paraId:9,tocIndex:14},{value:"Return the mount node for Notification",paraId:9,tocIndex:14},{value:"() => HTMLNode",paraId:9,tocIndex:14},{value:"() => document.body",paraId:9,tocIndex:14},{value:"placement",paraId:9,tocIndex:14},{value:"Position of Notification, can be one of ",paraId:9,tocIndex:14},{value:"top",paraId:9,tocIndex:14},{value:" | ",paraId:9,tocIndex:14},{value:"topLeft",paraId:9,tocIndex:14},{value:" | ",paraId:9,tocIndex:14},{value:"topRight",paraId:9,tocIndex:14},{value:" | ",paraId:9,tocIndex:14},{value:"bottom",paraId:9,tocIndex:14},{value:" | ",paraId:9,tocIndex:14},{value:"bottomLeft",paraId:9,tocIndex:14},{value:" | ",paraId:9,tocIndex:14},{value:"bottomRight",paraId:9,tocIndex:14},{value:"string",paraId:9,tocIndex:14},{value:"topRight",paraId:9,tocIndex:14},{value:"showProgress",paraId:9,tocIndex:14},{value:"Show progress bar for auto-closing notification",paraId:9,tocIndex:14},{value:"boolean",paraId:9,tocIndex:14},{value:"5.18.0",paraId:9,tocIndex:14},{value:"pauseOnHover",paraId:9,tocIndex:14},{value:"keep the timer running or not on hover",paraId:9,tocIndex:14},{value:"boolean",paraId:9,tocIndex:14},{value:"true",paraId:9,tocIndex:14},{value:"5.18.0",paraId:9,tocIndex:14},{value:"rtl",paraId:9,tocIndex:14},{value:"Whether to enable RTL mode",paraId:9,tocIndex:14},{value:"boolean",paraId:9,tocIndex:14},{value:"false",paraId:9,tocIndex:14},{value:"stack",paraId:9,tocIndex:14},{value:"Notifications will be stacked when amount is over threshold",paraId:9,tocIndex:14},{value:"boolean | ",paraId:9,tocIndex:14},{value:"{ threshold: number }",paraId:9,tocIndex:14},{value:"{ threshold: 3 }",paraId:9,tocIndex:14},{value:"5.10.0",paraId:9,tocIndex:14},{value:"top",paraId:9,tocIndex:14},{value:"Distance from the top of the viewport, when ",paraId:9,tocIndex:14},{value:"placement",paraId:9,tocIndex:14},{value:" is ",paraId:9,tocIndex:14},{value:"top",paraId:9,tocIndex:14},{value:" ",paraId:9,tocIndex:14},{value:"topRight",paraId:9,tocIndex:14},{value:" or ",paraId:9,tocIndex:14},{value:"topLeft",paraId:9,tocIndex:14},{value:" (unit: pixels)",paraId:9,tocIndex:14},{value:"number",paraId:9,tocIndex:14},{value:"24",paraId:9,tocIndex:14},{value:"maxCount",paraId:9,tocIndex:14},{value:"Max Notification show, drop oldest if exceed limit",paraId:9,tocIndex:14},{value:"number",paraId:9,tocIndex:14},{value:"-",paraId:9,tocIndex:14},{value:"4.17.0",paraId:9,tocIndex:14},{value:"notification",paraId:10,tocIndex:14},{value:" also provides a global ",paraId:10,tocIndex:14},{value:"config()",paraId:10,tocIndex:14},{value:" method that can be used for specifying the default options. Once this method is used, all the notification boxes will take into account these globally defined options when displaying.",paraId:10,tocIndex:14},{value:"notification.config(options)",paraId:11,tocIndex:15},{value:"When you use ",paraId:12,tocIndex:15},{value:"ConfigProvider",paraId:12,tocIndex:15},{value:" for global configuration, the system will automatically start RTL mode by default.(4.3.0+)",paraId:12,tocIndex:15},{value:"When you want to use it alone, you can start the RTL mode through the following settings.",paraId:13,tocIndex:15},{value:"notification.config({\n placement: 'bottomRight',\n bottom: 50,\n duration: 3,\n rtl: true,\n});\n",paraId:14,tocIndex:16},{value:"Property",paraId:15,tocIndex:16},{value:"Description",paraId:15,tocIndex:16},{value:"Type",paraId:15,tocIndex:16},{value:"Default",paraId:15,tocIndex:16},{value:"Version",paraId:15,tocIndex:16},{value:"bottom",paraId:15,tocIndex:16},{value:"Distance from the bottom of the viewport, when ",paraId:15,tocIndex:16},{value:"placement",paraId:15,tocIndex:16},{value:" is ",paraId:15,tocIndex:16},{value:"bottom",paraId:15,tocIndex:16},{value:" ",paraId:15,tocIndex:16},{value:"bottomRight",paraId:15,tocIndex:16},{value:" or ",paraId:15,tocIndex:16},{value:"bottomLeft",paraId:15,tocIndex:16},{value:" (unit: pixels)",paraId:15,tocIndex:16},{value:"number",paraId:15,tocIndex:16},{value:"24",paraId:15,tocIndex:16},{value:"closeIcon",paraId:15,tocIndex:16},{value:"Custom close icon",paraId:15,tocIndex:16},{value:"ReactNode",paraId:15,tocIndex:16},{value:"true",paraId:15,tocIndex:16},{value:"5.7.0: close button will be hidden when setting to null or false",paraId:15,tocIndex:16},{value:"duration",paraId:15,tocIndex:16},{value:"Time in seconds before Notification is closed. When set to 0 or null, it will never be closed automatically",paraId:15,tocIndex:16},{value:"number",paraId:15,tocIndex:16},{value:"4.5",paraId:15,tocIndex:16},{value:"getContainer",paraId:15,tocIndex:16},{value:"Return the mount node for Notification, but still display at fullScreen",paraId:15,tocIndex:16},{value:"() => HTMLNode",paraId:15,tocIndex:16},{value:"() => document.body",paraId:15,tocIndex:16},{value:"placement",paraId:15,tocIndex:16},{value:"Position of Notification, can be one of ",paraId:15,tocIndex:16},{value:"top",paraId:15,tocIndex:16},{value:" ",paraId:15,tocIndex:16},{value:"topLeft",paraId:15,tocIndex:16},{value:" ",paraId:15,tocIndex:16},{value:"topRight",paraId:15,tocIndex:16},{value:" ",paraId:15,tocIndex:16},{value:"bottom",paraId:15,tocIndex:16},{value:" ",paraId:15,tocIndex:16},{value:"bottomLeft",paraId:15,tocIndex:16},{value:" ",paraId:15,tocIndex:16},{value:"bottomRight",paraId:15,tocIndex:16},{value:"string",paraId:15,tocIndex:16},{value:"topRight",paraId:15,tocIndex:16},{value:"showProgress",paraId:15,tocIndex:16},{value:"Show progress bar for auto-closing notification",paraId:15,tocIndex:16},{value:"boolean",paraId:15,tocIndex:16},{value:"5.18.0",paraId:15,tocIndex:16},{value:"pauseOnHover",paraId:15,tocIndex:16},{value:"keep the timer running or not on hover",paraId:15,tocIndex:16},{value:"boolean",paraId:15,tocIndex:16},{value:"true",paraId:15,tocIndex:16},{value:"5.18.0",paraId:15,tocIndex:16},{value:"rtl",paraId:15,tocIndex:16},{value:"Whether to enable RTL mode",paraId:15,tocIndex:16},{value:"boolean",paraId:15,tocIndex:16},{value:"false",paraId:15,tocIndex:16},{value:"top",paraId:15,tocIndex:16},{value:"Distance from the top of the viewport, when ",paraId:15,tocIndex:16},{value:"placement",paraId:15,tocIndex:16},{value:" is ",paraId:15,tocIndex:16},{value:"top",paraId:15,tocIndex:16},{value:" ",paraId:15,tocIndex:16},{value:"topRight",paraId:15,tocIndex:16},{value:" or ",paraId:15,tocIndex:16},{value:"topLeft",paraId:15,tocIndex:16},{value:" (unit: pixels)",paraId:15,tocIndex:16},{value:"number",paraId:15,tocIndex:16},{value:"24",paraId:15,tocIndex:16},{value:"maxCount",paraId:15,tocIndex:16},{value:"Max Notification show, drop oldest if exceed limit",paraId:15,tocIndex:16},{value:"number",paraId:15,tocIndex:16},{value:"-",paraId:15,tocIndex:16},{value:"4.17.0",paraId:15,tocIndex:16},{value:"locale/prefixCls/theme",paraId:16},{value:"antd will dynamic create React instance by ",paraId:17,tocIndex:19},{value:"ReactDOM.render",paraId:17,tocIndex:19},{value:" when call notification methods. Whose context is different with origin code located context.",paraId:17,tocIndex:19},{value:"When you need context info (like ConfigProvider context), you can use ",paraId:18,tocIndex:19},{value:"notification.useNotification",paraId:18,tocIndex:19},{value:" to get ",paraId:18,tocIndex:19},{value:"api",paraId:18,tocIndex:19},{value:" instance and ",paraId:18,tocIndex:19},{value:"contextHolder",paraId:18,tocIndex:19},{value:" node. And put it in your children:",paraId:18,tocIndex:19},{value:'const [api, contextHolder] = notification.useNotification();\n\nreturn (\n <Context1.Provider value="Ant">\n {/* contextHolder is inside Context1 which means api will get value of Context1 */}\n {contextHolder}\n <Context2.Provider value="Design">\n {/* contextHolder is outside Context2 which means api will **not** get value of Context2 */}\n </Context2.Provider>\n </Context1.Provider>\n);\n',paraId:19,tocIndex:19},{value:"Note:",paraId:20,tocIndex:19},{value:" You must insert ",paraId:20,tocIndex:19},{value:"contextHolder",paraId:20,tocIndex:19},{value:" into your children with hooks. You can use origin method if you do not need context connection.",paraId:20,tocIndex:19},{value:"App Package Component",paraId:21,tocIndex:19},{value:" can be used to simplify the problem of ",paraId:22,tocIndex:19},{value:"useNotification",paraId:22,tocIndex:19},{value:" and other methods that need to manually implant contextHolder.",paraId:22,tocIndex:19},{value:"You can config with ",paraId:23,tocIndex:20},{value:"ConfigProvider.config",paraId:24,tocIndex:20}];}}]);