|
@@ -14,7 +14,7 @@ var utils = require('../utils-b800dc99.js');
|
14
|
14
|
var slicedToArray = require('../slicedToArray-172f4624.js');
|
15
|
15
|
var antd = require('antd');
|
16
|
16
|
|
17
|
|
-var css = ".PriceOptions_options__ifYbC {\n border-bottom: 1px dashed #00000017;\n}\n.PriceOptions_options__ifYbC p {\n font-size: 14px;\n font-weight: 400;\n color: #616a79;\n margin-bottom: 20px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx {\n padding-right: 0;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3 {\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__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3.PriceOptions_active__154by {\n background: rgba(255, 50, 102, 0.1);\n border-radius: 4px;\n border: 1px solid #ff3266;\n color: #616a79;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_priceInput__2JFc0 {\n display: inline-block;\n min-width: 70px;\n width: auto;\n margin: 6px;\n text-align: center;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx 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__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_rate__17U-9 {\n margin-left: 10px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_rate__17U-9 i {\n margin-right: 5px;\n color: #1790FF;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z p {\n font-size: 14px;\n font-weight: 400;\n color: #616a79;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx {\n padding-right: 0;\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceBtn__1UaE8 {\n display: flex;\n justify-content: space-between;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3 {\n display: inline-block;\n background-color: #fff;\n border-radius: 4px;\n border: 1px solid #cfcfcf;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3.PriceOptions_active__154by {\n background-color: #fff;\n color: #FF3266FF;\n border: 1px solid #ff3266;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceInput__2JFc0 {\n width: 222px;\n width: auto;\n}\n";
|
|
17
|
+var css = ".PriceOptions_options__ifYbC p {\n font-size: 14px;\n font-weight: 400;\n color: #616a79;\n margin-bottom: 20px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx {\n padding-right: 0;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3 {\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__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3.PriceOptions_active__154by {\n background: rgba(255, 50, 102, 0.1);\n border-radius: 4px;\n border: 1px solid #ff3266;\n color: #616a79;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_priceInput__2JFc0 {\n display: inline-block;\n min-width: 70px;\n height: 72px;\n width: auto;\n margin: 6px;\n text-align: center;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx 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__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_rate__17U-9 {\n margin-left: 10px;\n}\n.PriceOptions_options__ifYbC .PriceOptions_infoItem__246mx .PriceOptions_rate__17U-9 i {\n margin-right: 5px;\n color: #1790FF;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z p {\n font-size: 14px;\n font-weight: 400;\n color: #616a79;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx {\n padding-right: 0;\n display: flex;\n flex-direction: column;\n justify-content: center;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceBtn__1UaE8 {\n display: flex;\n justify-content: space-between;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3 {\n display: inline-block;\n background-color: #fff;\n border-radius: 4px;\n border: 1px solid #cfcfcf;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceItem__3CPe3.PriceOptions_active__154by {\n background-color: #fff;\n color: #FF3266FF;\n border: 1px solid #ff3266;\n}\n.PriceOptions_options__ifYbC.PriceOptions_multi__2fM8z .PriceOptions_infoItem__246mx .PriceOptions_priceInput__2JFc0 {\n width: 222px;\n width: auto;\n}\n";
|
18
|
18
|
var styles = {
|
19
|
19
|
"options": "PriceOptions_options__ifYbC",
|
20
|
20
|
"infoItem": "PriceOptions_infoItem__246mx",
|
|
@@ -90,8 +90,12 @@ var PriceOptions = function PriceOptions(_ref) {
|
90
|
90
|
inputSuffix = _ref$inputSuffix === void 0 ? "¥" : _ref$inputSuffix,
|
91
|
91
|
_ref$injectOptions = _ref.injectOptions,
|
92
|
92
|
injectOptions = _ref$injectOptions === void 0 ? {
|
93
|
|
- priceBtnClass: {},
|
94
|
|
- priceInputClass: {}
|
|
93
|
+ priceBtnClass: function priceBtnClass() {
|
|
94
|
+ return undefined;
|
|
95
|
+ },
|
|
96
|
+ priceInputClass: function priceInputClass() {
|
|
97
|
+ return undefined;
|
|
98
|
+ }
|
95
|
99
|
} : _ref$injectOptions,
|
96
|
100
|
inputRef = _ref.inputRef;
|
97
|
101
|
var defaultOptions = priceOptions;
|
|
@@ -116,7 +120,7 @@ var PriceOptions = function PriceOptions(_ref) {
|
116
|
120
|
var _objectSpread3;
|
117
|
121
|
|
118
|
122
|
return React__default.createElement("span", {
|
119
|
|
- className: index.classnames(_objectSpread((_objectSpread3 = {}, defineProperty._defineProperty(_objectSpread3, styles.priceItem, true), defineProperty._defineProperty(_objectSpread3, styles.active, price === item && !inputStatus), _objectSpread3), injectOptions.priceBtnClass)),
|
|
123
|
+ className: index.classnames(_objectSpread((_objectSpread3 = {}, defineProperty._defineProperty(_objectSpread3, styles.priceItem, true), defineProperty._defineProperty(_objectSpread3, styles.active, price === item && !inputStatus), _objectSpread3), injectOptions.priceBtnClass(price === item && !inputStatus))),
|
120
|
124
|
key: item,
|
121
|
125
|
onClick: function onClick() {
|
122
|
126
|
onPriceChange(item);
|
|
@@ -125,7 +129,7 @@ var PriceOptions = function PriceOptions(_ref) {
|
125
|
129
|
}, priceRender(item));
|
126
|
130
|
})), React__default.createElement(antd.Input, {
|
127
|
131
|
ref: inputRef,
|
128
|
|
- className: index.classnames(styles.priceInput, _objectSpread({}, injectOptions.priceInputClass)),
|
|
132
|
+ className: index.classnames(styles.priceInput, _objectSpread({}, injectOptions.priceInputClass())),
|
129
|
133
|
onMouseEnter: function onMouseEnter() {
|
130
|
134
|
if (inputStatus && inputRef && inputRef.current) {
|
131
|
135
|
inputRef.current.focus();
|