-
Notifications
You must be signed in to change notification settings - Fork 0
/
3775-09bd9ec7956663187a4b.js
1 lines (1 loc) · 110 KB
/
3775-09bd9ec7956663187a4b.js
1
(self.webpackChunkzent_docs=self.webpackChunkzent_docs||[]).push([[3775],{43775:(n,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>N});var t=a(73450),p=a(27378),o=a(57318),e=a(92497),c=a(96681),l=a(82285),u=a(11497),i=a(71457),r=a(33938),k=a(24246);function d(n,s){var a=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);s&&(t=t.filter((function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable}))),a.push.apply(a,t)}return a}function m(n){for(var s=1;s<arguments.length;s++){var a=null!=arguments[s]?arguments[s]:{};s%2?d(Object(a),!0).forEach((function(s){(0,t.Z)(n,s,a[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):d(Object(a)).forEach((function(s){Object.defineProperty(n,s,Object.getOwnPropertyDescriptor(a,s))}))}return n}var g=function(){return(0,k.jsxs)("div",{className:"zent-doc-pop-container",children:[(0,k.jsx)(e.X,{trigger:"hover",content:"鼠标移入触发方式",children:(0,k.jsx)(c.z,{type:"primary",children:"移入鼠标"})}),(0,k.jsx)(e.X,{trigger:"click",content:"鼠标点击触发方式",children:(0,k.jsx)(c.z,{type:"primary",children:"点击鼠标"})}),(0,k.jsx)(e.X,{trigger:"focus",content:"获得输入焦点触发方式",children:(0,k.jsx)(l.I,{defaultValue:"点击获取焦点",inline:!0})})]})},h=function(){var n="hover";return(0,k.jsxs)("div",{className:"zent-doc-pop-positions",children:[(0,k.jsxs)("div",{className:"zent-doc-pop-positions-top-row",children:[(0,k.jsx)(e.X,{trigger:n,position:"top-left",content:"TL",children:(0,k.jsx)(c.z,{children:"TopLeft"})}),(0,k.jsx)(e.X,{trigger:n,position:"top-center",content:"TC",children:(0,k.jsx)(c.z,{children:"TopCenter"})}),(0,k.jsx)(e.X,{trigger:n,position:"top-right",content:"TR",children:(0,k.jsx)(c.z,{children:"TopRight"})})]}),(0,k.jsxs)("div",{className:"zent-doc-pop-positions-bottom-row",children:[(0,k.jsx)(e.X,{trigger:n,position:"bottom-left",content:"BL",children:(0,k.jsx)(c.z,{children:"BottomLeft"})}),(0,k.jsx)(e.X,{trigger:n,position:"bottom-center",content:"BC",children:(0,k.jsx)(c.z,{children:"BottomCenter"})}),(0,k.jsx)(e.X,{trigger:n,position:"bottom-right",content:"BR",children:(0,k.jsx)(c.z,{children:"BottomRight"})})]}),(0,k.jsxs)("div",{className:"zent-doc-pop-positions-left-col",children:[(0,k.jsx)(e.X,{trigger:n,position:"left-top",content:"LT",children:(0,k.jsx)(c.z,{children:"LeftTop"})}),(0,k.jsx)(e.X,{trigger:n,position:"left-center",content:"LC",children:(0,k.jsx)(c.z,{children:"LeftCenter"})}),(0,k.jsx)(e.X,{trigger:n,position:"left-bottom",content:"LB",children:(0,k.jsx)(c.z,{children:"LeftBottom"})})]}),(0,k.jsxs)("div",{className:"zent-doc-pop-positions-right-col",children:[(0,k.jsx)(e.X,{trigger:n,position:"right-top",content:"RT",children:(0,k.jsx)(c.z,{children:"RightTop"})}),(0,k.jsx)(e.X,{trigger:n,position:"right-center",content:"RC",children:(0,k.jsx)(c.z,{children:"RightCenter"})}),(0,k.jsx)(e.X,{trigger:n,position:"right-bottom",content:"RB",children:(0,k.jsx)(c.z,{children:"RightBottom"})})]})]})},v=function(){return(0,k.jsxs)("div",{className:"zent-doc-pop-container",children:[(0,k.jsx)(e.X,{centerArrow:!0,trigger:"hover",position:"top-left",content:"centerArrow 为 true",children:(0,k.jsx)("div",{className:"zent-doc-pop-tag",children:"Y"})}),(0,k.jsx)(e.X,{trigger:"hover",position:"top-left",content:"centerArrow 为 false",children:(0,k.jsx)("div",{className:"zent-doc-pop-tag",children:"N"})})]})},f=function(){class n extends p.Component{constructor(...n){super(...n),(0,t.Z)(this,"confirmHandler",(()=>{u.Hj.alert({content:"Pop关闭了",parentComponent:this})}))}render(){return(0,k.jsx)(e.X,{trigger:"click",content:(0,k.jsx)("span",{style:{maxWidth:100,wordBreak:"break-all",display:"inline-block"},children:"1111d kdsalkdsa kdsklda kdslkda kdanmcmdj 9209 kjfslk kdslkd"}),onConfirm:this.confirmHandler,children:(0,k.jsx)(c.z,{type:"primary",children:"打开气泡"})})}}return(0,k.jsx)(n,{})},y=function(){class n extends p.Component{constructor(...n){super(...n),(0,t.Z)(this,"confirmHandler",(()=>{u.Hj.alert({content:"Pop 打开了",parentComponent:this})}))}render(){return(0,k.jsx)(e.X,{trigger:"click",header:"Pop 标题",content:"提示内容",type:"primary",confirmText:"Error",cancelText:"Close",onConfirm:this.confirmHandler,children:(0,k.jsx)(c.z,{type:"primary",children:"打开气泡"})})}}return(0,k.jsx)(n,{})},b=function(){class n extends p.Component{constructor(...n){super(...n),(0,t.Z)(this,"state",{visible:!1}),(0,t.Z)(this,"onBeforeClose",(()=>new Promise((n=>{setTimeout(n,500)}))))}onBeforeShow(n){setTimeout(n,500)}render(){return(0,k.jsx)(e.X,{content:"延迟500ms关闭",trigger:"click",onBeforeShow:this.onBeforeShow,onBeforeClose:this.onBeforeClose,children:(0,k.jsx)(c.z,{type:"primary",children:"延迟500ms打开"})})}}return(0,k.jsx)(n,{})},x=function(){class n extends p.Component{constructor(...n){super(...n),(0,t.Z)(this,"state",{visible:!1}),(0,t.Z)(this,"close",(()=>{this.setState({visible:!1})})),(0,t.Z)(this,"open",(()=>{this.setState({visible:!0})}))}render(){var n=(0,k.jsxs)("div",{children:[(0,k.jsx)("p",{style:{marginBottom:10},children:"可以在 Pop 内部关闭"}),(0,k.jsx)(c.z,{type:"primary",onClick:this.close,children:"关闭"})]});return(0,k.jsxs)("div",{className:"zent-doc-pop-none-trigger-container",children:[(0,k.jsx)(e.X,{content:n,trigger:"none",visible:this.state.visible,children:(0,k.jsx)(c.z,{type:"primary",onClick:this.open,children:"打开"})}),(0,k.jsx)(c.z,{disabled:!this.state.visible,onClick:this.close,children:"外部关闭"})]})}}return(0,k.jsx)(n,{})},j=function(){var n=e.X.withPop((function({pop:n}){return(0,k.jsxs)("div",{children:[(0,k.jsx)("div",{style:{marginBottom:16},children:"Pop 内容"}),(0,k.jsx)(c.z,{onClick:n.close,children:"关闭"})]})}));return(0,k.jsx)(e.X,{trigger:"click",content:(0,k.jsx)(n,{}),children:(0,k.jsx)(c.z,{type:"primary",children:"打开"})})},C=function(){return(0,k.jsxs)("div",{className:"zent-doc-pop-container",children:[(0,k.jsx)(e.X,{centerArrow:!0,trigger:"hover",position:"top-left",content:"内容",children:(0,k.jsx)(i.Y,{disabled:!0})}),(0,k.jsx)(e.X,{centerArrow:!0,trigger:"hover",position:"top-left",content:"内容",children:(0,k.jsx)(r.X,{disabled:!0})}),(0,k.jsx)(e.X,{trigger:"hover",position:"top-center",content:"内容",children:(0,k.jsx)(l.I,{disabled:!0,className:"zent-pop-disabled-mr"})}),(0,k.jsx)(e.X,{trigger:"hover",position:"top-center",content:"内容",fixMouseEventsOnDisabledChildren:!0,children:(0,k.jsx)(c.z,{type:"primary",disabled:!0,children:"Button"})}),(0,k.jsx)(e.X,{trigger:"hover",position:"top-center",content:"内容",fixMouseEventsOnDisabledChildren:!0,children:(0,k.jsx)(c.z.Directive,{type:"primary",disabled:!0,children:(0,k.jsx)("a",{href:"",children:" ButtonDirective "})})})]})};function z(n){return(0,k.jsx)(n.tag,m(m({},n.attributes),{},{dangerouslySetInnerHTML:{__html:n.html}}))}function w(n){return(0,k.jsx)(z,{tag:"section",html:n.html,attributes:{className:"zandoc-react-markdown"}})}function P(n){return(0,k.jsx)(z,{tag:"style",html:n.style})}function B(n,s){for(;n;)return n.offsetTop&&"static"!==getComputedStyle(n).position&&(s+=n.offsetTop),B(n.parentNode,s);return s}class q extends p.Component{constructor(...n){super(...n),(0,t.Z)(this,"state",{showCode:!1}),(0,t.Z)(this,"toggle",(()=>{this.setState({showCode:!this.state.showCode})}))}render(){var n=this.state.showCode,s=this.props,a=s.title,t=s.src,p=s.children;return(0,k.jsxs)("div",{className:"zandoc-react-demo",children:[(0,k.jsx)("div",{className:"zandoc-react-demo__preview",children:p}),(0,k.jsxs)("div",{className:"zandoc-react-demo__bottom",onClick:this.toggle,children:[(0,k.jsx)("div",{className:"zandoc-react-demo__title",children:(0,k.jsx)("p",{children:a||""})}),(0,k.jsx)("i",{className:"zenticon zenticon-caret-up zandoc-react-demo__toggle ".concat(n?"zandoc-react-demo__toggle-on":"zandoc-react-demo__toggle-off")})]}),n&&(0,k.jsx)("pre",{className:"zandoc-react-demo__code",children:(0,k.jsx)(z,{tag:"code",html:t,attributes:{className:"language-jsx"}})})]})}}class N extends p.Component{componentDidMount(){var n=location.hash;if(n){var s=document.querySelector('a[href="'.concat(n,'"]'));s&&(0,o.l)(document.documentElement,0,B(s,-9))}}render(){return p.createElement("div",{className:"zandoc-react-container"},p.createElement(P,{style:".zent-doc-pop-container {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n\n\t\t.zent-doc-pop-container .zent-input-wrapper {\n\t\t\tmargin-left: 10px;\n\t\t}\n\n.zent-doc-pop-positions {\n position: relative;\n }\n\n.zent-doc-pop-positions-top-row,\n\t\t.zent-doc-pop-positions-bottom-row {\n text-align: center;\n }\n\n.zent-doc-pop-positions-top-row .zent-pop-wrapper:not(:last-child), .zent-doc-pop-positions-bottom-row .zent-pop-wrapper:not(:last-child) {\n margin-right: 10px;\n }\n\n.zent-doc-pop-positions-bottom-row {\n margin-top: 200px;\n }\n\n.zent-doc-pop-positions-left-col, .zent-doc-pop-positions-right-col {\n position: absolute;\n top: 0;\n display: flex;\n justify-content: center;\n flex-direction: column;\n height: 100%;\n }\n\n.zent-doc-pop-positions-left-col >*, .zent-doc-pop-positions-right-col >* {\n\t\t\t\tmargin-left: 0 !important;\n\t\t\t}\n\n.zent-doc-pop-positions-left-col >*:not(:last-child), .zent-doc-pop-positions-right-col >*:not(:last-child) {\n\t\t\t\tmargin-bottom: 10px;\n }\n\n.zent-doc-pop-positions-left-col {\n left: 0;\n }\n\n.zent-doc-pop-positions-right-col {\n right: 0;\n }\n\n.zent-doc-pop-positions .zent-pop-wrapper .zent-btn {\n width: 120px;\n }\n\n.zent-doc-pop-tag {\n\twidth: 20px;\n\theight: 20px;\n\ttext-align: center;\n\tline-height: 20px;\n\tborder: 1px solid #e5e5e5;\n\tborder-radius: 5px;\n\tmargin-right: 10px;\n}\n\n.zent-doc-pop-none-trigger-container .zent-pop-wrapper {\n\t\t\tmargin-right: 10px;\n\t\t}\n\n.zent-pop-disabled-mr {\n\t\tmargin-right:16px;\n\t}"}),p.createElement(w,{html:'<h2 class="anchor-heading"><a href="#qi-pao-ti-shi-pop">¶</a><a href="javascript:void(0)" id="qi-pao-ti-shi-pop" class="anchor-point"></a>气泡提示 Pop</h2>\n<p>气泡提示组件</p>\n<h3 class="anchor-heading"><a href="#shi-yong-zhi-nan">¶</a><a href="javascript:void(0)" id="shi-yong-zhi-nan" class="anchor-point"></a>使用指南</h3>\n<ul>\n<li>多种触发方式:点击,鼠标移入,获得输入焦点</li>\n<li>支持 Tooltip 的使用方式</li>\n<li>支持对浮层上的元素进行操作, 可以承载相对复杂的内容, 比如链接、按钮等</li>\n</ul>\n<h3 class="anchor-heading"><a href="#dai-ma-yan-shi">¶</a><a href="javascript:void(0)" id="dai-ma-yan-shi" class="anchor-point"></a>代码演示</h3>'}),p.createElement(q,{title:"三种触发方式: 点击,鼠标移入,获得输入焦点",id:"Demotrigger",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Pop</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Button</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Input</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-pop-container<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span> <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hover<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>鼠标移入触发方式<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>primary<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>移入鼠标<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span> <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>click<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>鼠标点击触发方式<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>primary<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>点击鼠标<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span> <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>focus<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>获得输入焦点触发方式<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Input</span></span> <span class="token attr-name">defaultValue</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>点击获取焦点<span class="token punctuation">"</span></span> <span class="token attr-name">inline</span> <span class="token punctuation">/></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token punctuation">,</span> mountNode\n<span class="token punctuation">)</span>'},p.createElement(g)),p.createElement(q,{title:"12种定位",id:"Demopositions",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Pop</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Button</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token keyword">const</span> trigger <span class="token operator">=</span> <span class="token string">\'hover\'</span><span class="token punctuation">;</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-pop-positions<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-pop-positions-top-row<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>top-left<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>TL<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">TopLeft</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>top-center<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>TC<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">TopCenter</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>top-right<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>TR<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">TopRight</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-pop-positions-bottom-row<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>bottom-left<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>BL<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">BottomLeft</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>bottom-center<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>BC<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">BottomCenter</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>bottom-right<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>BR<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">BottomRight</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-pop-positions-left-col<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>left-top<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>LT<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">LeftTop</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>left-center<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>LC<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">LeftCenter</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>left-bottom<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>LB<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">LeftBottom</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-pop-positions-right-col<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>right-top<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>RT<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">RightTop</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>right-center<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>RC<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">RightCenter</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span> <span class="token attr-name">trigger</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>trigger<span class="token punctuation">}</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>right-bottom<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>RB<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">RightBottom</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span><span class="token punctuation">,</span>\n mountNode\n<span class="token punctuation">)</span><span class="token punctuation">;</span>'},p.createElement(h)),p.createElement(q,{title:"使用 `centerArrow` 来控制气泡小三角的位置",id:"Democenterarrow",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Pop</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Button</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Input</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-pop-container<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span> <span class="token attr-name">centerArrow</span> <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hover<span class="token punctuation">"</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>top-left<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>centerArrow 为 true<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-pop-tag<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token constant">Y</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span> <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hover<span class="token punctuation">"</span></span> <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>top-left<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>centerArrow 为 false<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-pop-tag<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token constant">N</span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token punctuation">,</span> mountNode\n<span class="token punctuation">)</span><span class="token punctuation">;</span>'},p.createElement(v)),p.createElement(q,{title:"Confirm 形式的气泡提示",id:"Democonfirm",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Pop</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Sweetalert</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Button</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token keyword">class</span> <span class="token class-name">Wrapper</span> <span class="token keyword">extends</span> <span class="token class-name">React<span class="token punctuation">.</span>Component</span> <span class="token punctuation">{</span>\n <span class="token function-variable function">confirmHandler</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token arrow operator">=></span> <span class="token punctuation">{</span>\n <span class="token maybe-class-name">Sweetalert</span><span class="token punctuation">.</span><span class="token method function property-access">alert</span><span class="token punctuation">(</span><span class="token punctuation">{</span>\n content<span class="token operator">:</span> <span class="token string">\'Pop关闭了\'</span><span class="token punctuation">,</span>\n parentComponent<span class="token operator">:</span> <span class="token keyword">this</span><span class="token punctuation">,</span>\n <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n <span class="token function">render</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n <span class="token keyword control-flow">return</span> <span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span>\n <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>click<span class="token punctuation">"</span></span>\n <span class="token attr-name">content</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>span</span>\n <span class="token attr-name">style</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">{</span>\n maxWidth<span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>\n wordBreak<span class="token operator">:</span> <span class="token string">\'break-all\'</span><span class="token punctuation">,</span>\n display<span class="token operator">:</span> <span class="token string">\'inline-block\'</span><span class="token punctuation">,</span>\n <span class="token punctuation">}</span><span class="token punctuation">}</span></span>\n <span class="token punctuation">></span></span>\n <span class="token number">1111</span>d kdsalkdsa kdsklda kdslkda kdanmcmdj <span class="token number">9209</span> kjfslk kdslkd\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>span</span><span class="token punctuation">></span></span>\n <span class="token punctuation">}</span></span>\n <span class="token attr-name">onConfirm</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">confirmHandler</span><span class="token punctuation">}</span></span>\n <span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>primary<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>打开气泡<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span>\n<span class="token punctuation">}</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span><span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Wrapper</span></span> <span class="token punctuation">/></span></span><span class="token punctuation">,</span> mountNode<span class="token punctuation">)</span><span class="token punctuation">;</span>'},p.createElement(f)),p.createElement(q,{title:"自定义 Confirm 形式的气泡提示按钮",id:"Democustomconfirm",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Pop</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Sweetalert</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Button</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token keyword">class</span> <span class="token class-name">Wrapper</span> <span class="token keyword">extends</span> <span class="token class-name">React<span class="token punctuation">.</span>Component</span> <span class="token punctuation">{</span>\n <span class="token function-variable function">confirmHandler</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token arrow operator">=></span> <span class="token punctuation">{</span>\n <span class="token maybe-class-name">Sweetalert</span><span class="token punctuation">.</span><span class="token method function property-access">alert</span><span class="token punctuation">(</span><span class="token punctuation">{</span>\n content<span class="token operator">:</span> <span class="token string">\'Pop 打开了\'</span><span class="token punctuation">,</span>\n parentComponent<span class="token operator">:</span> <span class="token keyword">this</span>\n <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span>\n\n <span class="token function">render</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n <span class="token keyword control-flow">return</span> <span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span>\n <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>click<span class="token punctuation">"</span></span>\n <span class="token attr-name">header</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Pop 标题<span class="token punctuation">"</span></span>\n <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>提示内容<span class="token punctuation">"</span></span>\n <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>primary<span class="token punctuation">"</span></span>\n <span class="token attr-name">confirmText</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Error<span class="token punctuation">"</span></span>\n <span class="token attr-name">cancelText</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>Close<span class="token punctuation">"</span></span>\n <span class="token attr-name">onConfirm</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">confirmHandler</span><span class="token punctuation">}</span></span>\n <span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>primary<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>打开气泡<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span>\n<span class="token punctuation">}</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span><span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Wrapper</span></span><span class="token punctuation">/></span></span><span class="token punctuation">,</span> mountNode<span class="token punctuation">)</span><span class="token punctuation">;</span>'},p.createElement(y)),p.createElement(q,{title:"延迟打开/关闭",id:"Demodelay",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Pop</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Button</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token keyword">class</span> <span class="token class-name">Controlled</span> <span class="token keyword">extends</span> <span class="token class-name">Component</span> <span class="token punctuation">{</span>\n state <span class="token operator">=</span> <span class="token punctuation">{</span>\n visible<span class="token operator">:</span> <span class="token boolean">false</span>\n <span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n <span class="token function">onBeforeShow</span><span class="token punctuation">(</span><span class="token parameter">cont</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n <span class="token function">setTimeout</span><span class="token punctuation">(</span>cont<span class="token punctuation">,</span> <span class="token number">500</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n <span class="token function-variable function">onBeforeClose</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token arrow operator">=></span> <span class="token punctuation">{</span>\n <span class="token keyword control-flow">return</span> <span class="token keyword">new</span> <span class="token class-name">Promise</span><span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token parameter">resolve</span><span class="token punctuation">)</span> <span class="token arrow operator">=></span> <span class="token punctuation">{</span>\n <span class="token function">setTimeout</span><span class="token punctuation">(</span>resolve<span class="token punctuation">,</span> <span class="token number">500</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n <span class="token function">render</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n <span class="token keyword control-flow">return</span> <span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span>\n <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>延迟500ms关闭<span class="token punctuation">"</span></span>\n <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>click<span class="token punctuation">"</span></span>\n <span class="token attr-name">onBeforeShow</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">onBeforeShow</span><span class="token punctuation">}</span></span>\n <span class="token attr-name">onBeforeClose</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">onBeforeClose</span><span class="token punctuation">}</span></span>\n <span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>primary<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>延迟<span class="token number">500</span>ms打开<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span>\n<span class="token punctuation">}</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Controlled</span></span> <span class="token punctuation">/></span></span>\n <span class="token punctuation">,</span> mountNode\n<span class="token punctuation">)</span><span class="token punctuation">;</span>'},p.createElement(b)),p.createElement(q,{title:"外部控制显示隐藏",id:"Democontrolled",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Pop</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Button</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token keyword">class</span> <span class="token class-name">NoneTriggerDemo</span> <span class="token keyword">extends</span> <span class="token class-name">Component</span> <span class="token punctuation">{</span>\n state <span class="token operator">=</span> <span class="token punctuation">{</span>\n visible<span class="token operator">:</span> <span class="token boolean">false</span>\n <span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n <span class="token function-variable function">close</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token arrow operator">=></span> <span class="token punctuation">{</span>\n <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token method function property-access">setState</span><span class="token punctuation">(</span><span class="token punctuation">{</span>\n visible<span class="token operator">:</span> <span class="token boolean">false</span>\n <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n <span class="token function-variable function">open</span> <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token arrow operator">=></span> <span class="token punctuation">{</span>\n <span class="token keyword">this</span><span class="token punctuation">.</span><span class="token method function property-access">setState</span><span class="token punctuation">(</span><span class="token punctuation">{</span>\n visible<span class="token operator">:</span> <span class="token boolean">true</span>\n <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span><span class="token punctuation">;</span>\n\n <span class="token function">render</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n <span class="token keyword">const</span> content <span class="token operator">=</span> <span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>p</span> <span class="token attr-name">style</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">{</span> marginBottom<span class="token operator">:</span> <span class="token number">10</span> <span class="token punctuation">}</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span>可以在 <span class="token maybe-class-name">Pop</span> 内部关闭<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>p</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>primary<span class="token punctuation">"</span></span> <span class="token attr-name">onClick</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">close</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span>关闭<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token keyword control-flow">return</span> <span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-pop-none-trigger-container<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span>\n <span class="token attr-name">content</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>content<span class="token punctuation">}</span></span>\n <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>none<span class="token punctuation">"</span></span>\n <span class="token attr-name">visible</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">state</span><span class="token punctuation">.</span><span class="token property-access">visible</span><span class="token punctuation">}</span></span>\n <span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>primary<span class="token punctuation">"</span></span> <span class="token attr-name">onClick</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">open</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span>打开<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span> <span class="token attr-name">disabled</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token operator">!</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">state</span><span class="token punctuation">.</span><span class="token property-access">visible</span><span class="token punctuation">}</span></span> <span class="token attr-name">onClick</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token keyword">this</span><span class="token punctuation">.</span><span class="token property-access">close</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span>外部关闭<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token punctuation">)</span><span class="token punctuation">;</span>\n <span class="token punctuation">}</span>\n<span class="token punctuation">}</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">NoneTriggerDemo</span></span> <span class="token punctuation">/></span></span>\n <span class="token punctuation">,</span> mountNode\n<span class="token punctuation">)</span>'},p.createElement(x)),p.createElement(q,{title:"withPop 高阶组件",id:"Demowithpop",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Pop</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Button</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token comment">// 点击 close 按钮可以关闭弹层</span>\n<span class="token keyword">const</span> <span class="token maybe-class-name">Content</span> <span class="token operator">=</span> <span class="token maybe-class-name">Pop</span><span class="token punctuation">.</span><span class="token method function property-access">withPop</span><span class="token punctuation">(</span><span class="token keyword">function</span> <span class="token function"><span class="token maybe-class-name">Content</span></span><span class="token punctuation">(</span><span class="token parameter"><span class="token punctuation">{</span> pop <span class="token punctuation">}</span></span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n <span class="token keyword control-flow">return</span> <span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">style</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token punctuation">{</span> marginBottom<span class="token operator">:</span> <span class="token number">16</span> <span class="token punctuation">}</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span><span class="token maybe-class-name">Pop</span> 内容<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span> <span class="token attr-name">onClick</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span>pop<span class="token punctuation">.</span><span class="token property-access">close</span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span>关闭<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span>\n <span class="token punctuation">)</span><span class="token punctuation">;</span>\n<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span> <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>click<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token script language-javascript"><span class="token script-punctuation punctuation">=</span><span class="token punctuation">{</span><span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Content</span></span> <span class="token punctuation">/></span></span><span class="token punctuation">}</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>primary<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>打开<span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span><span class="token punctuation">,</span>\n mountNode\n<span class="token punctuation">)</span><span class="token punctuation">;</span>'},p.createElement(j)),p.createElement(q,{title:"禁用表单元素",id:"Demodisabled",src:'<span class="token keyword module">import</span> <span class="token imports"><span class="token punctuation">{</span> <span class="token maybe-class-name">Button</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Pop</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Radio</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Checkbox</span><span class="token punctuation">,</span> <span class="token maybe-class-name">Input</span> <span class="token punctuation">}</span></span> <span class="token keyword module">from</span> <span class="token string">\'zent\'</span><span class="token punctuation">;</span>\n\n<span class="token maybe-class-name">ReactDOM</span><span class="token punctuation">.</span><span class="token method function property-access">render</span><span class="token punctuation">(</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>div</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-doc-pop-container<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span>\n <span class="token attr-name">centerArrow</span>\n <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hover<span class="token punctuation">"</span></span>\n <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>top-left<span class="token punctuation">"</span></span>\n <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>内容<span class="token punctuation">"</span></span>\n <span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Radio</span></span> <span class="token attr-name">disabled</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Radio</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span>\n <span class="token attr-name">centerArrow</span>\n <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hover<span class="token punctuation">"</span></span>\n <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>top-left<span class="token punctuation">"</span></span>\n <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>内容<span class="token punctuation">"</span></span>\n <span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Checkbox</span></span> <span class="token attr-name">disabled</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Checkbox</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span>\n <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hover<span class="token punctuation">"</span></span>\n <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>top-center<span class="token punctuation">"</span></span>\n <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>内容<span class="token punctuation">"</span></span>\n <span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Input</span></span> <span class="token attr-name">disabled</span> <span class="token attr-name">className</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>zent-pop-disabled-mr<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span>\n <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hover<span class="token punctuation">"</span></span>\n <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>top-center<span class="token punctuation">"</span></span>\n <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>内容<span class="token punctuation">"</span></span>\n <span class="token attr-name">fixMouseEventsOnDisabledChildren</span>\n <span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>primary<span class="token punctuation">"</span></span> <span class="token attr-name">disabled</span><span class="token punctuation">></span></span>\n <span class="token maybe-class-name">Button</span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Pop</span></span>\n <span class="token attr-name">trigger</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>hover<span class="token punctuation">"</span></span>\n <span class="token attr-name">position</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>top-center<span class="token punctuation">"</span></span>\n <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>内容<span class="token punctuation">"</span></span>\n <span class="token attr-name">fixMouseEventsOnDisabledChildren</span>\n <span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span><span class="token class-name">Button.Directive</span></span> <span class="token attr-name">type</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>primary<span class="token punctuation">"</span></span> <span class="token attr-name">disabled</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>a</span> <span class="token attr-name">href</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span><span class="token punctuation">"</span></span><span class="token punctuation">></span></span> <span class="token maybe-class-name">ButtonDirective</span> <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>a</span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Button.Directive</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span><span class="token class-name">Pop</span></span><span class="token punctuation">></span></span>\n <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>div</span><span class="token punctuation">></span></span><span class="token punctuation">,</span>\n mountNode\n<span class="token punctuation">)</span><span class="token punctuation">;</span>'},p.createElement(C)),p.createElement(w,{html:'<h3 class="anchor-heading"><a href="#api">¶</a><a href="javascript:void(0)" id="api" class="anchor-point"></a>API</h3>\n<table class="table">\n<thead>\n<tr>\n<th>参数</th>\n<th>说明</th>\n<th>类型</th>\n<th>是否必须</th>\n<th>默认值</th>\n<th>备选值</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>content</td>\n<td>弹层的内容</td>\n<td>node</td>\n<td>是</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>trigger</td>\n<td>触发方式</td>\n<td>string</td>\n<td>否</td>\n<td><code>\'none\'</code></td>\n<td><code>\'click\'</code>\n, \n<code>\'hover\'</code>\n, \n<code>\'focus\'</code></td>\n</tr>\n<tr>\n<td>position</td>\n<td>弹出框的位置,命名规则:相对触发元素的位置+箭头相对于Pop的位置。接受函数形式,参考 \n<code>Popover.Position.create</code></td>\n<td>string \n|\n func</td>\n<td>否</td>\n<td><code>\'top-center\'</code></td>\n<td></td>\n</tr>\n<tr>\n<td>centerArrow</td>\n<td>是否按小箭头居中对齐trigger来定位</td>\n<td>bool</td>\n<td>否</td>\n<td><code>false</code></td>\n<td></td>\n</tr>\n<tr>\n<td>cushion</td>\n<td>与 Popover 中的\n<code>cushion</code>\n含义(定位的偏移量)相同,通常为弹框边缘与 trigger 元素之间的距离</td>\n<td>number</td>\n<td>否</td>\n<td><code>10</code></td>\n<td></td>\n</tr>\n<tr>\n<td>header</td>\n<td>用户可以自定义头部</td>\n<td>node</td>\n<td>否</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>block</td>\n<td>弹层在文档流里是否以块级元素出现</td>\n<td>bool</td>\n<td>否</td>\n<td><code>false</code></td>\n<td></td>\n</tr>\n<tr>\n<td>onShow</td>\n<td>弹层打开后的回调函数</td>\n<td>func</td>\n<td>否</td>\n<td><code>noop</code></td>\n<td></td>\n</tr>\n<tr>\n<td>onClose</td>\n<td>弹层关闭后的回调函数</td>\n<td>func</td>\n<td>否</td>\n<td><code>noop</code></td>\n<td></td>\n</tr>\n<tr>\n<td>onBeforeShow</td>\n<td>弹层打开前的回调函数,只有用户触发的打开操作才会调用,外部设置\n<code>visible</code>\n不会调用</td>\n<td>func</td>\n<td>否</td>\n<td><code>noop</code></td>\n<td></td>\n</tr>\n<tr>\n<td>onBeforeClose</td>\n<td>弹层关闭前的回调函数, 只有用户触发的关闭操作才会调用,外部设置\n<code>visible</code>\n不会调用</td>\n<td>func</td>\n<td>否</td>\n<td><code>noop</code></td>\n<td></td>\n</tr>\n<tr>\n<td>onConfirm</td>\n<td>用户自定义回调,设置以后pop 表现为confirm</td>\n<td>func</td>\n<td>否</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>onCancel</td>\n<td>用户使用 confirm 的时候可自定义取消的回调</td>\n<td>func</td>\n<td>否</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>confirmText</td>\n<td>用户自定义按钮名</td>\n<td>string</td>\n<td>否</td>\n<td><code>\'确定\'</code></td>\n<td></td>\n</tr>\n<tr>\n<td>cancelText</td>\n<td>用户自定义取消按钮</td>\n<td>string</td>\n<td>否</td>\n<td><code>\'取消\'</code></td>\n<td></td>\n</tr>\n<tr>\n<td>type</td>\n<td>影响确定按钮的样式</td>\n<td>string</td>\n<td>否</td>\n<td><code>\'primary\'</code></td>\n<td><code>\'default\'</code></td>\n</tr>\n<tr>\n<td>visible</td>\n<td>外部维护 \n<code>Pop</code>\n 的显示状态,此时外部拥有 \n<code>Pop</code>\n 的全部控制权,必须和 \n<code>onVisibleChange</code>\n 一起使用</td>\n<td>bool</td>\n<td>否</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>onVisibleChange</td>\n<td>和 \n<code>visible</code>\n 一起使用</td>\n<td>func</td>\n<td>否</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>onPositionUpdated</td>\n<td>位置更新时的回调,不保证调用这个函数时位置一定变化</td>\n<td>func</td>\n<td>否</td>\n<td><code>noop</code></td>\n<td></td>\n</tr>\n<tr>\n<td>onPositionReady</td>\n<td>位置进入窗口时的回调,生命周期内只调用一次</td>\n<td>func</td>\n<td>否</td>\n<td><code>noop</code></td>\n<td></td>\n</tr>\n<tr>\n<td>containerSelector</td>\n<td>弹层的父节点CSS selector</td>\n<td>string</td>\n<td>否</td>\n<td><code>\'body\'</code></td>\n<td>所有合法的CSS selector</td>\n</tr>\n<tr>\n<td>className</td>\n<td>弹层自定义类名</td>\n<td>string</td>\n<td>否</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>style</td>\n<td>弹层自定义样式</td>\n<td><code>CSSProperties</code></td>\n<td>否</td>\n<td></td>\n<td></td>\n</tr>\n</tbody>\n</table>\n<p>根据 <code>trigger</code> 值的不同, <code>Pop</code> 提供了一些额外的控制参数.</p>\n<h4 class="anchor-heading"><a href="#click">¶</a><a href="javascript:void(0)" id="click" class="anchor-point"></a>Click</h4>\n<table class="table">\n<thead>\n<tr>\n<th>参数</th>\n<th>说明</th>\n<th>类型</th>\n<th>是否必须</th>\n<th>默认值</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>closeOnClickOutside</td>\n<td>点击弹层和trigger节点外部时自动关闭</td>\n<td>bool</td>\n<td>否</td>\n<td><code>true</code></td>\n</tr>\n</tbody>\n</table>\n<h4 class="anchor-heading"><a href="#hover">¶</a><a href="javascript:void(0)" id="hover" class="anchor-point"></a>Hover</h4>\n<table class="table">\n<thead>\n<tr>\n<th>参数</th>\n<th>说明</th>\n<th>类型</th>\n<th>是否必须</th>\n<th>默认值</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>mouseEnterDelay</td>\n<td>hover打开的延迟(单位:毫秒)</td>\n<td>number</td>\n<td>否</td>\n<td><code>200</code></td>\n</tr>\n<tr>\n<td>mouseLeaveDelay</td>\n<td>关闭的的延迟(单位:毫秒)</td>\n<td>number</td>\n<td>否</td>\n<td><code>200</code></td>\n</tr>\n<tr>\n<td>anchorOnly</td>\n<td>仅考虑 Trigger 作为触发区域</td>\n<td>boolean</td>\n<td>否</td>\n<td><code>false</code></td>\n</tr>\n<tr>\n<td>fixMouseEventsOnDisabledChildren</td>\n<td>兼容处理被禁用的子节点的鼠标事件</td>\n<td>boolean</td>\n<td>否</td>\n<td><code>false</code></td>\n</tr>\n</tbody>\n</table>\n<p><strong>注意:</strong><code>fixMouseEventsOnDisabledChildren</code> 仅对 Zent 组件有效。</p>\n<p>背景</p>\n<ul>\n<li><a href="https://github.com/youzan/zent/issues/142">原生 <code>input</code> 和 <code>button</code> 在 disabled 状态下触发鼠标事件失效</a></li>\n</ul>\n<p>解决方案</p>\n<ul>\n<li>先将元素 <code>input</code> 或 <code>button</code> 包裹在另一元素内部</li>\n<li>再给元素 <code>input</code> 或 <code>button</code> 加样式 <code>{pointer-events: none}</code></li>\n</ul>\n<h4 class="anchor-heading"><a href="#none">¶</a><a href="javascript:void(0)" id="none" class="anchor-point"></a>None</h4>\n<p>这种模式下 <code>onConfirm</code> 和 <code>onCancel</code> 不会自动关闭 <code>Pop</code>, 需要使用者自己在回调中控制 <code>visible</code> 来关闭 <code>Pop</code>.</p>\n<h4 class="anchor-heading"><a href="#withpop-gao-jie-zu-jian">¶</a><a href="javascript:void(0)" id="withpop-gao-jie-zu-jian" class="anchor-point"></a>withPop 高阶组件</h4>\n<p>这个高阶组件暴露了 <code>Pop</code> 内部的几个重要方法, 可能的使用场景: 在 <code>content</code> 内部手动关闭弹层.</p>\n<table class="table">\n<thead>\n<tr>\n<th>参数</th>\n<th>说明</th>\n<th>类型</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>open</td>\n<td>打开 Pop</td>\n<td>func</td>\n</tr>\n<tr>\n<td>close</td>\n<td>关闭 Pop</td>\n<td>func</td>\n</tr>\n</tbody>\n</table>\n<h4 class="anchor-heading"><a href="#adjustposition-fang-fa">¶</a><a href="javascript:void(0)" id="adjustposition-fang-fa" class="anchor-point"></a><code>adjustPosition</code> 方法</h4>\n<p>用于手动调整 <code>Pop</code> 位置。</p>\n<h4 class="anchor-heading"><a href="#getwrappedpopover-fang-fa">¶</a><a href="javascript:void(0)" id="getwrappedpopover-fang-fa" class="anchor-point"></a><code>getWrappedPopover</code> 方法</h4>\n<p>用于获取内部的 <code>Popover</code> 实例。</p>\n<h3 class="anchor-heading"><a href="#faq">¶</a><a href="javascript:void(0)" id="faq" class="anchor-point"></a>FAQ</h3>\n<h4 class="anchor-heading"><a href="#nei-rong-qu-wen-ben-hen-chang-de-shi-hou-ding-wei-cuo-wu">¶</a><a href="javascript:void(0)" id="nei-rong-qu-wen-ben-hen-chang-de-shi-hou-ding-wei-cuo-wu" class="anchor-point"></a>内容区文本很长的时候定位错误</h4>\n<p>这个问题基本都是因为 <code>content</code> 直接传入了一个很长的字符串,导致组件在 <code>body</code> 上测量得到的弹层宽度和实际渲染宽度不一致导致的,因为这个折行行为和弹层与屏幕边缘的位置相关。解决方法是给 <code>content</code> 一个宽度。</p>\n<h4 class="anchor-heading"><a href="#centerarrow">¶</a><a href="javascript:void(0)" id="centerarrow" class="anchor-point"></a>centerArrow</h4>\n<p>默认情况下, <code>Pop</code> 根据 <code>position</code> 对齐的是弹层和trigger的边缘, 除了 <code>postion</code> 为 <code>\'*-center\'</code> 的情况下, 弹层上的小箭头和弹层边缘的间距是固定的, 因而在 trigger 特别小的情况下箭头会对齐到 trigger 外部. 这种情况下可以设置 <code>centerArrow</code> 为 <code>true</code>, 不管trigger大小如何, 箭头永远对齐在trigger中间, 弹层再相对箭头做定位.</p>\n<h4 class="anchor-heading"><a href="#onconfirm-he-oncancel">¶</a><a href="javascript:void(0)" id="onconfirm-he-oncancel" class="anchor-point"></a>onConfirm 和 onCancel</h4>\n<p>支持异步响应,此时按钮会变成loading状态。</p>\n<ul>\n<li>如果返回 <code>Promise</code>, <code>Pop</code> 会在 <code>Promise</code> <code>resolve</code> 后关闭.</li>\n<li>也支持参数形式的异步响应, 此时接受一个参数 <code>close</code>, 需要在函数内手动调用 <code>close</code> 函数.</li>\n</ul>'}))}}},33938:(n,s,a)=>{"use strict";a.d(s,{X:()=>k});var t=a(59312),p=a(24246),o=a(60042),e=a.n(o),c=a(27378),l=a(1535),u=a(23130),i=a(1348),r=a(4008);function k(n){var s=(0,c.useContext)(i.d),a=(0,c.useContext)(u.Z),o=(0,c.useRef)(n);o.current=n;var r,k=a&&a.onChange,d=(0,c.useCallback)((function(n){var s=o.current,a=s.value,p=s.onChange;if(k)k(a);else if(p){var e=Object.create(n);e.target=(0,t.pi)((0,t.pi)({},o.current),{type:"checkbox",checked:n.target.checked}),p(e)}}),[k]),m=(n.checked,n.className),g=n.style,h=(n.disabled,n.readOnly,n.children),v=n.indeterminate,f=n.width,y=(n.value,n.labelStyle),b=n.onMouseEnter,x=n.onMouseLeave,j=(0,t._T)(n,["checked","className","style","disabled","readOnly","children","indeterminate","width","value","labelStyle","onMouseEnter","onMouseLeave"]),C=function(n,s){return"boolean"==typeof s.readOnly?s.readOnly:!!n&&n.readOnly}(a,n),z=function(n,s,a){return"boolean"==typeof a.disabled?a.disabled:s?s.disabled:n.value}(s,a,n);if(a){var w=a.value,P=a.isValueEqual;r=-1!==w.findIndex((function(s){return P(s,n.value)}))}else r=!!n.checked;return(0,p.jsxs)("label",(0,t.pi)({className:e()("zent-checkbox-wrap",m,{"zent-checkbox-checked":!!r,"zent-checkbox-disabled":z||C,"zent-checkbox-indeterminate":v}),style:(0,t.pi)((0,t.pi)({},g),(0,l.Z)(f)),onMouseEnter:b,onMouseLeave:x,"data-zv":"9.12.16"},{children:[(0,p.jsxs)("span",(0,t.pi)({className:"zent-checkbox","data-zv":"9.12.16"},{children:[(0,p.jsx)("span",{className:"zent-checkbox-inner","data-zv":"9.12.16"},void 0),(0,p.jsx)("input",(0,t.pi)({},j,{type:"checkbox",checked:r&&!v,disabled:z,readOnly:C,onChange:d,"data-zv":"9.12.16"}),void 0)]}),void 0),null!=h&&!0!==h&&!1!==h?(0,p.jsx)("div",(0,t.pi)({className:"zent-checkbox-label",style:y,"data-zv":"9.12.16"},{children:h}),void 0):null]}),void 0)}k.Group=r.Z,s.Z=k},4008:(n,s,a)=>{"use strict";a.d(s,{c:()=>k});var t=a(59312),p=a(24246),o=a(27378),e=a(60042),c=a.n(e),l=a(41925),u=a(23130),i=a(1348),r=u.Z.Provider,k=function(n){function s(){var s=null!==n&&n.apply(this,arguments)||this;return s.getGroupContext=(0,l.Z)((function(n,a,t,p){return{value:Array.isArray(n)?n:[],disabled:a,readOnly:t,isValueEqual:p,onChange:s.onCheckboxChange}})),s.onCheckboxChange=function(n){var a=s.props,t=a.isValueEqual,p=a.onChange,o=a.value;if(p){var e=o?o.slice():[],c=e.findIndex((function(s){return t(s,n)}));-1!==c?e.splice(c,1):e.push(n),p(e)}},s}return(0,t.ZT)(s,n),s.prototype.render=function(){var n=this.props,s=n.className,a=n.style,o=n.children,e=n.value,l=n.disabled,u=void 0===l?this.context.value:l,i=n.readOnly,k=void 0!==i&&i,d=n.isValueEqual,m=c()("zent-checkbox-group",s);return(0,p.jsx)(r,(0,t.pi)({value:this.getGroupContext(e,u,k,d)},{children:(0,p.jsx)("div",(0,t.pi)({className:m,style:a,"data-zv":"9.12.16"},{children:o}),void 0)}),void 0)},s.defaultProps={isValueEqual:Object.is,value:[]},s.contextType=i.d,s}(o.Component);s.Z=k},23130:(n,s,a)=>{"use strict";var t=a(27378);s.Z=(0,t.createContext)(null)},97701:(n,s,a)=>{"use strict";a.d(s,{V:()=>P,Z:()=>B});var t=a(59312),p=a(24246),o=a(27378),e=a(14623),c=a(53552),l=a(79352),u=a(60042),i=a.n(u),r=a(58801),k=a(27036),d=function(n){function s(){var s=null!==n&&n.apply(this,arguments)||this;return s.dialogEl=null,s.onClickClose=function(n){var a=s.props.onClose;a&&a(n)},s}return(0,t.ZT)(s,n),s.prototype.componentDidMount=function(){this.resetTransformOrigin()},s.prototype.componentDidUpdate=function(){this.resetTransformOrigin()},s.prototype.setTransformOrigin=function(n,s){["Webkit","Moz","Ms","ms"].forEach((function(a){n[a+"TransformOrigin"]=s})),n.transformOrigin=s},s.prototype.resetTransformOrigin=function(n){void 0===n&&(n=this.props);var s=n.mousePosition,a=function(n,s){switch(n){case"center":return"center center 0";case"auto":default:return}}(n.position,this.dialogEl);if(void 0===a&&s&&s.x>=0&&s.y>=0&&this.dialogEl&&this.dialogEl.getBoundingClientRect){var t=this.dialogEl.getBoundingClientRect(),p=t.left,o=t.top;a=s.x-p+"px "+(s.y-o)+"px 0"}a&&this.dialogEl&&this.setTransformOrigin(this.dialogEl.style,a)},s.prototype.renderHeader=function(){var n=this.props.title;return n?(n="number"==typeof n||"string"==typeof n?(0,p.jsx)("span",(0,t.pi)({className:"zent-dialog-r-title-text","data-zv":"9.12.16"},{children:n}),void 0):n,(0,p.jsx)("div",(0,t.pi)({className:"zent-dialog-r-header","data-zv":"9.12.16"},{children:(0,p.jsx)("div",(0,t.pi)({className:"zent-dialog-r-title","data-zv":"9.12.16"},{children:n}),void 0)}),void 0)):null},s.prototype.render=function(){var n=this,s=this.props,a=s.className,o=s.closeBtn,e=s.footer,c=s.style,l=s.children,u=this.renderHeader(),r=i()("zent-dialog-r-close",{"zent-dialog-r-has-title":!!u}),d=o&&(0,p.jsx)("button",(0,t.pi)({type:"button",className:r,onClick:this.onClickClose,"data-zv":"9.12.16"},{children:(0,p.jsx)(k.Z,{type:"close"},void 0)}),void 0),m=e&&(0,p.jsx)("div",(0,t.pi)({className:"zent-dialog-r-footer","data-zv":"9.12.16"},{children:e}),void 0);return(0,p.jsxs)("div",(0,t.pi)({className:i()("zent-dialog-r",a,{"zent-dialog-r--has-header":!!u,"zent-dialog-r--has-footer":!!m,"zent-dialog-r--no-close-btn":!d}),style:c,ref:function(s){return n.dialogEl=s},"data-zv":"9.12.16"},{children:[d,u,(0,p.jsx)("div",(0,t.pi)({className:"zent-dialog-r-body","data-zv":"9.12.16"},{children:(0,p.jsx)("div",(0,t.pi)({className:"zent-dialog-r-body-content","data-zv":"9.12.16"},{children:l}),void 0)}),void 0),m]}),void 0)},s}(o.Component),m=function(n){function s(){var s=null!==n&&n.apply(this,arguments)||this;return s.rootRef=(0,o.createRef)(),s.onMaskClick=function(n){n.target===n.currentTarget&&s.props.mask&&s.props.maskClosable&&s.props.onClose(n)},s}return(0,t.ZT)(s,n),s.prototype.componentDidMount=function(){var n=document.activeElement,s=this.rootRef.current;s!==n&&s&&!s.contains(n)&&function(n){if(n){var s=(0,r.Z)();n.focus(),window.scroll(s.x,s.y)}}(s)},s.prototype.render=function(){var n=this.props,s=n.mask,a=n.visible,o=n.children;return(0,p.jsxs)("div",(0,t.pi)({ref:this.rootRef,tabIndex:-1,className:"zent-dialog-r-root","data-zv":"9.12.16"},{children:[a&&s&&(0,p.jsx)("div",{className:"zent-dialog-r-backdrop","data-zv":"9.12.16"},void 0),(0,p.jsx)("div",(0,t.pi)({className:"zent-dialog-r-wrap",onClick:this.onMaskClick,"data-zv":"9.12.16"},{children:o}),void 0)]}),void 0)},s}(o.Component),g=a(31542),h=a.t(g,2),v=a(70453),f=a(42690),y=a(14805),b=new Map,x=function(n){function s(){var s=null!==n&&n.apply(this,arguments)||this;return s.state={visible:!0},s.closeOptions={},s.onClosed=function(){var n=s.props,a=n.options.onClose,t=n.container,p=s.closeOptions.triggerOnClose;(void 0===p||p)&&a&&a(),g.unmountComponentAtNode(t)},s.onClose=function(n){s.close({triggerOnClose:!1!==n})},s}return(0,t.ZT)(s,n),s.prototype.close=function(n){void 0===n&&(n={}),this.closeOptions=n,this.setState({visible:!1})},s.prototype.componentWillUnmount=function(){var n=this.props.options.dialogId;b.delete(n)},s.prototype.render=function(){var n=this.props.options,s=this.state.visible;return(0,p.jsx)(B,(0,t.pi)({},n,{onClose:this.onClose,onClosed:this.onClosed,visible:s}),void 0)},s}(o.Component);function j(n,s){void 0===s&&(s={});var a=b.get(n);if(a){var t=a.current;t&&t.close(s)}}function C(n){if(void 0===n&&(n={}),!l.Z)return f.Z;var s=n.dialogId,a=void 0===s?(0,v.Z)("__zent-dialog__"):s,e=n.parentComponent;!function(n){if(b.has(n))throw new Error("Duplicate dialog id found: "+n)}(a);var c=(0,y.Z)("div"),u=e?g.unstable_renderSubtreeIntoContainer.bind(h,e):g.render,i=(0,o.createRef)();return u((0,p.jsx)(x,{ref:i,options:(0,t.pi)((0,t.pi)({},n),{dialogId:a}),container:c},void 0),c),function(n,s){b.set(n,s)}(a,i),function(n){void 0===n&&(n=!0),j(a,{triggerOnClose:!1!==n})}}var z=a(49744),w=null;l.Z&&(0,z.Oo)(document.documentElement,"click",(function(n){0!==n.clientX&&0!==n.clientY&&(w={x:n.clientX,y:n.clientY})}),{capture:!0});var P=function(n){function s(s){var a=n.call(this,s)||this;return a.lastMousePosition=null,a.onClose=function(n){var s=a.props.onClose;s&&s(n)},a.onExited=function(){var n=a.props.onClosed;a.setState({exiting:!1}),n&&n()},a.state={prevOpen:s.visible,exiting:!1},a}return(0,t.ZT)(s,n),s.getDerivedStateFromProps=function(n,s){var a=s.prevOpen;return n.visible===a?null:n.visible?{prevOpen:n.visible,exiting:!1}:{prevOpen:n.visible,exiting:!0}},s.prototype.render=function(){var n=this.props,s=n.visible,a=n.closeBtn,o=n.style,l=n.position,u=n.onOpened,i=(n.onClosed,n.mask),r=n.maskClosable,k=n.children,g=(0,t._T)(n,["visible","closeBtn","style","position","onOpened","onClosed","mask","maskClosable","children"]),h=this.state.exiting;return this.lastMousePosition=s?this.lastMousePosition||w:null,(0,p.jsx)(c.ZP,(0,t.pi)({visible:s||h,onClose:this.onClose,className:"zent-dialog-r-anchor",closeOnESC:a,blockPageScroll:!0},{children:(0,p.jsx)(m,(0,t.pi)({mask:i,maskClosable:r,visible:s,onClose:this.onClose},{children:(0,p.jsx)(e.Z,(0,t.pi)({appear:!0,mountOnEnter:!0,unmountOnExit:!0,in:s,timeout:300,classNames:"zent-zoom",onEntered:u,onExited:this.onExited},{children:(0,p.jsx)(d,(0,t.pi)({},g,{style:o,closeBtn:a,mousePosition:this.lastMousePosition,position:l},{children:k}),void 0)}),void 0)}),void 0)}),void 0)},s.defaultProps={onClose:function(){},visible:!1,className:"",style:{},position:"auto",title:"",closeBtn:!0,mask:!0,maskClosable:!0,footer:null},s.openDialog=C,s.closeDialog=j,s}(o.Component),B=P},4246:(n,s,a)=>{"use strict";a.d(s,{E:()=>i});var t=a(59312),p=a(24246),o=a(60042),e=a.n(o),c=a(27378),l=a(57961),u=a(1348);function i(n){var s=(0,c.useContext)(u.d),a=n.value,o=n.disabled,i=void 0===o?s.value:o,r=n.readOnly,k=void 0!==r&&r,d=n.isValueEqual,m=void 0===d?Object.is:d,g=n.className,h=n.style,v=n.children,f=n.onChange,y=(0,c.useMemo)((function(){return{value:a,disabled:i,readOnly:k,isValueEqual:m,onRadioChange:f}}),[a,i,k,m,f]);return(0,p.jsx)(l.Z.Provider,(0,t.pi)({value:y},{children:(0,p.jsx)("div",(0,t.pi)({className:e()("zent-radio-group",g),style:h,"data-zv":"9.12.16"},{children:v}),void 0)}),void 0)}s.Z=i},57961:(n,s,a)=>{"use strict";var t=(0,a(27378).createContext)(null);t.displayName="RadioGroupContext",s.Z=t},71457:(n,s,a)=>{"use strict";a.d(s,{Y:()=>m,Z:()=>g});var t=a(59312),p=a(24246),o=a(60042),e=a.n(o),c=a(1535),l=a(27378);function u(n,s){var a=(0,l.useRef)(s);a.current=s;var p=n&&n.onRadioChange;return(0,l.useCallback)((function(n){var s=function(n,s){var a=Object.create(n);return a.target=(0,t.pi)((0,t.pi)({},s),{type:"radio",checked:n.target.checked}),a}(n,a.current);if(p)p(s);else{var o=a.current.onChange;o&&o(s)}}),[p])}function i(n,s,a){var t=function(n,s,a){return"boolean"==typeof a.disabled?a.disabled:s&&"boolean"==typeof s.disabled?s.disabled:n.value}(n,s,a),p=function(n,s){return"boolean"==typeof s.readOnly?s.readOnly:!!n&&n.readOnly}(s,a);return{checked:s?s.isValueEqual(s.value,a.value):!!a.checked,disabled:t,readOnly:p}}var r=a(4246),k=a(1348),d=a(57961);function m(n){var s=n.className,a=n.style,o=n.children,r=(n.value,n.width),m=n.labelStyle,g=(n.onMouseEnter,n.onMouseLeave,(0,t._T)(n,["className","style","children","value","width","labelStyle","onMouseEnter","onMouseLeave"])),h=(0,l.useContext)(k.d),v=(0,l.useContext)(d.Z),f=i(h,v,n),y=f.checked,b=f.disabled,x=f.readOnly,j=u(v,n),C=e()(s,"zent-radio-wrap",{"zent-radio-checked":!!y,"zent-radio-disabled":b||x}),z=(0,c.Z)(r),w=(0,t.pi)((0,t.pi)({},a),z);return(0,p.jsxs)("label",(0,t.pi)({className:C,style:w,onMouseEnter:n.onMouseEnter,onMouseLeave:n.onMouseLeave,"data-zv":"9.12.16"},{children:[(0,p.jsxs)("span",(0,t.pi)({className:"zent-radio","data-zv":"9.12.16"},{children:[(0,p.jsx)("span",{className:"zent-radio-inner","data-zv":"9.12.16"},void 0),(0,p.jsx)("input",(0,t.pi)({},g,{type:"radio",checked:!!y,disabled:b,readOnly:x,onChange:j,"data-zv":"9.12.16"}),void 0)]}),void 0),void 0!==o&&(0,p.jsx)("span",(0,t.pi)({className:"zent-radio-label",style:m,"data-zv":"9.12.16"},{children:o}),void 0)]}),void 0)}m.Button=function(n){var s=n.className,a=n.style,o=n.children,r=(n.value,n.width),m=n.onMouseEnter,g=n.onMouseLeave,h=(0,t._T)(n,["className","style","children","value","width","onMouseEnter","onMouseLeave"]),v=(0,l.useContext)(k.d),f=(0,l.useContext)(d.Z);if(!f)throw new Error("Radio.Button must be nested within Radio.Group");var y=i(v,f,n),b=y.checked,x=y.disabled,j=y.readOnly,C=u(f,n),z=e()(s,"zent-radio-button",{"zent-radio-button--checked":!!b,"zent-radio-button--disabled":x||j}),w=(0,c.Z)(r),P=(0,t.pi)((0,t.pi)({},a),w);return(0,p.jsxs)("label",(0,t.pi)({className:z,style:P,onMouseEnter:m,onMouseLeave:g,"data-zv":"9.12.16"},{children:[(0,p.jsx)("input",(0,t.pi)({},h,{type:"radio",checked:!!b,disabled:x,readOnly:j,onChange:C,"data-zv":"9.12.16"}),void 0),(0,p.jsx)("span",(0,t.pi)({className:"zent-radio-button__content","data-zv":"9.12.16"},{children:o}),void 0)]}),void 0)},m.Group=r.Z;var g=m},11497:(n,s,a)=>{"use strict";a.d(s,{Hj:()=>f});var t=a(59312),p=a(24246),o=a(60042),e=a.n(o),c=a(52074),l=a(97701).Z,u=a(27036),i=a(27378),r=a(90347),k=a(65436),d=function(n){function s(){var s=null!==n&&n.apply(this,arguments)||this;return s.state={loading:!1},s.onClick=function(){var n=s.props,a=n.onClick,t=(0,n.getClose)();if(!a)return t();var p=a.length>0,o=p?a(t):a();if((0,k.Z)(o))return s.setState({loading:!0}),void o.then((function(){t()}),(function(){s.setState({loading:!1})}));p||!1===o||t()},s}return(0,t.ZT)(s,n),s.prototype.render=function(){var n=this.props,s=n.className,a=n.type,o=n.text,e=this.state.loading;return(0,p.jsx)(r.ZP,(0,t.pi)({type:a,className:s,loading:e,onClick:this.onClick},{children:o}),void 0)},s}(i.Component),m={info:"info-circle-o",success:"check-circle-o",error:"close-circle-o",warning:"error-circle-o"},g=l.openDialog;function h(n,s){var a,o=n.className,l=void 0===o?"":o,i=n.confirmType,r=void 0===i?"primary":i,k=n.closeBtn,h=void 0!==k&&k,v=n.maskClosable,f=void 0!==v&&v,y=n.title,b=n.type,x=n.content,j=n.onConfirm,C=n.onCancel,z=n.confirmText,w=n.cancelText,P=n.parentComponent,B=n.onClose,q=null;return q=g({closeBtn:h,maskClosable:f,className:e()("zent-sweetalert-"+s,(a={},a[l]=!!l,a)),title:(0,p.jsx)(c.Z,(0,t.pi)({componentName:"Sweetalert"},{children:function(n){var s=m[b];return(0,p.jsxs)("div",(0,t.pi)({className:"zent-sweetalert-"+(b?"icon-":"")+"title","data-zv":"9.12.16"},{children:[b&&(0,p.jsx)(u.Z,{className:"zent-sweetalert-type-icon",type:s},void 0),y||n.title]}),void 0)}}),void 0),children:x,footer:(0,p.jsx)(c.Z,(0,t.pi)({componentName:"Sweetalert"},{children:function(n){var a="alert"===s;return(0,p.jsxs)("div",(0,t.pi)({className:"sweet-"+s+"-actions","data-zv":"9.12.16"},{children:[!a&&(0,p.jsx)(d,{type:"default",className:"zent-sweetalert-"+s+"-btn-cancel",getClose:function(){return q},onClick:C,text:w||n.cancel},"sweetalert-cancel"),(0,p.jsx)(d,{type:r,className:"zent-sweetalert-"+s+"-btn-confirm",getClose:function(){return q},onClick:j,text:z||(a?n.ok:n.confirm)},"sweetalert-confirm")]}),void 0)}}),void 0),parentComponent:P,onClose:B})}function v(n){return void 0===n&&(n={}),h(n,"alert")}var f={alert:v,info:v,confirm:function(n){return void 0===n&&(n={}),h(n,"confirm")}}},58801:(n,s,a)=>{"use strict";function t(){var n=window.pageXOffset,s=window.pageYOffset;return{x:void 0!==n?n:(document.documentElement||document.body.parentNode||document.body).scrollLeft,y:void 0!==s?s:(document.documentElement||document.body.parentNode||document.body).scrollTop}}a.d(s,{Z:()=>t})},1535:(n,s,a)=>{"use strict";function t(n){return"string"==typeof n||"number"==typeof n?{width:n}:{}}a.d(s,{Z:()=>t})}}]);