No Description

index.js.map 8.4KB

1
  1. {"version":3,"file":"index.js","sources":["../../src/components/Payment/assets/icon/close@2x.png","../../src/components/Payment/WantedPublishPopover/index.tsx"],"sourcesContent":["const img = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAFNElEQVRYR82Yf0jcdRjH33enp1NbTQ3FdKhTY64hTTsURc6keQeSqIPSQJIiMHM3zj8ST/BE/And+c8wmSSMomHl4EaaP2aeuq/R1MwrraEgLVbLXcvpReY847l9v3I7774/LKUHjuN79/k8z+v7+fG8n89Hhv+pyf4F1xEAxwE8BSAIQDAAPwB/AnCwnzsAVgHsSI0jFcwfwEkA8QAiRAYj0BUACwDsIvtALJgcwLMA0tjREevfs90tADcBbAg5EAN2FEAegFAhZyL/3wYwBeB7vvZCYFEAzgIIEBlUSjMCYwA4vXXiA6N1lAuApvGg7DaAL7zB+QILB1DA7rKDguL80shNegbxBkZbv4jd/gcNxfmfYHftbjxvYDR9CYdFxMahDfExm/tcP3mC0RQWHzIUF+5HAGPcgydYPoBn+MCSk5ODm5ubs4qKigadTq8b6rHuFRUVcYmJicf0ev2swAuTOnwC4L7niD0J4FW+zvHx8YEMw+gjIiKOz8zM3MjIyPhwa2vLp9xUV1cntra2VioUCv+WlpYug8EwLwD3HYAbnmApANL5OlZVVZ0wm806hUKhpHbz8/Nfq1Sqns3NzT1wdXV1J41GYwXXdnZ2lklNTb0sAEaK8JEnGKWHSKH1xY2Cn59fILVdXFz8RqVSXdrY2Nid16amptM1NTVvyeVy0laIGV23uJ+SpnJrTAHgTSEo7v/Kyso4k8l0XqlUUoWBpaUlW3p6epfdbn9oMpnO6HS6N+RyOfnE1NTUWFZW1hUx65H1T3I1z4E9AaBULBi1Ky8vj+ns7NQFBASE0PPKysqi1WqdKSsrK5XJZC61sFqtw2q1+jMpfgmK3ocDoymkqZRkJSUlUd3d3ReCgoJI6B+zwcHBzzUazTVJDh81XgJwnQOLY8Vasp+CgoKI3t7ed5VKJSmGy4aGhvrz8vIskp096kDF5TUOjCpR7X4c9fX1nS0sLCQJ27XV1dXbubm5HTabjSpZqfYTgAEOLAzAOake+vv787VaLSVlsh2Hw/EgODiY8iHsdvsdjUbTMT09/UCi3x9oeXJgtLvKpDgYHR0tzMnJoQISOzs7zq6urss9PT0LAwMDF0JDQ6mOw9ra2t38/Hzz5OTkHxJ8k0Lc5MDo+3UArsTJZ3K5HOPj469kZmbmsFDbHR0dH+j1+hl6TklJCRkZGdGFh4fH0PP6+vq94uJi8/DwsNh6/0sAt9y18kUAiXxQ/v7+MoZhXktLS8uidk6n82FbW9ul2trab937JSUlBVmt1vORkZGx9LvD4bhfWlpqtlgsvwm8NykIqcNf7mBUsb7E19FoNJ6qr6+vojbb29t/NzY2vt/Q0ECnnz0WGxsbODEx8U50dLSrhFpeXrYlJCRcFAD7BYBrN7uDkXzQOqOzoU+zWCwarVarNRgMF9vb2+nU49OioqKUDMO8HRIScjQ7O/u9hYUFoV1KZwCbJxg9vwDgjNA6U6vVx8bGxlzliZCFhYX5xcTEHJmbm1sXaEvnzysAtryB0eIvAeAS6EO2caoJuJjeSutTAFyL+xDtdwCkqbsViq9T0mHW/ZsArlLacx8IX2C0AV4G8PQBjxqlh34AP3vG4TvwkihrDhCOTkZ0+KBqYo8JXRHQyKkBnPiPR4524CAAnwlXCIzjOc3e9AhKlogXoCspOnnz5jSxYBSPLlaeB/AcAFfZLNHuAvgKwK9i+kkB4/xRjqP6jXSQhJpPKUi4aYToc08MEF8ek9KfRo675qRv7qqTu+6kVLAv28+I7SuQ1E7/AHTQdDZ7M6+KAAAAAElFTkSuQmCC\";\n export default img;","import React from 'react';\r\nimport { Popover, Divider, Input, Button } from 'antd';\r\nimport { PopoverProps } from 'antd/lib/popover';\r\nimport WantedPublishView from '../WantedPublishView';\r\n\r\nimport popClose from '../assets/icon/close@2x.png';\r\nimport styles from './WantedPublishPopover.less';\r\n\r\nexport interface WantedPublishPopoverProp {\r\n popoverConfig?: PopoverProps;\r\n handleConfirm?: Function;\r\n}\r\n\r\nexport interface WantedPublishPopoverState {\r\n visible: boolean;\r\n current_wanted: number|string|null;\r\n}\r\n\r\nexport class WantedPublishPopover extends React.Component<WantedPublishPopoverProp, WantedPublishPopoverState> {\r\n constructor(props: WantedPublishPopoverProp) {\r\n super(props);\r\n this.state = {\r\n visible: false,\r\n\r\n current_wanted: null,\r\n }\r\n }\r\n\r\n handleClose = () => {\r\n const { handleConfirm } = this.props;\r\n if (handleConfirm) {\r\n this.handleUpdateCurrentWanted(this.state.current_wanted, (value: string) => {\r\n handleConfirm(Number(value).toFixed(2));\r\n });\r\n }\r\n this.setState({ visible: false });\r\n }\r\n\r\n clearCurrentWanted = (cb: Function) => {\r\n this.setState({\r\n current_wanted: null,\r\n }, () => cb())\r\n }\r\n\r\n handleUpdateCurrentWanted = (value: string|number|null, afterUpdate?: Function) => {\r\n if (!value) return;\r\n let result: string|number;\r\n result = value;\r\n if (parseInt(`${value}`, 10) === value) {\r\n // 无小数判断\r\n result = Number(value)\r\n }\r\n if (!result) return;\r\n if (result > 10000) result = 10000;\r\n if (result < 5) result = 5;\r\n this.setState({ current_wanted: result }, () => afterUpdate && afterUpdate(result));\r\n }\r\n\r\n renderInitView() {\r\n const { current_wanted } = this.state; \r\n return (\r\n <WantedPublishView\r\n type=\"pop\"\r\n current_wanted={current_wanted}\r\n InputWantedValueChange={(v: string) => this.setState({ current_wanted: v })}\r\n InputWantedPressEnter={(v: string) => this.handleUpdateCurrentWanted(v, this.handleClose)}\r\n InputWantedOnBlur={(v: string) => this.handleUpdateCurrentWanted(v)}\r\n InputWantedClear={() => this.clearCurrentWanted(this.handleClose)}\r\n CloseFunction={this.handleClose}\r\n />\r\n )\r\n }\r\n\r\n render() {\r\n const { children, popoverConfig = {} } = this.props;\r\n\r\n return (\r\n <Popover\r\n placement=\"left\"\r\n trigger=\"click\"\r\n visible={this.state.visible}\r\n onVisibleChange={(value: boolean) => {\r\n if (!value) {\r\n this.handleClose();\r\n }\r\n this.setState({ visible: value });\r\n }}\r\n {...popoverConfig}\r\n content={\r\n <div className={styles.wantedWrapper}>\r\n <div role=\"button\" tabIndex={1} className={styles.closeBtnWrapper}>\r\n <div className={styles.closeBtn} onClick={this.handleClose}>\r\n <img src={popClose} alt=\"close wanted button\"/>\r\n </div>\r\n </div>\r\n {this.renderInitView()}\r\n </div>\r\n }\r\n >\r\n {children}\r\n </Popover>\r\n );\r\n }\r\n}\r\n\r\nexport default WantedPublishPopover;"],"names":["img","WantedPublishPopover","props","handleClose","handleConfirm","_this","handleUpdateCurrentWanted","state","current_wanted","value","Number","toFixed","setState","visible","clearCurrentWanted","cb","afterUpdate","result","parseInt","React","createElement","WantedPublishView","type","InputWantedValueChange","v","_this2","InputWantedPressEnter","InputWantedOnBlur","InputWantedClear","CloseFunction","children","popoverConfig","Popover","Object","assign","placement","trigger","onVisibleChange","_this3","content","className","styles","wantedWrapper","role","tabIndex","closeBtnWrapper","closeBtn","onClick","src","popClose","alt","renderInitView","Component"],"mappings":";;;;;;;;;AAAA,IAAMA,GAAG,GAAG,o1DAAZ;;;;;;;;;;ICkBaC,oBAAb;AAAA;AAAA,0BAAA;;;gCACcC,OAA+B;;;;;8FACnCA;;UAQRC,cAAc,YAAK;UACTC,aADS,GACSC,MAAKH,KAAL,CAAlBE;;UACJA,eAAe;cACZE,0BAA0BD,MAAKE,KAAL,CAAWC,gBAAgB,UAACC,KAAD,EAAkB;AAC1EL,UAAAA,aAAa,CAACM,MAAM,CAACD,KAAD,CAAN,CAAcE,OAAd,CAAsB,CAAtB,CAAD,CAAb;AADF;;;YAIGC,SAAS;AAAEC,QAAAA,OAAO,EAAE;AAAX;AAPhB;;UAUAC,qBAAqB,UAACC,EAAD,EAAiB;YAC/BH,SAAS;AACZJ,QAAAA,cAAc,EAAE;AADJ,SAEX;eAAMO,EAAE;AAFX;AADF;;UAMAT,4BAA4B,UAACG,KAAD,EAA4BO,WAA5B,EAAsD;UAC5E,CAACP,OAAO;UACRQ;AACJA,M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