暂无描述

WantedPublish-761aab8e.js.map 2.2KB

1
  1. {"version":3,"file":"WantedPublish-b91e67a7.js","sources":["../src/components/Payment/BaseClassComponents/WantedPublish.tsx"],"sourcesContent":["import React, { Component } from \"react\";\n\nexport interface WatnedPublishBaseP {\n inputWantedRange?: [number, number];\n handleConfirm?: Function;\n currentWanted?: string | number | null;\n viewConfig?: {\n showInputWantedClear?: boolean;\n viewTextOptions?: {\n viewTitle: string;\n imgLabelBottom: string;\n inputTipTop: string;\n numberSuffix: string;\n inputTipBottom: string;\n clearModalTitle?: string;\n clearModalTip?: string;\n };\n };\n}\n\nexport class WatnedPublishBase<\n T extends WatnedPublishBaseP,\n S\n> extends Component<T, S> {\n formatCurrentWanted = (\n value: string | number | null\n ): string | number | null => {\n const { inputWantedRange = [5, 10000] } = this.props;\n if (!value) return null;\n let result: string | number;\n result = value;\n if (parseInt(`${value}`, 10) === value) {\n // 无小数判断\n result = Number(value);\n }\n if (!result) return null;\n if (result > inputWantedRange[1]) result = inputWantedRange[1];\n if (result < inputWantedRange[0]) result = inputWantedRange[0];\n return result;\n };\n\n formatResult = (value: string | number | null) => {\n if (!value) return null;\n return Number(value).toFixed(2);\n };\n}\n"],"names":["WatnedPublishBase","formatCurrentWanted","value","_this","props","inputWantedRange","result","parseInt","Number","formatResult","toFixed","Component"],"mappings":";;;;;;;;IAoBaA,iBAAb;AAAA;AAAA,oBAAA;;;+BAAA;;;;;;;UAIEC,sBAAsB,UACpBC,KADoB,EAEM;kCACgBC,MAAKC,KAAL,CAAlCC;UAAAA,gBADkB,sCACC,CAAC,CAAD,EAAI,KAAJ;UACvB,CAACH,OAAO,OAAO,IAAP;UACRI;AACJA,MAAAA,MAAM,GAAGJ,KAAT;;UACIK,QAAQ,WAAIL,MAAJ,EAAa,EAAb,CAAR,KAA6BA,OAAO;AAEtCI,QAAAA,MAAM,GAAGE,MAAM,CAACN,KAAD,CAAf;;;UAEE,CAACI,QAAQ,OAAO,IAAP;UACTA,MAAM,GAAGD,gBAAgB,CAAC,CAAD,GAAKC,MAAM,GAAGD,gBAAgB,CAAC,CAAD,CAAzB;UAC9BC,MAAM,GAAGD,gBAAgB,CAAC,CAAD,GAAKC,MAAM,GAAGD,gBAAgB,CAAC,CAAD,CAAzB;aAC3BC;AAdT;;UAiBAG,eAAe,UAACP,KAAD,EAAkC;UAC3C,CAACA,OAAO,OAAO,IAAP;aACLM,MAAM,CAACN,KAAD,CAAN,CAAcQ,OAAd,CAAsB,CAAtB;AAFT;;;;;;CArBF,CAGUC,eAHV;;;;"}