No Description

index.js.map 8.5KB

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 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?: {\r\n placement?: \"left\" | \"top\" | \"right\" | \"bottom\" | \"topLeft\" | \"topRight\" | \"bottomLeft\" | \"bottomRight\" | \"leftTop\" | \"leftBottom\" | \"rightTop\" | \"rightBottom\" | undefined;\r\n trigger?: \"hover\" | \"focus\" | \"click\" | \"contextMenu\" | undefined;\r\n getPopupContainer?: any;\r\n };\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.wanted_wrapper}>\r\n <div className={styles.close_btn}>\r\n <button onClick={this.handleClose}>\r\n <img src={popClose} alt=\"close wanted button\"/>\r\n </button>\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","handleUpdateCurrentWanted","state","current_wanted","value","Number","toFixed","setState","visible","clearCurrentWanted","cb","afterUpdate","result","parseInt","React","createElement","WantedPublishView","type","InputWantedValueChange","v","InputWantedPressEnter","InputWantedOnBlur","InputWantedClear","CloseFunction","children","popoverConfig","Popover","Object","assign","placement","trigger","onVisibleChange","content","className","styles","wanted_wrapper","close_btn","onClick","src","popClose","alt","renderInitView","Component"],"mappings":";;;;;;;;AAAA,MAAMA,GAAG,GAAG,o1DAAZ;;;;;;;;;;;ICqBaC,oBAAb;AAAA;AAAA;AAAA;;AACE,gCAAYC,KAAZ,EAA2C;AAAA;;AAAA;;8FACnCA;;UAQRC,cAAc,YAAK;AAAA,UACTC,aADS,GACS,MAAKF,KADd,CACTE,aADS;;UAEbA,eAAe;cACZC,0BAA0B,MAAKC,KAAL,CAAWC,gBAAiB,UAAAC,KAAD,EAAkB;AAC1EJ,UAAAA,aAAa,CAACK,MAAM,CAACD,KAAD,CAAN,CAAcE,OAAd,CAAsB,CAAtB,CAAD,CAAb;AADF;;;YAIGC,SAAS;AAAEC,QAAAA,OAAO,EAAE;AAAX;AAPhB;;UAUAC,qBAAsB,UAAAC,EAAD,EAAiB;YAC/BH,SAAS;AACZJ,QAAAA,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