소스 검색

dev: antd样式调整

Roxas 4 년 전
부모
커밋
9ede3e3db4

+ 3
- 3
eslib/BraftEditor/index.js 파일 보기

@@ -28999,10 +28999,11 @@ var emotionOptions = {
28999 28999
 
29000 29000
 };
29001 29001
 BraftEditor.use(Emoticon(emotionOptions));
29002
-var BarftEditorPage = function BarftEditorPage() {
29002
+var BarftEditorPage = function BarftEditorPage(_ref) {
29003
+  var value = _ref.value;
29003 29004
   var controls = ["bold", "italic", "underline", "separator", "link", "emoji", "separator", "media"];
29004 29005
 
29005
-  var _useState = useState(BraftEditor.createEditorState("<p>Hello <b>World!</b></p>")),
29006
+  var _useState = useState(BraftEditor.createEditorState(value || "<p>Hello <b>World!</b></p>")),
29006 29007
       _useState2 = _slicedToArray(_useState, 2),
29007 29008
       editorState = _useState2[0],
29008 29009
       setEditorState = _useState2[1];
@@ -29014,7 +29015,6 @@ var BarftEditorPage = function BarftEditorPage() {
29014 29015
     onChange: setEditorState,
29015 29016
     controls: controls,
29016 29017
     contentStyle: {
29017
-      height: 210,
29018 29018
       boxShadow: "inset 0 1px 3px rgba(0,0,0,.1)"
29019 29019
     }
29020 29020
   }));

+ 1
- 1
eslib/BraftEditor/index.js.map
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 1
- 0
eslib/Payment/index.js 파일 보기

@@ -6,6 +6,7 @@ import '../utils-82346768.js';
6 6
 export { default as ConsumeListView } from '../ConsumeListView/index.js';
7 7
 export { default as PayPlatformOptions } from '../PayPlatformOptions/index.js';
8 8
 import 'antd';
9
+import 'antd/lib/button/style';
9 10
 export { default as PriceOptions } from '../PriceOptions/index.js';
10 11
 export { default as WaitPayInfoView } from '../WaitPayInfoView/index.js';
11 12
 //# sourceMappingURL=index.js.map

+ 1
- 1
eslib/Payment/index.js.map 파일 보기

@@ -1 +1 @@
1
-{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
1
+{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}

+ 1
- 0
eslib/PriceOptions/index.js 파일 보기

@@ -4,6 +4,7 @@ import { c as classnames } from '../index-7951fb2f.js';
4 4
 import { s as styleInject } from '../style-inject.es-1f59c1d0.js';
5 5
 import { f as formatMoney } from '../utils-82346768.js';
6 6
 import { Input } from 'antd';
7
+import 'antd/lib/button/style';
7 8
 
8 9
 var css = ".PriceOptions_options__J-ZSS {\n  padding: 20px 50px;\n  border-bottom: 1px dashed #00000017;\n}\n.PriceOptions_options__J-ZSS p {\n  font-size: 14px;\n  font-weight: 400;\n  color: #616a79;\n  margin-bottom: 20px;\n}\n.PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a {\n  padding-right: 0;\n  margin-bottom: -12px;\n}\n.PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a .PriceOptions_priceItem__rJ9o2 {\n  background: rgba(243, 243, 243, 0.14);\n  border-radius: 4px;\n  border: 1px solid #cfcfcf;\n  font-size: 14px;\n  font-weight: 600;\n  color: #616a79;\n  display: inline-block;\n  text-align: center;\n  vertical-align: top;\n  height: 30px;\n  width: 70px;\n  line-height: 30px;\n  cursor: pointer;\n  margin: 6px;\n}\n.PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a .PriceOptions_priceItem__rJ9o2.PriceOptions_active__3WyAU {\n  background: rgba(255, 50, 102, 0.1);\n  border-radius: 4px;\n  border: 1px solid #ff3266;\n  color: #616a79;\n}\n.PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a .PriceOptions_priceInput__1MrVy {\n  display: inline-block;\n  min-width: 70px;\n  width: auto;\n  margin: 6px;\n  text-align: center;\n}\n.PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a button {\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n  height: 30px;\n  width: 50px;\n  vertical-align: top;\n  padding: 0 5px;\n}\n.PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a .PriceOptions_rate__QgHQ3 {\n  margin-left: 10px;\n}\n.PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a .PriceOptions_rate__QgHQ3 i {\n  margin-right: 5px;\n  color: #1790FF;\n}\n.PriceOptions_options__J-ZSS.PriceOptions_small__2-wzl {\n  padding: 0 0 12px 0;\n  border-bottom: none;\n}\n.PriceOptions_options__J-ZSS.PriceOptions_small__2-wzl p {\n  margin-bottom: 8px;\n}\n.PriceOptions_options__J-ZSS.PriceOptions_small__2-wzl .PriceOptions_infoItem__3IL3a {\n  text-align: center;\n}\n.PriceOptions_options__J-ZSS.PriceOptions_small__2-wzl .PriceOptions_infoItem__3IL3a .PriceOptions_priceItem__rJ9o2 {\n  border-radius: 6px;\n  height: 32px;\n  width: 72px;\n  margin: 0 0 12px 19px;\n}\n.PriceOptions_options__J-ZSS.PriceOptions_small__2-wzl .PriceOptions_infoItem__3IL3a .PriceOptions_priceItem__rJ9o2:first-child {\n  margin: 0 0 12px 0px;\n}\n.PriceOptions_options__J-ZSS.PriceOptions_small__2-wzl .PriceOptions_infoItem__3IL3a .PriceOptions_priceInput__1MrVy {\n  display: block;\n  width: 254px;\n  border-radius: 6px;\n  height: 32px;\n}\n@media (max-width: 768px) {\n  .PriceOptions_options__J-ZSS {\n    padding: 20px 20px;\n  }\n  .PriceOptions_options__J-ZSS p {\n    font-size: 14px;\n    font-weight: 400;\n    color: #616a79;\n  }\n  .PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a {\n    padding-right: 0;\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n  }\n  .PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a .PriceOptions_priceBtn__Xz4m_ {\n    display: flex;\n    justify-content: space-between;\n  }\n  .PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a .PriceOptions_priceItem__rJ9o2 {\n    display: inline-block;\n    background-color: #fff;\n    width: 74px;\n    height: 36px;\n    line-height: 36px;\n    border-radius: 6px;\n    border: 1px solid #cfcfcf;\n  }\n  .PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a .PriceOptions_priceItem__rJ9o2.PriceOptions_active__3WyAU {\n    background-color: #fff;\n    color: #FF3266FF;\n    border-radius: 4px;\n    border: 1px solid #ff3266;\n  }\n  .PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a .PriceOptions_priceInput__1MrVy {\n    border-radius: 6px;\n    height: 36px;\n    width: auto;\n  }\n}\n";
9 10
 var styles = {"options":"PriceOptions_options__J-ZSS","infoItem":"PriceOptions_infoItem__3IL3a","priceItem":"PriceOptions_priceItem__rJ9o2","active":"PriceOptions_active__3WyAU","priceInput":"PriceOptions_priceInput__1MrVy","rate":"PriceOptions_rate__QgHQ3","small":"PriceOptions_small__2-wzl","priceBtn":"PriceOptions_priceBtn__Xz4m_"};

+ 1
- 1
eslib/PriceOptions/index.js.map 파일 보기

@@ -1 +1 @@
1
-{"version":3,"file":"index.js","sources":["../../src/components/Payment/PriceOptions/index.tsx"],"sourcesContent":["import React, { useState } from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { Input } from 'antd';\r\nimport { formatMoney } from \"../Utils/utils\";\r\n\r\nimport styles from \"./PriceOptions.less\";\r\n\r\ninterface Props {\r\n  price: number;\r\n  onPriceChange: (v: number) => void;\r\n  size: \"small\" | \"normal\" | \"large\";\r\n  focusScroll: boolean;\r\n  withTitle: boolean;\r\n  titleText: string;\r\n  inputRef: React.RefObject<any>;\r\n}\r\n\r\nconst PriceOptions = ({\r\n  price,\r\n  onPriceChange,\r\n  size = \"normal\",\r\n  focusScroll = true,\r\n  withTitle = true,\r\n  titleText = \"Price\",\r\n  inputRef\r\n}: Props) => {\r\n  const defaultOptions = [100, 600, 800];\r\n  // 控制是否为其他金额输入情况\r\n  const [inputStatus, setInputStatus] = useState(false);\r\n\r\n  return (\r\n    <div\r\n      className={classnames(styles.options)}\r\n    >\r\n      {withTitle ? (\r\n        <p>\r\n          {titleText}\r\n        </p>\r\n      ) : null}\r\n      <div className={styles.infoItem}>\r\n        <span className={styles.priceBtn}>\r\n          {defaultOptions.map(item => (\r\n            <span\r\n              className={classnames({\r\n                [styles.priceItem]: true,\r\n                [styles.active]: price === item && !inputStatus\r\n              })}\r\n              key={item}\r\n              onClick={() => {\r\n                onPriceChange(item);\r\n                setInputStatus(false);\r\n              }}\r\n            >\r\n              {formatMoney(item/100, 0)}¥\r\n            </span>\r\n          ))}\r\n        </span>\r\n        <Input\r\n          ref={inputRef}\r\n          onMouseEnter={() => {\r\n            if (inputStatus && inputRef && inputRef.current) {\r\n              inputRef.current.focus();\r\n              inputRef.current.select();\r\n            }\r\n          }}\r\n          suffix=\"¥\"\r\n          className={styles.priceInput}\r\n          value={inputStatus ? price / 100 || \"\" : \"\"}\r\n          placeholder=\"Others\"\r\n          onChange={e => {\r\n            const n = +e.target.value;\r\n            if (Number.isNaN(n)) {\r\n              return;\r\n            }\r\n            // 测试暂时改成1分\r\n            onPriceChange(n * 100);\r\n          }}\r\n          onClick={e => {\r\n            onPriceChange(0);\r\n            setInputStatus(true);\r\n          }}\r\n          onFocus={e => {\r\n            if (focusScroll) {\r\n              e.target.scrollIntoView();\r\n            }\r\n          }}\r\n        />\r\n      </div>\r\n    </div>\r\n  );\r\n};\r\n\r\nexport default PriceOptions;\r\n"],"names":["PriceOptions","price","onPriceChange","size","focusScroll","withTitle","titleText","inputRef","defaultOptions","useState","inputStatus","setInputStatus","classnames","styles","options","infoItem","priceBtn","map","item","priceItem","active","formatMoney","current","focus","select","priceInput","e","n","target","value","Number","isNaN","scrollIntoView"],"mappings":";;;;;;;;;;;AAiBA,IAAMA,YAAY,GAAG,SAAfA,YAAe,OAQR;MAPXC,KAOW,QAPXA,KAOW;MANXC,aAMW,QANXA,aAMW;uBALXC,IAKW;MALXA,wBACAC,WAIW;MAJXA,WAIW,iCAJG,IAIH;4BAHXC,SAGW;MAHXA,SAGW,+BAHC,IAGD;4BAFXC,SAEW;MAFXA,SAEW,+BAFC,OAED;MADXC,QACW,QADXA,QACW;MACLC,cAAc,GAAG,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,CAAvB,CADW;;kBAG2BC,QAAQ,CAAC,KAAD,CAHnC;;MAGJC,WAHI;MAGSC,cAHT;;SAMT;IACE,SAAS,EAAEC,UAAU,CAACC,MAAM,CAACC,OAAR;KAEpBT,SAAS,GACR,+BACGC,SADH,CADQ,GAIN,IAPN,EAQE;IAAK,SAAS,EAAEO,MAAM,CAACE;KACrB;IAAM,SAAS,EAAEF,MAAM,CAACG;KACrBR,cAAc,CAACS,GAAf,CAAmB,UAAAC,IAAI;;;WACtB;MACE,SAAS,EAAEN,UAAU,iDAClBC,MAAM,CAACM,SADW,EACC,IADD,gCAElBN,MAAM,CAACO,MAFW,EAEFnB,KAAK,KAAKiB,IAAV,IAAkB,CAACR,WAFjB,gBADvB;MAKE,GAAG,EAAEQ,IALP;MAME,OAAO,EAAE,mBAAM;QACbhB,aAAa,CAACgB,IAAD,CAAb;QACAP,cAAc,CAAC,KAAD,CAAd;;OAGDU,WAAW,CAACH,IAAI,GAAC,GAAN,EAAW,CAAX,CAXd,SADsB;GAAvB,CADH,CADF,EAkBE,oBAAC,KAAD;IACE,GAAG,EAAEX,QADP;IAEE,YAAY,EAAE,wBAAM;UACdG,WAAW,IAAIH,QAAf,IAA2BA,QAAQ,CAACe,OAAxC,EAAiD;QAC/Cf,QAAQ,CAACe,OAAT,CAAiBC,KAAjB;QACAhB,QAAQ,CAACe,OAAT,CAAiBE,MAAjB;;KALN;IAQE,MAAM,EAAC,MART;IASE,SAAS,EAAEX,MAAM,CAACY,UATpB;IAUE,KAAK,EAAEf,WAAW,GAAGT,KAAK,GAAG,GAAR,IAAe,EAAlB,GAAuB,EAV3C;IAWE,WAAW,EAAC,QAXd;IAYE,QAAQ,EAAE,kBAAAyB,CAAC,EAAI;UACPC,CAAC,GAAG,CAACD,CAAC,CAACE,MAAF,CAASC,KAApB;;UACIC,MAAM,CAACC,KAAP,CAAaJ,CAAb,CAAJ,EAAqB;;OAFR;;;MAMbzB,aAAa,CAACyB,CAAC,GAAG,GAAL,CAAb;KAlBJ;IAoBE,OAAO,EAAE,iBAAAD,CAAC,EAAI;MACZxB,aAAa,CAAC,CAAD,CAAb;MACAS,cAAc,CAAC,IAAD,CAAd;KAtBJ;IAwBE,OAAO,EAAE,iBAAAe,CAAC,EAAI;UACRtB,WAAJ,EAAiB;QACfsB,CAAC,CAACE,MAAF,CAASI,cAAT;;;IA5CR,CARF,CADF;CAbF;;;;"}
1
+{"version":3,"file":"index.js","sources":["../../src/components/Payment/PriceOptions/index.tsx"],"sourcesContent":["import React, { useState } from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { Input } from 'antd';\r\nimport { formatMoney } from \"../Utils/utils\";\r\nimport 'antd/lib/button/style';\r\nimport styles from \"./PriceOptions.less\";\r\n\r\ninterface Props {\r\n  price: number;\r\n  onPriceChange: (v: number) => void;\r\n  size: \"small\" | \"normal\" | \"large\";\r\n  focusScroll: boolean;\r\n  withTitle: boolean;\r\n  titleText?: string;\r\n  inputRef: React.RefObject<any>;\r\n}\r\n\r\nconst PriceOptions = ({\r\n  price,\r\n  onPriceChange,\r\n  size = \"normal\",\r\n  focusScroll = true,\r\n  withTitle = true,\r\n  titleText = \"Price\",\r\n  inputRef\r\n}: Props) => {\r\n  const defaultOptions = [100, 600, 800];\r\n  // 控制是否为其他金额输入情况\r\n  const [inputStatus, setInputStatus] = useState(false);\r\n\r\n  return (\r\n    <div\r\n      className={classnames(styles.options)}\r\n    >\r\n      {withTitle ? (\r\n        <p>\r\n          {titleText}\r\n        </p>\r\n      ) : null}\r\n      <div className={styles.infoItem}>\r\n        <span className={styles.priceBtn}>\r\n          {defaultOptions.map(item => (\r\n            <span\r\n              className={classnames({\r\n                [styles.priceItem]: true,\r\n                [styles.active]: price === item && !inputStatus\r\n              })}\r\n              key={item}\r\n              onClick={() => {\r\n                onPriceChange(item);\r\n                setInputStatus(false);\r\n              }}\r\n            >\r\n              {formatMoney(item/100, 0)}¥\r\n            </span>\r\n          ))}\r\n        </span>\r\n        <Input\r\n          ref={inputRef}\r\n          onMouseEnter={() => {\r\n            if (inputStatus && inputRef && inputRef.current) {\r\n              inputRef.current.focus();\r\n              inputRef.current.select();\r\n            }\r\n          }}\r\n          suffix=\"¥\"\r\n          className={styles.priceInput}\r\n          value={inputStatus ? price / 100 || \"\" : \"\"}\r\n          placeholder=\"Others\"\r\n          onChange={e => {\r\n            const n = +e.target.value;\r\n            if (Number.isNaN(n)) {\r\n              return;\r\n            }\r\n            // 测试暂时改成1分\r\n            onPriceChange(n * 100);\r\n          }}\r\n          onClick={e => {\r\n            onPriceChange(0);\r\n            setInputStatus(true);\r\n          }}\r\n          onFocus={e => {\r\n            if (focusScroll) {\r\n              e.target.scrollIntoView();\r\n            }\r\n          }}\r\n        />\r\n      </div>\r\n    </div>\r\n  );\r\n};\r\n\r\nexport default PriceOptions;\r\n"],"names":["PriceOptions","price","onPriceChange","size","focusScroll","withTitle","titleText","inputRef","defaultOptions","useState","inputStatus","setInputStatus","classnames","styles","options","infoItem","priceBtn","map","item","priceItem","active","formatMoney","current","focus","select","priceInput","e","n","target","value","Number","isNaN","scrollIntoView"],"mappings":";;;;;;;;;;;;AAiBA,IAAMA,YAAY,GAAG,SAAfA,YAAe,OAQR;MAPXC,KAOW,QAPXA,KAOW;MANXC,aAMW,QANXA,aAMW;uBALXC,IAKW;MALXA,wBACAC,WAIW;MAJXA,WAIW,iCAJG,IAIH;4BAHXC,SAGW;MAHXA,SAGW,+BAHC,IAGD;4BAFXC,SAEW;MAFXA,SAEW,+BAFC,OAED;MADXC,QACW,QADXA,QACW;MACLC,cAAc,GAAG,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,CAAvB,CADW;;kBAG2BC,QAAQ,CAAC,KAAD,CAHnC;;MAGJC,WAHI;MAGSC,cAHT;;SAMT;IACE,SAAS,EAAEC,UAAU,CAACC,MAAM,CAACC,OAAR;KAEpBT,SAAS,GACR,+BACGC,SADH,CADQ,GAIN,IAPN,EAQE;IAAK,SAAS,EAAEO,MAAM,CAACE;KACrB;IAAM,SAAS,EAAEF,MAAM,CAACG;KACrBR,cAAc,CAACS,GAAf,CAAmB,UAAAC,IAAI;;;WACtB;MACE,SAAS,EAAEN,UAAU,iDAClBC,MAAM,CAACM,SADW,EACC,IADD,gCAElBN,MAAM,CAACO,MAFW,EAEFnB,KAAK,KAAKiB,IAAV,IAAkB,CAACR,WAFjB,gBADvB;MAKE,GAAG,EAAEQ,IALP;MAME,OAAO,EAAE,mBAAM;QACbhB,aAAa,CAACgB,IAAD,CAAb;QACAP,cAAc,CAAC,KAAD,CAAd;;OAGDU,WAAW,CAACH,IAAI,GAAC,GAAN,EAAW,CAAX,CAXd,SADsB;GAAvB,CADH,CADF,EAkBE,oBAAC,KAAD;IACE,GAAG,EAAEX,QADP;IAEE,YAAY,EAAE,wBAAM;UACdG,WAAW,IAAIH,QAAf,IAA2BA,QAAQ,CAACe,OAAxC,EAAiD;QAC/Cf,QAAQ,CAACe,OAAT,CAAiBC,KAAjB;QACAhB,QAAQ,CAACe,OAAT,CAAiBE,MAAjB;;KALN;IAQE,MAAM,EAAC,MART;IASE,SAAS,EAAEX,MAAM,CAACY,UATpB;IAUE,KAAK,EAAEf,WAAW,GAAGT,KAAK,GAAG,GAAR,IAAe,EAAlB,GAAuB,EAV3C;IAWE,WAAW,EAAC,QAXd;IAYE,QAAQ,EAAE,kBAAAyB,CAAC,EAAI;UACPC,CAAC,GAAG,CAACD,CAAC,CAACE,MAAF,CAASC,KAApB;;UACIC,MAAM,CAACC,KAAP,CAAaJ,CAAb,CAAJ,EAAqB;;OAFR;;;MAMbzB,aAAa,CAACyB,CAAC,GAAG,GAAL,CAAb;KAlBJ;IAoBE,OAAO,EAAE,iBAAAD,CAAC,EAAI;MACZxB,aAAa,CAAC,CAAD,CAAb;MACAS,cAAc,CAAC,IAAD,CAAd;KAtBJ;IAwBE,OAAO,EAAE,iBAAAe,CAAC,EAAI;UACRtB,WAAJ,EAAiB;QACfsB,CAAC,CAACE,MAAF,CAASI,cAAT;;;IA5CR,CARF,CADF;CAbF;;;;"}

+ 1
- 0
eslib/index.js 파일 보기

@@ -7,6 +7,7 @@ import './utils-82346768.js';
7 7
 export { default as ConsumeListView } from './ConsumeListView/index.js';
8 8
 export { default as PayPlatformOptions } from './PayPlatformOptions/index.js';
9 9
 import 'antd';
10
+import 'antd/lib/button/style';
10 11
 export { default as PriceOptions } from './PriceOptions/index.js';
11 12
 export { default as WaitPayInfoView } from './WaitPayInfoView/index.js';
12 13
 

+ 1
- 1
eslib/index.js.map
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 3
- 3
lib/BraftEditor/index.js 파일 보기

@@ -29006,10 +29006,11 @@ var emotionOptions = {
29006 29006
 
29007 29007
 };
29008 29008
 BraftEditor.use(Emoticon(emotionOptions));
29009
-var BarftEditorPage = function BarftEditorPage() {
29009
+var BarftEditorPage = function BarftEditorPage(_ref) {
29010
+  var value = _ref.value;
29010 29011
   var controls = ["bold", "italic", "underline", "separator", "link", "emoji", "separator", "media"];
29011 29012
 
29012
-  var _useState = React.useState(BraftEditor.createEditorState("<p>Hello <b>World!</b></p>")),
29013
+  var _useState = React.useState(BraftEditor.createEditorState(value || "<p>Hello <b>World!</b></p>")),
29013 29014
       _useState2 = _commonjsHelpers._slicedToArray(_useState, 2),
29014 29015
       editorState = _useState2[0],
29015 29016
       setEditorState = _useState2[1];
@@ -29021,7 +29022,6 @@ var BarftEditorPage = function BarftEditorPage() {
29021 29022
     onChange: setEditorState,
29022 29023
     controls: controls,
29023 29024
     contentStyle: {
29024
-      height: 210,
29025 29025
       boxShadow: "inset 0 1px 3px rgba(0,0,0,.1)"
29026 29026
     }
29027 29027
   }));

+ 1
- 1
lib/BraftEditor/index.js.map
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 1
- 0
lib/Payment/index.js 파일 보기

@@ -10,6 +10,7 @@ require('../utils-ed518bfc.js');
10 10
 var ConsumeListView = require('../ConsumeListView/index.js');
11 11
 var PayPlatformOptions = require('../PayPlatformOptions/index.js');
12 12
 require('antd');
13
+require('antd/lib/button/style');
13 14
 var PriceOptions = require('../PriceOptions/index.js');
14 15
 var WaitPayInfoView = require('../WaitPayInfoView/index.js');
15 16
 

+ 1
- 1
lib/Payment/index.js.map 파일 보기

@@ -1 +1 @@
1
-{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
1
+{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}

+ 1
- 0
lib/PriceOptions/index.js 파일 보기

@@ -11,6 +11,7 @@ var index = require('../index-c2424ad4.js');
11 11
 var styleInject_es = require('../style-inject.es-dcee06b6.js');
12 12
 var utils = require('../utils-ed518bfc.js');
13 13
 var antd = require('antd');
14
+require('antd/lib/button/style');
14 15
 
15 16
 var css = ".PriceOptions_options__J-ZSS {\n  padding: 20px 50px;\n  border-bottom: 1px dashed #00000017;\n}\n.PriceOptions_options__J-ZSS p {\n  font-size: 14px;\n  font-weight: 400;\n  color: #616a79;\n  margin-bottom: 20px;\n}\n.PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a {\n  padding-right: 0;\n  margin-bottom: -12px;\n}\n.PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a .PriceOptions_priceItem__rJ9o2 {\n  background: rgba(243, 243, 243, 0.14);\n  border-radius: 4px;\n  border: 1px solid #cfcfcf;\n  font-size: 14px;\n  font-weight: 600;\n  color: #616a79;\n  display: inline-block;\n  text-align: center;\n  vertical-align: top;\n  height: 30px;\n  width: 70px;\n  line-height: 30px;\n  cursor: pointer;\n  margin: 6px;\n}\n.PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a .PriceOptions_priceItem__rJ9o2.PriceOptions_active__3WyAU {\n  background: rgba(255, 50, 102, 0.1);\n  border-radius: 4px;\n  border: 1px solid #ff3266;\n  color: #616a79;\n}\n.PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a .PriceOptions_priceInput__1MrVy {\n  display: inline-block;\n  min-width: 70px;\n  width: auto;\n  margin: 6px;\n  text-align: center;\n}\n.PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a button {\n  border-top-left-radius: 0;\n  border-bottom-left-radius: 0;\n  height: 30px;\n  width: 50px;\n  vertical-align: top;\n  padding: 0 5px;\n}\n.PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a .PriceOptions_rate__QgHQ3 {\n  margin-left: 10px;\n}\n.PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a .PriceOptions_rate__QgHQ3 i {\n  margin-right: 5px;\n  color: #1790FF;\n}\n.PriceOptions_options__J-ZSS.PriceOptions_small__2-wzl {\n  padding: 0 0 12px 0;\n  border-bottom: none;\n}\n.PriceOptions_options__J-ZSS.PriceOptions_small__2-wzl p {\n  margin-bottom: 8px;\n}\n.PriceOptions_options__J-ZSS.PriceOptions_small__2-wzl .PriceOptions_infoItem__3IL3a {\n  text-align: center;\n}\n.PriceOptions_options__J-ZSS.PriceOptions_small__2-wzl .PriceOptions_infoItem__3IL3a .PriceOptions_priceItem__rJ9o2 {\n  border-radius: 6px;\n  height: 32px;\n  width: 72px;\n  margin: 0 0 12px 19px;\n}\n.PriceOptions_options__J-ZSS.PriceOptions_small__2-wzl .PriceOptions_infoItem__3IL3a .PriceOptions_priceItem__rJ9o2:first-child {\n  margin: 0 0 12px 0px;\n}\n.PriceOptions_options__J-ZSS.PriceOptions_small__2-wzl .PriceOptions_infoItem__3IL3a .PriceOptions_priceInput__1MrVy {\n  display: block;\n  width: 254px;\n  border-radius: 6px;\n  height: 32px;\n}\n@media (max-width: 768px) {\n  .PriceOptions_options__J-ZSS {\n    padding: 20px 20px;\n  }\n  .PriceOptions_options__J-ZSS p {\n    font-size: 14px;\n    font-weight: 400;\n    color: #616a79;\n  }\n  .PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a {\n    padding-right: 0;\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n  }\n  .PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a .PriceOptions_priceBtn__Xz4m_ {\n    display: flex;\n    justify-content: space-between;\n  }\n  .PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a .PriceOptions_priceItem__rJ9o2 {\n    display: inline-block;\n    background-color: #fff;\n    width: 74px;\n    height: 36px;\n    line-height: 36px;\n    border-radius: 6px;\n    border: 1px solid #cfcfcf;\n  }\n  .PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a .PriceOptions_priceItem__rJ9o2.PriceOptions_active__3WyAU {\n    background-color: #fff;\n    color: #FF3266FF;\n    border-radius: 4px;\n    border: 1px solid #ff3266;\n  }\n  .PriceOptions_options__J-ZSS .PriceOptions_infoItem__3IL3a .PriceOptions_priceInput__1MrVy {\n    border-radius: 6px;\n    height: 36px;\n    width: auto;\n  }\n}\n";
16 17
 var styles = {"options":"PriceOptions_options__J-ZSS","infoItem":"PriceOptions_infoItem__3IL3a","priceItem":"PriceOptions_priceItem__rJ9o2","active":"PriceOptions_active__3WyAU","priceInput":"PriceOptions_priceInput__1MrVy","rate":"PriceOptions_rate__QgHQ3","small":"PriceOptions_small__2-wzl","priceBtn":"PriceOptions_priceBtn__Xz4m_"};

+ 1
- 1
lib/PriceOptions/index.js.map 파일 보기

@@ -1 +1 @@
1
-{"version":3,"file":"index.js","sources":["../../src/components/Payment/PriceOptions/index.tsx"],"sourcesContent":["import React, { useState } from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { Input } from 'antd';\r\nimport { formatMoney } from \"../Utils/utils\";\r\n\r\nimport styles from \"./PriceOptions.less\";\r\n\r\ninterface Props {\r\n  price: number;\r\n  onPriceChange: (v: number) => void;\r\n  size: \"small\" | \"normal\" | \"large\";\r\n  focusScroll: boolean;\r\n  withTitle: boolean;\r\n  titleText: string;\r\n  inputRef: React.RefObject<any>;\r\n}\r\n\r\nconst PriceOptions = ({\r\n  price,\r\n  onPriceChange,\r\n  size = \"normal\",\r\n  focusScroll = true,\r\n  withTitle = true,\r\n  titleText = \"Price\",\r\n  inputRef\r\n}: Props) => {\r\n  const defaultOptions = [100, 600, 800];\r\n  // 控制是否为其他金额输入情况\r\n  const [inputStatus, setInputStatus] = useState(false);\r\n\r\n  return (\r\n    <div\r\n      className={classnames(styles.options)}\r\n    >\r\n      {withTitle ? (\r\n        <p>\r\n          {titleText}\r\n        </p>\r\n      ) : null}\r\n      <div className={styles.infoItem}>\r\n        <span className={styles.priceBtn}>\r\n          {defaultOptions.map(item => (\r\n            <span\r\n              className={classnames({\r\n                [styles.priceItem]: true,\r\n                [styles.active]: price === item && !inputStatus\r\n              })}\r\n              key={item}\r\n              onClick={() => {\r\n                onPriceChange(item);\r\n                setInputStatus(false);\r\n              }}\r\n            >\r\n              {formatMoney(item/100, 0)}¥\r\n            </span>\r\n          ))}\r\n        </span>\r\n        <Input\r\n          ref={inputRef}\r\n          onMouseEnter={() => {\r\n            if (inputStatus && inputRef && inputRef.current) {\r\n              inputRef.current.focus();\r\n              inputRef.current.select();\r\n            }\r\n          }}\r\n          suffix=\"¥\"\r\n          className={styles.priceInput}\r\n          value={inputStatus ? price / 100 || \"\" : \"\"}\r\n          placeholder=\"Others\"\r\n          onChange={e => {\r\n            const n = +e.target.value;\r\n            if (Number.isNaN(n)) {\r\n              return;\r\n            }\r\n            // 测试暂时改成1分\r\n            onPriceChange(n * 100);\r\n          }}\r\n          onClick={e => {\r\n            onPriceChange(0);\r\n            setInputStatus(true);\r\n          }}\r\n          onFocus={e => {\r\n            if (focusScroll) {\r\n              e.target.scrollIntoView();\r\n            }\r\n          }}\r\n        />\r\n      </div>\r\n    </div>\r\n  );\r\n};\r\n\r\nexport default PriceOptions;\r\n"],"names":["PriceOptions","price","onPriceChange","size","focusScroll","withTitle","titleText","inputRef","defaultOptions","useState","inputStatus","setInputStatus","React","classnames","styles","options","infoItem","priceBtn","map","item","priceItem","active","formatMoney","Input","current","focus","select","priceInput","e","n","target","value","Number","isNaN","scrollIntoView"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,IAAMA,YAAY,GAAG,SAAfA,YAAe,OAQR;MAPXC,KAOW,QAPXA,KAOW;MANXC,aAMW,QANXA,aAMW;uBALXC,IAKW;MALXA,wBACAC,WAIW;MAJXA,WAIW,iCAJG,IAIH;4BAHXC,SAGW;MAHXA,SAGW,+BAHC,IAGD;4BAFXC,SAEW;MAFXA,SAEW,+BAFC,OAED;MADXC,QACW,QADXA,QACW;MACLC,cAAc,GAAG,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,CAAvB,CADW;;kBAG2BC,cAAQ,CAAC,KAAD,CAHnC;;MAGJC,WAHI;MAGSC,cAHT;;SAMTC;IACE,SAAS,EAAEC,gBAAU,CAACC,MAAM,CAACC,OAAR;KAEpBV,SAAS,GACRO,wCACGN,SADH,CADQ,GAIN,IAPN,EAQEM;IAAK,SAAS,EAAEE,MAAM,CAACE;KACrBJ;IAAM,SAAS,EAAEE,MAAM,CAACG;KACrBT,cAAc,CAACU,GAAf,CAAmB,UAAAC,IAAI;;;WACtBP;MACE,SAAS,EAAEC,gBAAU,kEAClBC,MAAM,CAACM,SADW,EACC,IADD,iDAElBN,MAAM,CAACO,MAFW,EAEFpB,KAAK,KAAKkB,IAAV,IAAkB,CAACT,WAFjB,gBADvB;MAKE,GAAG,EAAES,IALP;MAME,OAAO,EAAE,mBAAM;QACbjB,aAAa,CAACiB,IAAD,CAAb;QACAR,cAAc,CAAC,KAAD,CAAd;;OAGDW,iBAAW,CAACH,IAAI,GAAC,GAAN,EAAW,CAAX,CAXd,SADsB;GAAvB,CADH,CADF,EAkBEP,6BAACW,UAAD;IACE,GAAG,EAAEhB,QADP;IAEE,YAAY,EAAE,wBAAM;UACdG,WAAW,IAAIH,QAAf,IAA2BA,QAAQ,CAACiB,OAAxC,EAAiD;QAC/CjB,QAAQ,CAACiB,OAAT,CAAiBC,KAAjB;QACAlB,QAAQ,CAACiB,OAAT,CAAiBE,MAAjB;;KALN;IAQE,MAAM,EAAC,MART;IASE,SAAS,EAAEZ,MAAM,CAACa,UATpB;IAUE,KAAK,EAAEjB,WAAW,GAAGT,KAAK,GAAG,GAAR,IAAe,EAAlB,GAAuB,EAV3C;IAWE,WAAW,EAAC,QAXd;IAYE,QAAQ,EAAE,kBAAA2B,CAAC,EAAI;UACPC,CAAC,GAAG,CAACD,CAAC,CAACE,MAAF,CAASC,KAApB;;UACIC,MAAM,CAACC,KAAP,CAAaJ,CAAb,CAAJ,EAAqB;;OAFR;;;MAMb3B,aAAa,CAAC2B,CAAC,GAAG,GAAL,CAAb;KAlBJ;IAoBE,OAAO,EAAE,iBAAAD,CAAC,EAAI;MACZ1B,aAAa,CAAC,CAAD,CAAb;MACAS,cAAc,CAAC,IAAD,CAAd;KAtBJ;IAwBE,OAAO,EAAE,iBAAAiB,CAAC,EAAI;UACRxB,WAAJ,EAAiB;QACfwB,CAAC,CAACE,MAAF,CAASI,cAAT;;;IA5CR,CARF,CADF;CAbF;;;;"}
1
+{"version":3,"file":"index.js","sources":["../../src/components/Payment/PriceOptions/index.tsx"],"sourcesContent":["import React, { useState } from \"react\";\r\nimport classnames from \"classnames\";\r\nimport { Input } from 'antd';\r\nimport { formatMoney } from \"../Utils/utils\";\r\nimport 'antd/lib/button/style';\r\nimport styles from \"./PriceOptions.less\";\r\n\r\ninterface Props {\r\n  price: number;\r\n  onPriceChange: (v: number) => void;\r\n  size: \"small\" | \"normal\" | \"large\";\r\n  focusScroll: boolean;\r\n  withTitle: boolean;\r\n  titleText?: string;\r\n  inputRef: React.RefObject<any>;\r\n}\r\n\r\nconst PriceOptions = ({\r\n  price,\r\n  onPriceChange,\r\n  size = \"normal\",\r\n  focusScroll = true,\r\n  withTitle = true,\r\n  titleText = \"Price\",\r\n  inputRef\r\n}: Props) => {\r\n  const defaultOptions = [100, 600, 800];\r\n  // 控制是否为其他金额输入情况\r\n  const [inputStatus, setInputStatus] = useState(false);\r\n\r\n  return (\r\n    <div\r\n      className={classnames(styles.options)}\r\n    >\r\n      {withTitle ? (\r\n        <p>\r\n          {titleText}\r\n        </p>\r\n      ) : null}\r\n      <div className={styles.infoItem}>\r\n        <span className={styles.priceBtn}>\r\n          {defaultOptions.map(item => (\r\n            <span\r\n              className={classnames({\r\n                [styles.priceItem]: true,\r\n                [styles.active]: price === item && !inputStatus\r\n              })}\r\n              key={item}\r\n              onClick={() => {\r\n                onPriceChange(item);\r\n                setInputStatus(false);\r\n              }}\r\n            >\r\n              {formatMoney(item/100, 0)}¥\r\n            </span>\r\n          ))}\r\n        </span>\r\n        <Input\r\n          ref={inputRef}\r\n          onMouseEnter={() => {\r\n            if (inputStatus && inputRef && inputRef.current) {\r\n              inputRef.current.focus();\r\n              inputRef.current.select();\r\n            }\r\n          }}\r\n          suffix=\"¥\"\r\n          className={styles.priceInput}\r\n          value={inputStatus ? price / 100 || \"\" : \"\"}\r\n          placeholder=\"Others\"\r\n          onChange={e => {\r\n            const n = +e.target.value;\r\n            if (Number.isNaN(n)) {\r\n              return;\r\n            }\r\n            // 测试暂时改成1分\r\n            onPriceChange(n * 100);\r\n          }}\r\n          onClick={e => {\r\n            onPriceChange(0);\r\n            setInputStatus(true);\r\n          }}\r\n          onFocus={e => {\r\n            if (focusScroll) {\r\n              e.target.scrollIntoView();\r\n            }\r\n          }}\r\n        />\r\n      </div>\r\n    </div>\r\n  );\r\n};\r\n\r\nexport default PriceOptions;\r\n"],"names":["PriceOptions","price","onPriceChange","size","focusScroll","withTitle","titleText","inputRef","defaultOptions","useState","inputStatus","setInputStatus","React","classnames","styles","options","infoItem","priceBtn","map","item","priceItem","active","formatMoney","Input","current","focus","select","priceInput","e","n","target","value","Number","isNaN","scrollIntoView"],"mappings":";;;;;;;;;;;;;;;;;;;AAiBA,IAAMA,YAAY,GAAG,SAAfA,YAAe,OAQR;MAPXC,KAOW,QAPXA,KAOW;MANXC,aAMW,QANXA,aAMW;uBALXC,IAKW;MALXA,wBACAC,WAIW;MAJXA,WAIW,iCAJG,IAIH;4BAHXC,SAGW;MAHXA,SAGW,+BAHC,IAGD;4BAFXC,SAEW;MAFXA,SAEW,+BAFC,OAED;MADXC,QACW,QADXA,QACW;MACLC,cAAc,GAAG,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,CAAvB,CADW;;kBAG2BC,cAAQ,CAAC,KAAD,CAHnC;;MAGJC,WAHI;MAGSC,cAHT;;SAMTC;IACE,SAAS,EAAEC,gBAAU,CAACC,MAAM,CAACC,OAAR;KAEpBV,SAAS,GACRO,wCACGN,SADH,CADQ,GAIN,IAPN,EAQEM;IAAK,SAAS,EAAEE,MAAM,CAACE;KACrBJ;IAAM,SAAS,EAAEE,MAAM,CAACG;KACrBT,cAAc,CAACU,GAAf,CAAmB,UAAAC,IAAI;;;WACtBP;MACE,SAAS,EAAEC,gBAAU,kEAClBC,MAAM,CAACM,SADW,EACC,IADD,iDAElBN,MAAM,CAACO,MAFW,EAEFpB,KAAK,KAAKkB,IAAV,IAAkB,CAACT,WAFjB,gBADvB;MAKE,GAAG,EAAES,IALP;MAME,OAAO,EAAE,mBAAM;QACbjB,aAAa,CAACiB,IAAD,CAAb;QACAR,cAAc,CAAC,KAAD,CAAd;;OAGDW,iBAAW,CAACH,IAAI,GAAC,GAAN,EAAW,CAAX,CAXd,SADsB;GAAvB,CADH,CADF,EAkBEP,6BAACW,UAAD;IACE,GAAG,EAAEhB,QADP;IAEE,YAAY,EAAE,wBAAM;UACdG,WAAW,IAAIH,QAAf,IAA2BA,QAAQ,CAACiB,OAAxC,EAAiD;QAC/CjB,QAAQ,CAACiB,OAAT,CAAiBC,KAAjB;QACAlB,QAAQ,CAACiB,OAAT,CAAiBE,MAAjB;;KALN;IAQE,MAAM,EAAC,MART;IASE,SAAS,EAAEZ,MAAM,CAACa,UATpB;IAUE,KAAK,EAAEjB,WAAW,GAAGT,KAAK,GAAG,GAAR,IAAe,EAAlB,GAAuB,EAV3C;IAWE,WAAW,EAAC,QAXd;IAYE,QAAQ,EAAE,kBAAA2B,CAAC,EAAI;UACPC,CAAC,GAAG,CAACD,CAAC,CAACE,MAAF,CAASC,KAApB;;UACIC,MAAM,CAACC,KAAP,CAAaJ,CAAb,CAAJ,EAAqB;;OAFR;;;MAMb3B,aAAa,CAAC2B,CAAC,GAAG,GAAL,CAAb;KAlBJ;IAoBE,OAAO,EAAE,iBAAAD,CAAC,EAAI;MACZ1B,aAAa,CAAC,CAAD,CAAb;MACAS,cAAc,CAAC,IAAD,CAAd;KAtBJ;IAwBE,OAAO,EAAE,iBAAAiB,CAAC,EAAI;UACRxB,WAAJ,EAAiB;QACfwB,CAAC,CAACE,MAAF,CAASI,cAAT;;;IA5CR,CARF,CADF;CAbF;;;;"}

+ 1
- 0
lib/index.js 파일 보기

@@ -11,6 +11,7 @@ require('./utils-ed518bfc.js');
11 11
 var ConsumeListView = require('./ConsumeListView/index.js');
12 12
 var PayPlatformOptions = require('./PayPlatformOptions/index.js');
13 13
 require('antd');
14
+require('antd/lib/button/style');
14 15
 var PriceOptions = require('./PriceOptions/index.js');
15 16
 var WaitPayInfoView = require('./WaitPayInfoView/index.js');
16 17
 

+ 1
- 1
lib/index.js.map
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 3
- 2
package.json 파일 보기

@@ -17,6 +17,7 @@
17 17
     "@types/react-intl": "^3.0.0",
18 18
     "@types/slate": "^0.47.5",
19 19
     "@types/slate-react": "^0.22.9",
20
+    "antd": "^3.26.7",
20 21
     "braft-editor": "^2.3.8",
21 22
     "braft-extensions": "^0.0.20",
22 23
     "classnames": "^2.2.6",
@@ -116,8 +117,8 @@
116 117
     "ts-loader": "^6.2.1"
117 118
   },
118 119
   "peerDependencies": {
120
+    "antd": "3.19.3",
119 121
     "react": "^16.12.0",
120
-    "react-dom": "^16.12.0",
121
-    "antd": "3.19.3"
122
+    "react-dom": "^16.12.0"
122 123
   }
123 124
 }

+ 6
- 3
src/components/Editor/BraftEditor/index.tsx 파일 보기

@@ -32,7 +32,11 @@ const emotionOptions = {
32 32
 
33 33
 BraftEditor.use(Emoticon(emotionOptions))
34 34
 
35
-export const BarftEditorPage = () => {
35
+export const BarftEditorPage = ({
36
+  value,
37
+}: {
38
+  value: string;
39
+}) => {
36 40
   const controls: ControlType[] = [
37 41
     "bold",
38 42
     "italic",
@@ -45,7 +49,7 @@ export const BarftEditorPage = () => {
45 49
   ];
46 50
 
47 51
   const [editorState, setEditorState] = useState(
48
-    BraftEditor.createEditorState("<p>Hello <b>World!</b></p>")
52
+    BraftEditor.createEditorState(value || "<p>Hello <b>World!</b></p>")
49 53
   );
50 54
 
51 55
   return (
@@ -55,7 +59,6 @@ export const BarftEditorPage = () => {
55 59
         onChange={setEditorState}
56 60
         controls={controls}
57 61
         contentStyle={{
58
-          height: 210,
59 62
           boxShadow: "inset 0 1px 3px rgba(0,0,0,.1)"
60 63
         }}
61 64
       />

+ 2
- 2
src/components/Payment/PriceOptions/index.tsx 파일 보기

@@ -2,7 +2,7 @@ import React, { useState } from "react";
2 2
 import classnames from "classnames";
3 3
 import { Input } from 'antd';
4 4
 import { formatMoney } from "../Utils/utils";
5
-
5
+import 'antd/lib/button/style';
6 6
 import styles from "./PriceOptions.less";
7 7
 
8 8
 interface Props {
@@ -11,7 +11,7 @@ interface Props {
11 11
   size: "small" | "normal" | "large";
12 12
   focusScroll: boolean;
13 13
   withTitle: boolean;
14
-  titleText: string;
14
+  titleText?: string;
15 15
   inputRef: React.RefObject<any>;
16 16
 }
17 17
 

+ 84
- 0
src/components/Payment/temp/NewPayment.less 파일 보기

@@ -0,0 +1,84 @@
1
+.pay_wrapper {
2
+  overflow: hidden;
3
+
4
+  .pay_value_title {
5
+    margin: 29px 0;
6
+    font-size: 24px;
7
+    color: #fb4b56;
8
+  }
9
+
10
+  .pay_button_wrapper {
11
+    display: flex;
12
+    justify-content: flex-end;
13
+    margin-bottom: 29px;
14
+
15
+    .pay_button_confirm {
16
+      color: white;
17
+      background-color: #71c135;
18
+      width: 110px;
19
+      height: 40px;
20
+      font-size: 16px;
21
+
22
+      &:hover,
23
+      &:focus {
24
+        border-color: #71c135;
25
+      }
26
+    }
27
+  }
28
+}
29
+
30
+.paying_wrapper {
31
+  padding: 24px 0;
32
+  .pay_info_footer {
33
+    margin-top: 16px;
34
+    text-align: center;
35
+    .tips {
36
+      color: #9b9b9b;
37
+      font-size: 14px;
38
+      margin-top: 10px;
39
+      .link {
40
+        color: #1790ff;
41
+        text-decoration: underline;
42
+        margin: 0 2px;
43
+        cursor: pointer;
44
+      }
45
+    }
46
+  }
47
+
48
+  .pay_info {
49
+    text-align: center;
50
+    font-size: 16px;
51
+    color: #585853;
52
+    i {
53
+      width: 48px;
54
+      height: 48px;
55
+      background-size: contain;
56
+      display: block;
57
+      margin: auto;
58
+    }
59
+  }
60
+}
61
+
62
+.after_pay_wrapper {
63
+  display: flex;
64
+  justify-content: center;
65
+  align-content: center;
66
+  text-align: center;
67
+  padding: 60px 0px;
68
+  overflow: hidden;
69
+
70
+  .after_pay_image {
71
+    width: 72px;
72
+    height: 72px;
73
+    margin: 0 auto;
74
+
75
+    & > img {
76
+      width: 100%;
77
+      height: 100%;
78
+    }
79
+  }
80
+
81
+  .after_pay_text {
82
+    font-size: 20px;
83
+  }
84
+}

+ 132
- 0
src/components/Payment/temp/NewPayment.tsx 파일 보기

@@ -0,0 +1,132 @@
1
+import React from 'react';
2
+import intl from 'react-intl-universal';
3
+import { Button, Modal, Divider, Spin } from 'antd';
4
+import { IconImage } from 'components/Common/Icon';
5
+import { isMobile } from '@/utils/bilingually/utils';
6
+import { PAY_CHANNEL, LINKS } from '@/constants';
7
+import PayPlatformOptions from './Common/PayPlatformOptions';
8
+
9
+import face from '@/assets/bilingually/gift/icon_face.png';
10
+import styles from './NewPayment.less';
11
+
12
+const current_is_mobile = isMobile();
13
+
14
+interface NewPaymentProps {
15
+  value: number | string;
16
+  payStage: 'pre_pay' | 'paying' | 'after';
17
+  confirmPay: Function;
18
+  cancelWithError: Function;
19
+  confirmPayed: Function;
20
+  afterPayText: string;
21
+}
22
+
23
+interface NewPaymentState {
24
+  payitem: string;
25
+  isCheckingOrder: boolean;
26
+}
27
+
28
+class NewPayment extends React.Component<NewPaymentProps, NewPaymentState> {
29
+  constructor(props: NewPaymentProps) {
30
+    super(props);
31
+    this.state = {
32
+      payitem: PAY_CHANNEL.ALI_WEB,
33
+      isCheckingOrder: false,
34
+    };
35
+  }
36
+
37
+  renderPayAfter() {
38
+    return (
39
+      <div className={styles.after_pay_wrapper}>
40
+        <div>
41
+          <div className={styles.after_pay_image}>
42
+            <img src={face} alt="reward success" />
43
+          </div>
44
+          <div className={styles.after_pay_text}>{this.props.afterPayText}</div>
45
+        </div>
46
+      </div>
47
+    );
48
+  }
49
+
50
+  renderPaying() {
51
+    const { isCheckingOrder } = this.state;
52
+
53
+    if (isCheckingOrder) {
54
+      return <div>
55
+        <Spin />
56
+      </div>
57
+    }
58
+
59
+    return (
60
+      <div className={styles.paying_wrapper}>
61
+        <div className={styles.pay_info}>
62
+          <IconImage type="info-blue" />
63
+          {intl.get('live.course_info.pay.notification')}
64
+        </div>
65
+        <div className={styles.pay_info_footer}>
66
+          <Button
67
+            type="primary"
68
+            style={{ marginRight: '8px' }}
69
+            onClick={() => {
70
+              this.props.confirmPayed();
71
+            }}
72
+          >
73
+            {intl.get('live.course_info.pay.payed')}
74
+          </Button>
75
+          <Button
76
+            onClick={() => {
77
+              this.props.cancelWithError();
78
+            }}
79
+          >
80
+            {intl.get('live.course_info.pay.help')}
81
+          </Button>
82
+          <div className={styles.tips}>
83
+            {intl.getHTML('live.course.payment.tips', {
84
+              contact: LINKS.CONTACT,
85
+              className: styles.link,
86
+            })}
87
+          </div>
88
+        </div>
89
+      </div>
90
+    );
91
+  }
92
+
93
+  render() {
94
+    const { value: pay_value, payStage: pay_stage = 'pre_pay' } = this.props;
95
+
96
+    if (pay_stage === 'paying') {
97
+      return this.renderPaying();
98
+    } else if (pay_stage === 'after') {
99
+      return this.renderPayAfter();
100
+    }
101
+
102
+    return (
103
+      <div className={styles.pay_wrapper}>
104
+        {pay_value && (
105
+          <h3 className={styles.pay_value_title}>
106
+            {`${intl.get('bilingually.gift.send')}: ¥${pay_value}`}
107
+          </h3>
108
+        )}
109
+        <PayPlatformOptions
110
+          payitem={this.state.payitem}
111
+          onPayItemChange={(value: string) => {
112
+            this.setState({ payitem: value });
113
+          }}
114
+          isMobile={current_is_mobile}
115
+        />
116
+        <Divider />
117
+        <div className={styles.pay_button_wrapper}>
118
+          <Button
119
+            className={styles.pay_button_confirm}
120
+            onClick={() => {
121
+              this.props.confirmPay(this.state.payitem);
122
+            }}
123
+          >
124
+            立即支付
125
+          </Button>
126
+        </div>
127
+      </div>
128
+    );
129
+  }
130
+}
131
+
132
+export default NewPayment;

+ 107
- 0
src/components/Payment/temp/SendWantedValueModal.less 파일 보기

@@ -0,0 +1,107 @@
1
+.sendWantedModalContent {
2
+  background-color: white;
3
+  width: 360px;
4
+  height: 314px;
5
+  padding: 22px 28px;
6
+  border-radius: 7px;
7
+
8
+  .title {
9
+    font-size:18px;
10
+    font-weight:400;
11
+    text-align: center;
12
+  }
13
+
14
+  .wantedValueText {
15
+    color: #565656;
16
+    margin-top: 48px;
17
+    font-size: 14px;
18
+    line-height: 20px;
19
+    text-align: center;
20
+  }
21
+
22
+  .wantedInputNumber {
23
+    margin: 11px auto;
24
+    text-align: center;
25
+    :global {
26
+      .ant-input {
27
+        color: #FB4B56;
28
+      }
29
+    }
30
+  }
31
+
32
+  .wantedValueTipBottom {
33
+    margin: 0 auto;
34
+    font-size: 12px;
35
+    text-align: center;
36
+    width: 208px;
37
+    color: #9B9B9B;
38
+  }
39
+
40
+  .buttonRow {
41
+    display: flex;
42
+    justify-content: center;
43
+    align-items: center;
44
+    margin-top: 23px;
45
+
46
+    .confirmButton {
47
+      color: white;
48
+      background-color: #71C135;
49
+      width: 170px;
50
+      height: 36px;
51
+
52
+      &:hover, &:focus {
53
+        outline: none;
54
+        border-color: lighten(#71C135, 10%);
55
+      }
56
+    }
57
+
58
+    .tipsButton {
59
+      margin-left: 22px;
60
+      width: 20px;
61
+
62
+      :global {
63
+        .schedule {
64
+          font-size: 18px;
65
+          cursor: pointer;
66
+        }
67
+      }
68
+    }
69
+  }
70
+
71
+}
72
+
73
+.closeButton {
74
+  position: absolute;
75
+  right: 10px;
76
+  top: 10px;
77
+  display: block;
78
+  width: 20px;
79
+  height: 20px;
80
+  border-radius: 50%;
81
+  cursor: pointer;
82
+
83
+  img {
84
+    width: 100%;
85
+    height: 100%;
86
+  }
87
+}
88
+
89
+.tipsView {
90
+  h6 {
91
+    margin: 0;
92
+    font-size: 12px;
93
+    line-height: 22px;
94
+    color: #3D3D3D;
95
+  }
96
+  div {
97
+    font-size: 12px;
98
+  }
99
+}
100
+
101
+.outRangeTextTip {
102
+  :global {
103
+    .ant-tooltip-inner {
104
+      color: red;
105
+    }
106
+  }
107
+}

+ 220
- 0
src/components/Payment/temp/SendWantedValueModal.tsx 파일 보기

@@ -0,0 +1,220 @@
1
+import React, { RefObject } from 'react';
2
+import PropTypes from 'prop-types';
3
+import { Input, Button, Popover, Tooltip } from 'antd';
4
+import { Modal } from '@/components/Common/Modal';
5
+
6
+import CloseButtonIcon from '@/assets/bilingually/close.png';
7
+
8
+import styles from './SendWantedValueModal.less';
9
+import { sendgift } from '@/services/bilingually/qa';
10
+
11
+interface SendWantedValueModalProps {
12
+  wantedValue: string|number|null;
13
+  sendValueRange: Array<string|number>;
14
+  sendGiftData: {
15
+    answerId: string|number;
16
+    questionId: string|number;
17
+    toUserId: string|number;
18
+  };
19
+  handleVisiableChange: Function;
20
+}
21
+interface SendWantedValueModalState {
22
+  visiable: boolean;
23
+  outRangeTip: boolean;
24
+  sendValue: string|number;
25
+}
26
+
27
+class SendWantedValueModal extends React.Component<SendWantedValueModalProps, SendWantedValueModalState> {
28
+  ModalInputRef: RefObject<Input>;
29
+
30
+  constructor(props: SendWantedValueModalProps) {
31
+    super(props);
32
+    this.state = {
33
+      visiable: false,
34
+      sendValue: 0,
35
+      outRangeTip: false,
36
+    };
37
+    this.ModalInputRef = React.createRef();
38
+  }
39
+
40
+  handleSendValueChange = (v: string|number) => {
41
+    if (this.state.outRangeTip) {
42
+      this.setState({
43
+        outRangeTip: !this.checkSendValue(),
44
+      });
45
+    }
46
+    this.setState({
47
+      sendValue: v,
48
+    });
49
+  }
50
+
51
+  checkSendValue = () => {
52
+    const { sendValueRange } = this.props;
53
+    const { sendValue } = this.state;
54
+    let min = 0;
55
+    let max = Number(this.props.wantedValue);
56
+    if (sendValueRange) {
57
+      min = Number(sendValueRange[0]);
58
+      max = Number(sendValueRange[1]);
59
+    }
60
+    if (sendValue > max) {
61
+      this.setState({
62
+        // sendValue: max,
63
+        outRangeTip: true,
64
+      });
65
+      return false;
66
+    } else if (sendValue < min) {
67
+      this.setState({
68
+        // sendValue: max,
69
+        outRangeTip: true,
70
+      });
71
+      return false;
72
+    }
73
+    return true;
74
+  }
75
+
76
+  handleCloseAction = () => {
77
+    this.setState({
78
+      visiable: false,
79
+      sendValue: 0,
80
+      outRangeTip: false,
81
+    }, () => {
82
+      this.props.handleVisiableChange(false);
83
+    });
84
+  }
85
+
86
+  handleShowAction = () => {
87
+    this.setState({
88
+      visiable: true,
89
+    }, () => {
90
+      this.props.handleVisiableChange(true);
91
+    });
92
+  }
93
+
94
+  handleConfirm = () => {
95
+    const { sendGiftData } = this.props;
96
+    const checkResult = this.checkSendValue();
97
+    if (!checkResult) {
98
+      // 未通过验证
99
+      return null;
100
+    }
101
+    // 进行分配请求
102
+    sendgift({
103
+      business_type: 14, // 表示悬赏答案
104
+      ref_id: sendGiftData.answerId.toString(), // 对应回答的id
105
+      origin_id: sendGiftData.questionId, // 对应问题的id
106
+      to_user: sendGiftData.toUserId, // 悬赏给谁
107
+      goods_id: 2, // 礼物id 帮币的话为2
108
+      num: Number(this.state.sendValue), // 礼物数量
109
+    }).then((res: any) => {
110
+      console.log('res: ', res);
111
+      console.log("after send gift");
112
+      if (res) {
113
+        this.handleCloseAction();
114
+      } else {
115
+        this.handleCloseAction();
116
+      }
117
+    })
118
+  }
119
+
120
+  renderCloseButton = () => {
121
+    return (
122
+      <div
123
+        role="button"
124
+        tabIndex={-1}
125
+        className={styles.closeButton}
126
+        onClick={() => {
127
+          this.handleCloseAction();
128
+        }}
129
+      >
130
+        <img src={CloseButtonIcon} alt="close button for send wanted" />
131
+      </div>
132
+    )
133
+  }
134
+
135
+  renderModalContent = () => {
136
+    return (
137
+      <div className={styles.sendWantedModalContent}>
138
+        {this.renderCloseButton()}
139
+        <h4 className={styles.title}>分配悬赏奖金</h4>
140
+        <div className={styles.wantedValueText}>{`剩余可分配 ${this.props.wantedValue}元`}</div>
141
+        <Tooltip
142
+          visible={this.state.outRangeTip}
143
+          title="超过可范围值"
144
+          placement="bottom"
145
+          overlayClassName={styles.outRangeTextTip}
146
+        >
147
+          <Input
148
+            ref={this.ModalInputRef}
149
+            className={styles.wantedInputNumber}
150
+            suffix="元"
151
+            value={this.state.sendValue}
152
+            onChange={e => this.handleSendValueChange(e.target.value)}
153
+            onFocus={e => e.target.setSelectionRange(0, String(this.state.sendValue).length)}
154
+          />
155
+        </Tooltip>
156
+        <div className={styles.wantedValueTipBottom}>需要在悬赏时间结束前将奖金分配完成, 否则将按照规则自动分配</div>
157
+        <div className={styles.buttonRow}>
158
+          <div className={styles.tipsButton}/>
159
+          <Button
160
+            className={styles.confirmButton}
161
+            onClick={this.handleConfirm}
162
+          >
163
+            确认
164
+          </Button>
165
+          <div className={styles.tipsButton}>
166
+            <Popover
167
+              placement="bottom"
168
+              trigger="click"
169
+              overlayStyle={{
170
+                width: '320px'
171
+              }}
172
+              content={(
173
+                <div className={styles.tipsView}>
174
+                  <h6>1、如何参与悬赏?</h6>
175
+                  <div>
176
+                    悬赏问题皆有有效期,默认为120小时(5天),在有效期内回复的答案,才有资格被选为最佳答案,以及分得赏金。
177
+                  </div>
178
+                  <h6>2、赏金如何分?</h6>
179
+                  <div>
180
+                    悬赏时间结束前,提问者可随时选出最优答案,并对赏金进行分配,直至赏金被分完或时间到期为止。若悬赏时间到期,悬赏者仍未分配赏金,且回答数大于等于2,系统则默认将赏金平分给点赞数前3名的回答。
181
+                  </div>
182
+                  <h6>3、赏金能退款吗?</h6>
183
+                  <div>
184
+                    赏金只会在以下2种情况进行退款:一、悬赏时间到期,回答数小于2,赏金将自动退还至提问者的钱包;二、悬赏时间到期,悬赏者未分配完赏金,系统自动将剩余的赏金退还至提问者的钱包。
185
+                  </div>
186
+                </div>
187
+              )}
188
+            >
189
+              <i
190
+                className="schedule schedule-icon_rewardtips"
191
+              />
192
+            </Popover>
193
+          </div>
194
+        </div>
195
+      </div>
196
+    )
197
+  }
198
+
199
+  render() {
200
+    const { children } = this.props;
201
+    return (
202
+      <>
203
+        <div
204
+          className={styles.wrapper} 
205
+          onClick={() => this.handleShowAction()}
206
+        >
207
+          {children}
208
+        </div>
209
+        <Modal
210
+          visible={this.state.visiable}
211
+          onCancel={() => this.handleCloseAction()}
212
+        >
213
+          {this.renderModalContent()}
214
+        </Modal>
215
+      </>
216
+    )
217
+  }
218
+}
219
+
220
+export default SendWantedValueModal;

+ 26
- 0
src/components/Payment/temp/WantedPaymentPopover.less 파일 보기

@@ -0,0 +1,26 @@
1
+.wanted_wrapper {
2
+  width: 366px;
3
+  height: 424px;
4
+  font-size: 18px;
5
+  text-align: center;
6
+
7
+  .close_btn {
8
+    position: absolute;
9
+    top: 10px;
10
+    right: 16px;
11
+    width: 20px;
12
+    height: 20px;
13
+
14
+    & > button {
15
+      border: none;
16
+      padding: 0px;
17
+      margin: 0px;
18
+      cursor: pointer;
19
+
20
+      & > img {
21
+        width: 100%;
22
+      }
23
+    }
24
+  }
25
+
26
+}

+ 108
- 0
src/components/Payment/temp/WantedPaymentPopover.tsx 파일 보기

@@ -0,0 +1,108 @@
1
+import React from 'react';
2
+import { Popover, Divider, Input, Button } from 'antd';
3
+import WantedpaymentView from './WantedPaymentView';
4
+
5
+import popClose from '@/assets/bilingually/close@2x.png';
6
+import styles from './WantedPaymentPopover.less';
7
+
8
+export interface WantedPaymentPopoverProp {
9
+  popoverConfig?: {
10
+    placement?: "left" | "top" | "right" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom" | undefined;
11
+    trigger?: "hover" | "focus" | "click" | "contextMenu" | undefined;
12
+  };
13
+  handleConfirm?: Function;
14
+}
15
+
16
+export interface WantedPaymentPopoverState {
17
+  visiable: boolean;
18
+  current_wanted: number|string|null;
19
+}
20
+
21
+export class WantedPaymentPopover extends React.Component<WantedPaymentPopoverProp, WantedPaymentPopoverState> {
22
+  constructor(props: WantedPaymentPopoverProp) {
23
+    super(props);
24
+    this.state = {
25
+      visiable: false,
26
+
27
+      current_wanted: null,
28
+    }
29
+  }
30
+
31
+  handleClose = () => {
32
+    const { handleConfirm } = this.props;
33
+    if (handleConfirm) {
34
+      this.handleUpdateCurrentWanted(this.state.current_wanted, (value: string) => {
35
+        handleConfirm(Number(value).toFixed(2));
36
+      });
37
+    }
38
+    this.setState({ visiable: false });
39
+  }
40
+
41
+  clearCurrentWanted = (cb: Function) => {
42
+    this.setState({
43
+      current_wanted: null,
44
+    }, () => cb())
45
+  }
46
+
47
+  handleUpdateCurrentWanted = (value: string|number|null, afterUpdate?: Function) => {
48
+    if (!value) return;
49
+    let result: string|number;
50
+    result = value;
51
+    if (parseInt(`${value}`, 10) === value) {
52
+      // 无小数判断
53
+      result = Number(value)
54
+    }
55
+    if (!result) return;
56
+    if (result > 10000) result = 10000;
57
+    if (result < 5) result = 5;
58
+    this.setState({ current_wanted: result }, () => afterUpdate && afterUpdate(result));
59
+  }
60
+
61
+  renderInitView() {
62
+    const { current_wanted } = this.state; 
63
+    return (
64
+      <WantedpaymentView
65
+        type="pop"
66
+        current_wanted={current_wanted}
67
+        InputWantedValueChange={(v: string) => this.setState({ current_wanted: v })}
68
+        InputWantedPressEnter={(v: string) => this.handleUpdateCurrentWanted(v, this.handleClose)}
69
+        InputWantedOnBlur={(v: string) => this.handleUpdateCurrentWanted(v)}
70
+        InputWantedClear={() => this.clearCurrentWanted(this.handleClose)}
71
+        CloseFunction={this.handleClose}
72
+      />
73
+    )
74
+  }
75
+
76
+  render() {
77
+    const { children, popoverConfig = {} } = this.props;
78
+
79
+    return (
80
+      <Popover
81
+        placement="left"
82
+        trigger="click"
83
+        visible={this.state.visiable}
84
+        onVisibleChange={(value: boolean) => {
85
+          if (!value) {
86
+            this.handleClose();
87
+          }
88
+          this.setState({ visiable: value });
89
+        }}
90
+        {...popoverConfig}
91
+        content={
92
+          <div className={styles.wanted_wrapper}>
93
+            <div className={styles.close_btn}>
94
+              <button onClick={this.handleClose}>
95
+                <img src={popClose} alt="close wanted button"/>
96
+              </button>
97
+            </div>
98
+            {this.renderInitView()}
99
+          </div>
100
+        }
101
+      >
102
+        {children}
103
+      </Popover>
104
+    );
105
+  }
106
+}
107
+
108
+export default WantedPaymentPopover;

+ 73
- 0
src/components/Payment/temp/WantedPaymentView.less 파일 보기

@@ -0,0 +1,73 @@
1
+.wrapper {
2
+  .wanted_middle {
3
+    color: #E1AD28;
4
+    font-size: 17px; 
5
+    margin-top: 21px;
6
+
7
+    .wanted_cover {
8
+        width: 95px;
9
+    }
10
+  }
11
+
12
+  .wanted_bottom {
13
+    .wanted_bottom_title {
14
+      color: #565656;
15
+      font-size: 14px;
16
+    }
17
+
18
+    .wanted_input_number {
19
+      margin: 11px auto;
20
+      width: 266px;
21
+      height: 36px;
22
+
23
+      :global {
24
+        .ant-input {
25
+          color: #FB4B56;
26
+          font-size: 16px;
27
+          text-align: center;
28
+          
29
+          &:focus, &:hover {
30
+            outline: none;
31
+            box-shadow: none;
32
+            border-color: #FB4B56;
33
+          }
34
+        }
35
+      }
36
+    }
37
+
38
+    .wanted_bottom_tips {
39
+      color: #9B9B9B;
40
+      font-size: 12px;
41
+    }
42
+  }
43
+
44
+  footer {
45
+    margin-top: 40px;
46
+
47
+    .wanted_confirm_button {
48
+      font-size: 16px;
49
+      color: white;
50
+      background-color: #71C135;
51
+
52
+      &:hover, &:focus {
53
+        color: white;
54
+        outline: none;
55
+        box-shadow: none;
56
+        background-color: lighten(#71C135, 10%);
57
+        border-color: lighten(#71C135, 50%);
58
+      }
59
+    }
60
+
61
+    .wanted_cancel_button {
62
+      margin-top: 12px;
63
+      color: #787F8C;
64
+      font-size: 12px;
65
+      cursor: pointer;
66
+
67
+      &:hover, &:focus {
68
+        color: #787F8C;
69
+        text-shadow: #565656;
70
+      }
71
+    }
72
+  }
73
+}

+ 80
- 0
src/components/Payment/temp/WantedPaymentView.tsx 파일 보기

@@ -0,0 +1,80 @@
1
+import React from 'react';
2
+import PropTypes from 'prop-types';
3
+import { Divider, Input, Button } from 'antd';
4
+
5
+import wantedCover from '@/assets/payment/cover_wanted@2x.png';
6
+import styles from './WantedPaymentView.less';
7
+
8
+interface WantedpaymentViewProps {
9
+  type?: 'pop'|'modal';
10
+  current_wanted: number|string|null;
11
+  InputWantedValueChange: Function;
12
+  InputWantedPressEnter: Function;
13
+  InputWantedOnBlur: Function;
14
+  InputWantedClear: Function;
15
+  CloseFunction: Function;
16
+}
17
+interface WantedpaymentViewState {
18
+  payment?: number
19
+}
20
+
21
+class WantedpaymentView extends React.Component<WantedpaymentViewProps, WantedpaymentViewState> {
22
+  constructor(props: WantedpaymentViewProps) {
23
+    super(props);
24
+    this.state = {};
25
+  }
26
+
27
+  render() {
28
+    const { current_wanted } = this.props; 
29
+    return (
30
+      <div className={styles.wrapper}>
31
+        <header>设置悬赏金额</header>
32
+        <section className={styles.wanted_middle}>
33
+          <img className={styles.wanted_cover} src={wantedCover} alt="wanted_image"/>
34
+          <div>悬赏提问</div>
35
+        </section>
36
+        <Divider style={{ minWidth: 'auto', marginLeft: 'auto', marginRight: 'auto', width: '266px'}} />
37
+        <section className={styles.wanted_bottom}>
38
+          <div className={styles.wanted_bottom_title}>设置悬赏金额范围¥5.00~¥10000</div>
39
+          <Input
40
+            className={styles.wanted_input_number}
41
+            suffix="元"
42
+            value={current_wanted || ''}
43
+            onChange={v => {
44
+              if (!/^[.0-9]*$/g.test(v.target.value)) return;
45
+              this.props.InputWantedValueChange(v.target.value);
46
+            }}
47
+            onPressEnter={() => {
48
+              this.props.InputWantedPressEnter(current_wanted);
49
+            }}
50
+            onBlur={() => {
51
+              this.props.InputWantedOnBlur(current_wanted);
52
+            }}
53
+            autoFocus
54
+          />
55
+          <div className={styles.wanted_bottom_tips}>
56
+            若5天内没人回答该问题, 所支付的金额将退还至您的钱包
57
+          </div>
58
+        </section>
59
+        <footer>
60
+          <Button
61
+            className={styles.wanted_confirm_button}
62
+            onClick={() => this.props.CloseFunction()}
63
+          >
64
+            确定
65
+          </Button>
66
+          <div
67
+            role="button"
68
+            tabIndex={-1}
69
+            onClick={() => this.props.InputWantedClear()}
70
+            className={styles.wanted_cancel_button}
71
+          >
72
+            取消悬赏
73
+          </div>
74
+        </footer>
75
+      </div>
76
+    )
77
+  }
78
+}
79
+
80
+export default WantedpaymentView;

+ 1
- 1
stats.html
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 3
- 1
stories/Editor.stories.tsx 파일 보기

@@ -9,6 +9,8 @@ import RichTextEditor from '@components/Editor/RichTextEditor';
9 9
 import RichTextEditorForSlate from '@components/Editor/RichTextEditorForSlate';
10 10
 import { BarftEditorPage } from '@components/Editor/BraftEditor';
11 11
 
12
+import EditorData from './data/articleData.json';
13
+
12 14
 const stories = storiesOf('Editor', module);
13 15
 stories.addDecorator((storyFn) => <div style={{padding: "0px 40px"}}>{storyFn()}</div>)
14 16
 stories.addDecorator(withKnobs);
@@ -44,7 +46,7 @@ stories.add(
44 46
 stories.add(
45 47
   'BraftEditor',
46 48
   () => (
47
-      <BarftEditorPage />
49
+      <BarftEditorPage value={EditorData.text} />
48 50
   ),
49 51
   {
50 52
     info: {

+ 4
- 1
stories/Payment.stories.tsx 파일 보기

@@ -14,7 +14,9 @@ import PriceOptionsDoc from '@components/Payment/PriceOptions/README.md';
14 14
 import WaitPayInfoView from '@/components/Payment/WaitPayInfoView';
15 15
 import WaitPayInfoViewDoc from '@components/Payment/WaitPayInfoView/README.md';
16 16
 
17
-import { consumeList as consumeData} from './data/consumeList.json';
17
+import { consumeList} from './data/consumeList.json';
18
+
19
+const consumeData: any = consumeList;
18 20
 
19 21
 const stories = storiesOf('Payment', module);
20 22
 stories.addDecorator((storyFn) => <div style={{padding: "0px 40px"}}>{storyFn()}</div>)
@@ -112,6 +114,7 @@ stories.add(
112 114
         onPriceChange={(v) => setPrice(v)}
113 115
         size={select("size", { Small: "small", Normal: "normal", Large: "large"}, "normal")}
114 116
         withTitle={boolean("withTitle", false)}
117
+        titleText="Price Title"
115 118
         focusScroll={boolean("focusScroll", false)}
116 119
         inputRef={refInput}
117 120
       />

+ 46
- 0
stories/data/articleData.json
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 706
- 28
yarn.lock
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기