@xfe-repo/web-components 1.7.4 → 1.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +9 -9
- package/dist/index.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +181 -190
- package/dist/index.mjs +129 -138
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3160,7 +3160,7 @@ var Counter = function Counter(param) {
|
|
|
3160
3160
|
// src/Currency/index.tsx
|
|
3161
3161
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3162
3162
|
var Currency = function Currency(props) {
|
|
3163
|
-
var _props_unit = props.unit, unit = _props_unit === void 0 ? "fen" : _props_unit, _props_toFixed = props.toFixed, toFixed = _props_toFixed === void 0 ? 2 : _props_toFixed, children = props.children, className = props.className;
|
|
3163
|
+
var _props_unit = props.unit, unit = _props_unit === void 0 ? "fen" : _props_unit, _props_priceUnit = props.priceUnit, priceUnit = _props_priceUnit === void 0 ? "\uFFE5" : _props_priceUnit, _props_toFixed = props.toFixed, toFixed = _props_toFixed === void 0 ? 2 : _props_toFixed, children = props.children, className = props.className;
|
|
3164
3164
|
if (children === void 0 || children === null) return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", {
|
|
3165
3165
|
className: className,
|
|
3166
3166
|
children: "--"
|
|
@@ -3168,7 +3168,8 @@ var Currency = function Currency(props) {
|
|
|
3168
3168
|
if (children.toString().includes("*")) return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", {
|
|
3169
3169
|
className: className,
|
|
3170
3170
|
children: [
|
|
3171
|
-
|
|
3171
|
+
priceUnit,
|
|
3172
|
+
" ",
|
|
3172
3173
|
children
|
|
3173
3174
|
]
|
|
3174
3175
|
});
|
|
@@ -3181,7 +3182,7 @@ var Currency = function Currency(props) {
|
|
|
3181
3182
|
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", {
|
|
3182
3183
|
className: className,
|
|
3183
3184
|
children: [
|
|
3184
|
-
|
|
3185
|
+
priceUnit,
|
|
3185
3186
|
priceDic[unit].toFixed(toFixed)
|
|
3186
3187
|
]
|
|
3187
3188
|
});
|
|
@@ -4718,28 +4719,21 @@ var index_module_default10 = {
|
|
|
4718
4719
|
input: "index_module_input2"
|
|
4719
4720
|
};
|
|
4720
4721
|
// src/EffectSkuTable/index.tsx
|
|
4721
|
-
var
|
|
4722
|
+
var import_antd29 = require("antd");
|
|
4722
4723
|
// src/EffectBrandSelect/index.tsx
|
|
4723
4724
|
var import_react39 = require("react");
|
|
4724
4725
|
var import_react_use10 = require("react-use");
|
|
4725
|
-
var import_tools7 = require("@xfe-repo/web-utils/tools");
|
|
4726
|
-
var import_classnames9 = __toESM(require("classnames"));
|
|
4727
|
-
// src/EffectBrandSelect/index.module.less
|
|
4728
|
-
var index_module_default11 = {
|
|
4729
|
-
input: "index_module_input3",
|
|
4730
|
-
select: "index_module_select2"
|
|
4731
|
-
};
|
|
4732
|
-
// src/EffectBrandSelect/index.tsx
|
|
4733
4726
|
var import_antd26 = require("antd");
|
|
4734
|
-
var
|
|
4727
|
+
var import_classnames9 = __toESM(require("classnames"));
|
|
4728
|
+
var import_tools7 = require("@xfe-repo/web-utils/tools");
|
|
4735
4729
|
// src/EffectSkuSelect/index.tsx
|
|
4736
4730
|
var import_react38 = require("react");
|
|
4737
4731
|
var import_react_use9 = require("react-use");
|
|
4738
4732
|
var import_tools6 = require("@xfe-repo/web-utils/tools");
|
|
4739
4733
|
var import_classnames8 = __toESM(require("classnames"));
|
|
4740
4734
|
// src/EffectSkuSelect/index.module.less
|
|
4741
|
-
var
|
|
4742
|
-
input: "
|
|
4735
|
+
var index_module_default11 = {
|
|
4736
|
+
input: "index_module_input3",
|
|
4743
4737
|
image: "index_module_image",
|
|
4744
4738
|
preview: "index_module_preview",
|
|
4745
4739
|
icon: "index_module_icon",
|
|
@@ -5010,7 +5004,7 @@ var EffectSkuSelect = (0, import_react38.memo)(function(props) {
|
|
|
5010
5004
|
}
|
|
5011
5005
|
};
|
|
5012
5006
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_antd25.Select, _object_spread({
|
|
5013
|
-
className: (0, import_classnames8.default)(
|
|
5007
|
+
className: (0, import_classnames8.default)(index_module_default11.input, className)
|
|
5014
5008
|
}, selectBrandProps));
|
|
5015
5009
|
});
|
|
5016
5010
|
var SelectDropdown = (0, import_react38.memo)(function(props) {
|
|
@@ -5031,7 +5025,7 @@ var SelectDropdown = (0, import_react38.memo)(function(props) {
|
|
|
5031
5025
|
}, []);
|
|
5032
5026
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", {
|
|
5033
5027
|
id: selectDropdownId,
|
|
5034
|
-
className:
|
|
5028
|
+
className: index_module_default11.select_dropdown,
|
|
5035
5029
|
onMouseDown: handleMouseDown,
|
|
5036
5030
|
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react_infinite_scroll_component.default, {
|
|
5037
5031
|
dataLength: options.length,
|
|
@@ -5048,22 +5042,22 @@ var SelectDropdown = (0, import_react38.memo)(function(props) {
|
|
|
5048
5042
|
scrollableTarget: selectDropdownId,
|
|
5049
5043
|
scrollThreshold: "100px",
|
|
5050
5044
|
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", {
|
|
5051
|
-
className:
|
|
5045
|
+
className: index_module_default11.options,
|
|
5052
5046
|
children: options.map(function(item) {
|
|
5053
5047
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", {
|
|
5054
|
-
className: (0, import_classnames8.default)(
|
|
5048
|
+
className: (0, import_classnames8.default)(index_module_default11.option, item.value === value && index_module_default11.active),
|
|
5055
5049
|
onClick: function onClick() {
|
|
5056
5050
|
return handleOnSelect(item);
|
|
5057
5051
|
},
|
|
5058
5052
|
children: [
|
|
5059
5053
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ImageItem, {
|
|
5060
|
-
className:
|
|
5054
|
+
className: index_module_default11.select_image,
|
|
5061
5055
|
item: item,
|
|
5062
5056
|
previewed: item.image === previewImage2,
|
|
5063
5057
|
onPreview: handlePreview
|
|
5064
5058
|
}),
|
|
5065
5059
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", {
|
|
5066
|
-
className:
|
|
5060
|
+
className: index_module_default11.label,
|
|
5067
5061
|
children: item.label
|
|
5068
5062
|
})
|
|
5069
5063
|
]
|
|
@@ -5084,7 +5078,7 @@ var ImageItem = (0, import_react38.memo)(function(props) {
|
|
|
5084
5078
|
]);
|
|
5085
5079
|
var previewProps = (0, import_react38.useMemo)(function() {
|
|
5086
5080
|
return {
|
|
5087
|
-
maskClassName: "".concat(
|
|
5081
|
+
maskClassName: "".concat(index_module_default11.item_mask_img),
|
|
5088
5082
|
visible: previewed,
|
|
5089
5083
|
onVisibleChange: function onVisibleChange(value) {
|
|
5090
5084
|
return !value && (onPreview === null || onPreview === void 0 ? void 0 : onPreview());
|
|
@@ -5095,16 +5089,16 @@ var ImageItem = (0, import_react38.memo)(function(props) {
|
|
|
5095
5089
|
onPreview
|
|
5096
5090
|
]);
|
|
5097
5091
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", {
|
|
5098
|
-
className: (0, import_classnames8.default)(
|
|
5092
|
+
className: (0, import_classnames8.default)(index_module_default11.image, className),
|
|
5099
5093
|
children: [
|
|
5100
5094
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", {
|
|
5101
|
-
className:
|
|
5095
|
+
className: index_module_default11.preview,
|
|
5102
5096
|
onClick: function onClick(event) {
|
|
5103
5097
|
return handlePreview(event);
|
|
5104
5098
|
},
|
|
5105
5099
|
children: [
|
|
5106
5100
|
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_icons10.EyeOutlined, {
|
|
5107
|
-
className:
|
|
5101
|
+
className: index_module_default11.icon
|
|
5108
5102
|
}),
|
|
5109
5103
|
" \u9884\u89C8"
|
|
5110
5104
|
]
|
|
@@ -5122,44 +5116,55 @@ var getNumberValue = function getNumberValue(value) {
|
|
|
5122
5116
|
var numValue = Number(value);
|
|
5123
5117
|
return Number.isNaN(numValue) ? void 0 : numValue;
|
|
5124
5118
|
};
|
|
5119
|
+
// src/EffectBrandSelect/index.module.less
|
|
5120
|
+
var index_module_default12 = {
|
|
5121
|
+
input: "index_module_input4",
|
|
5122
|
+
select: "index_module_select2"
|
|
5123
|
+
};
|
|
5125
5124
|
// src/EffectBrandSelect/index.tsx
|
|
5126
5125
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
5126
|
+
var OTHER_BRAND_OPTION = {
|
|
5127
|
+
label: "\u5176\u5B83",
|
|
5128
|
+
value: 1310
|
|
5129
|
+
};
|
|
5127
5130
|
var EffectBrandSelect = (0, import_react39.memo)(function(props) {
|
|
5131
|
+
var _state_data;
|
|
5128
5132
|
var onChange = props.onChange, className = props.className, defaultValue = props.defaultValue, controlValue = props.value, disabled = props.disabled, mode = props.mode, categoryId = props.categoryId, sysBizTypeId = props.sysBizTypeId, showOtherBrand = props.showOtherBrand, style = props.style;
|
|
5129
|
-
var _ref = _sliced_to_array((0, import_react39.useState)(controlValue
|
|
5133
|
+
var _ref = _sliced_to_array((0, import_react39.useState)(controlValue !== null && controlValue !== void 0 ? controlValue : defaultValue), 2), value = _ref[0], setValue = _ref[1];
|
|
5134
|
+
var _ref1 = _sliced_to_array((0, import_react39.useState)({
|
|
5135
|
+
/** 兼容 props 分类 Id 异常传入 */ categoryId: getNumberValue(categoryId),
|
|
5136
|
+
sysBizTypeId: sysBizTypeId,
|
|
5137
|
+
brandId: value === null || value === void 0 ? void 0 : value.toString()
|
|
5138
|
+
}), 2), params = _ref1[0], setParams = _ref1[1];
|
|
5139
|
+
var prevControlValue = (0, import_react_use10.usePrevious)(controlValue);
|
|
5140
|
+
var state = useBrandOptions(params);
|
|
5141
|
+
var _ref2 = _sliced_to_array((0, import_react39.useState)((_state_data = state.data) !== null && _state_data !== void 0 ? _state_data : []), 2), options = _ref2[0], setOptions = _ref2[1];
|
|
5130
5142
|
var searchFetch = (0, import_react39.useCallback)(function(brandName, brandId) {
|
|
5131
|
-
if (brandId !== void 0) brandId = String(brandId);
|
|
5132
5143
|
setParams({
|
|
5133
|
-
categoryId: getNumberValue(categoryId),
|
|
5144
|
+
/** 兼容 props 分类 Id 异常传入 */ categoryId: getNumberValue(categoryId),
|
|
5134
5145
|
sysBizTypeId: sysBizTypeId,
|
|
5135
|
-
brandName: brandName,
|
|
5136
|
-
brandId: brandId
|
|
5146
|
+
brandName: brandName || void 0,
|
|
5147
|
+
brandId: brandId === null || brandId === void 0 ? void 0 : brandId.toString()
|
|
5137
5148
|
});
|
|
5138
5149
|
}, [
|
|
5139
5150
|
categoryId,
|
|
5140
5151
|
sysBizTypeId
|
|
5141
5152
|
]);
|
|
5142
|
-
var
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5153
|
+
var handleSearch = (0, import_react39.useCallback)((0, import_tools7.debounce)(800, function(searchName) {
|
|
5154
|
+
return searchFetch(searchName);
|
|
5155
|
+
}), [
|
|
5156
|
+
searchFetch
|
|
5157
|
+
]);
|
|
5158
|
+
var handleReset = (0, import_react39.useCallback)(function() {
|
|
5159
|
+
return searchFetch("");
|
|
5160
|
+
}, [
|
|
5161
|
+
searchFetch
|
|
5162
|
+
]);
|
|
5151
5163
|
(0, import_react_use10.useUpdateEffect)(function() {
|
|
5152
5164
|
if (!state.data) return;
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
setOptions(state.data.concat([
|
|
5157
|
-
{
|
|
5158
|
-
label: "\u5176\u5B83",
|
|
5159
|
-
value: 1310
|
|
5160
|
-
}
|
|
5161
|
-
]));
|
|
5162
|
-
}
|
|
5165
|
+
setOptions(showOtherBrand ? _to_consumable_array(state.data).concat([
|
|
5166
|
+
OTHER_BRAND_OPTION
|
|
5167
|
+
]) : state.data);
|
|
5163
5168
|
}, [
|
|
5164
5169
|
state.data,
|
|
5165
5170
|
showOtherBrand
|
|
@@ -5181,86 +5186,57 @@ var EffectBrandSelect = (0, import_react39.memo)(function(props) {
|
|
|
5181
5186
|
}, [
|
|
5182
5187
|
controlValue
|
|
5183
5188
|
]);
|
|
5184
|
-
var
|
|
5189
|
+
var handleChange = (0, import_react39.useCallback)(function(_value, _option) {
|
|
5185
5190
|
setValue(_value);
|
|
5186
5191
|
if (mode === "multiple") {
|
|
5187
|
-
var
|
|
5188
|
-
var labels =
|
|
5189
|
-
return
|
|
5192
|
+
var selectedOptions = _option;
|
|
5193
|
+
var labels = selectedOptions === null || selectedOptions === void 0 ? void 0 : selectedOptions.map(function(opt) {
|
|
5194
|
+
return opt.label;
|
|
5190
5195
|
}).join(">>>");
|
|
5191
5196
|
onChange === null || onChange === void 0 ? void 0 : onChange(_value, labels);
|
|
5192
5197
|
} else {
|
|
5193
|
-
var
|
|
5194
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(_value,
|
|
5198
|
+
var selectedOption = _option;
|
|
5199
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_value, selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.label);
|
|
5195
5200
|
}
|
|
5196
|
-
}
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
};
|
|
5200
|
-
var handleOnSearch = function handleOnSearch(searchName) {
|
|
5201
|
-
return searchFetch(searchName);
|
|
5202
|
-
};
|
|
5203
|
-
var handleOnSearchDebounce = (0, import_react39.useCallback)((0, import_tools7.debounce)(800, handleOnSearch), [
|
|
5204
|
-
categoryId,
|
|
5205
|
-
sysBizTypeId
|
|
5201
|
+
}, [
|
|
5202
|
+
mode,
|
|
5203
|
+
onChange
|
|
5206
5204
|
]);
|
|
5207
|
-
var handleOnClear = function handleOnClear() {
|
|
5208
|
-
return searchFetch("");
|
|
5209
|
-
};
|
|
5210
5205
|
if (state.error) {
|
|
5211
5206
|
var _state_error;
|
|
5212
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_antd26.Typography.Text, {
|
|
5213
5208
|
type: "danger",
|
|
5214
5209
|
children: (_state_error = state.error) === null || _state_error === void 0 ? void 0 : _state_error.toString()
|
|
5215
5210
|
});
|
|
5216
5211
|
}
|
|
5217
|
-
|
|
5218
|
-
|
|
5212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_antd26.Select, {
|
|
5213
|
+
className: (0, import_classnames9.default)(index_module_default12.input, className),
|
|
5219
5214
|
popupMatchSelectWidth: false,
|
|
5220
|
-
notFoundContent:
|
|
5215
|
+
notFoundContent: state.isLoading ? "\u641C\u7D22\u4E2D" : "\u672A\u67E5\u8BE2\u5230\u76F8\u5173\u54C1\u724C",
|
|
5221
5216
|
placeholder: "\u8BF7\u8F93\u5165\u54C1\u724C\u540D\u79F0",
|
|
5222
5217
|
optionFilterProp: "label",
|
|
5223
5218
|
showSearch: true,
|
|
5224
5219
|
allowClear: true,
|
|
5225
5220
|
defaultActiveFirstOption: false,
|
|
5226
5221
|
filterOption: false,
|
|
5227
|
-
onChange:
|
|
5228
|
-
onSearch:
|
|
5229
|
-
onDeselect:
|
|
5230
|
-
onClear:
|
|
5222
|
+
onChange: handleChange,
|
|
5223
|
+
onSearch: handleSearch,
|
|
5224
|
+
onDeselect: handleReset,
|
|
5225
|
+
onClear: handleReset,
|
|
5231
5226
|
loading: state.isLoading,
|
|
5232
5227
|
value: value,
|
|
5233
5228
|
options: options,
|
|
5234
5229
|
disabled: disabled,
|
|
5235
5230
|
mode: mode,
|
|
5236
5231
|
style: style
|
|
5237
|
-
};
|
|
5238
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_antd26.Select, _object_spread({
|
|
5239
|
-
className: (0, import_classnames9.default)(index_module_default11.input, className)
|
|
5240
|
-
}, selectBrandProps));
|
|
5232
|
+
});
|
|
5241
5233
|
});
|
|
5242
5234
|
// src/EffectSeriesSelect/index.tsx
|
|
5243
5235
|
var import_react40 = require("react");
|
|
5236
|
+
var import_antd27 = require("antd");
|
|
5244
5237
|
var import_react_use11 = require("react-use");
|
|
5245
5238
|
var import_tools8 = require("@xfe-repo/web-utils/tools");
|
|
5246
5239
|
var import_classnames10 = __toESM(require("classnames"));
|
|
5247
|
-
// src/EffectSeriesSelect/index.module.less
|
|
5248
|
-
var index_module_default13 = {
|
|
5249
|
-
input: "index_module_input5",
|
|
5250
|
-
hover: "index_module_hover",
|
|
5251
|
-
dropdown: "index_module_dropdown",
|
|
5252
|
-
img_opt: "index_module_img_opt",
|
|
5253
|
-
item: "index_module_item",
|
|
5254
|
-
icon_preview: "index_module_icon_preview",
|
|
5255
|
-
icon_eye: "index_module_icon_eye",
|
|
5256
|
-
item_img: "index_module_item_img",
|
|
5257
|
-
item_mask_img: "index_module_item_mask_img",
|
|
5258
|
-
item_label: "index_module_item_label",
|
|
5259
|
-
txt_opt: "index_module_txt_opt",
|
|
5260
|
-
active: "index_module_active2"
|
|
5261
|
-
};
|
|
5262
|
-
// src/EffectSeriesSelect/index.tsx
|
|
5263
|
-
var import_antd28 = require("antd");
|
|
5264
5240
|
// src/EffectSeriesSelect/useSeriesOptions.ts
|
|
5265
5241
|
var import_immutable4 = __toESM(require("swr/immutable"));
|
|
5266
5242
|
function useSeriesOptions(params) {
|
|
@@ -5309,6 +5285,21 @@ function useSeriesOptions(params) {
|
|
|
5309
5285
|
mutate: mutate
|
|
5310
5286
|
};
|
|
5311
5287
|
}
|
|
5288
|
+
// src/EffectSeriesSelect/index.module.less
|
|
5289
|
+
var index_module_default13 = {
|
|
5290
|
+
input: "index_module_input5",
|
|
5291
|
+
hover: "index_module_hover",
|
|
5292
|
+
dropdown: "index_module_dropdown",
|
|
5293
|
+
img_opt: "index_module_img_opt",
|
|
5294
|
+
item: "index_module_item",
|
|
5295
|
+
icon_preview: "index_module_icon_preview",
|
|
5296
|
+
icon_eye: "index_module_icon_eye",
|
|
5297
|
+
item_img: "index_module_item_img",
|
|
5298
|
+
item_mask_img: "index_module_item_mask_img",
|
|
5299
|
+
item_label: "index_module_item_label",
|
|
5300
|
+
txt_opt: "index_module_txt_opt",
|
|
5301
|
+
active: "index_module_active2"
|
|
5302
|
+
};
|
|
5312
5303
|
// src/EffectSeriesSelect/index.tsx
|
|
5313
5304
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5314
5305
|
var EffectSeriesSelect = (0, import_react40.memo)(function(props) {
|
|
@@ -5317,13 +5308,11 @@ var EffectSeriesSelect = (0, import_react40.memo)(function(props) {
|
|
|
5317
5308
|
var _ref1 = _sliced_to_array((0, import_react40.useState)([]), 2), options = _ref1[0], setOptions = _ref1[1];
|
|
5318
5309
|
var _ref2 = _sliced_to_array((0, import_react40.useState)(controlValue || defaultValue), 2), value = _ref2[0], setValue = _ref2[1];
|
|
5319
5310
|
var _ref3 = _sliced_to_array((0, import_react40.useState)(""), 2), searchValue = _ref3[0], setSearchValue = _ref3[1];
|
|
5320
|
-
var pageData = (0, import_react40.
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
};
|
|
5326
|
-
}, []);
|
|
5311
|
+
var pageData = (0, import_react40.useRef)({
|
|
5312
|
+
page: 1,
|
|
5313
|
+
pageSize: 12,
|
|
5314
|
+
hasMore: true
|
|
5315
|
+
});
|
|
5327
5316
|
var conditions = (0, import_react40.useMemo)(function() {
|
|
5328
5317
|
return {
|
|
5329
5318
|
categoryId: categoryId,
|
|
@@ -5333,29 +5322,30 @@ var EffectSeriesSelect = (0, import_react40.memo)(function(props) {
|
|
|
5333
5322
|
categoryId,
|
|
5334
5323
|
brandId
|
|
5335
5324
|
]);
|
|
5336
|
-
var searchFetch = (0, import_react40.useCallback)(function(params2) {
|
|
5337
|
-
var page = params2.page, searchValue2 = params2.searchValue, conditions2 = params2.conditions, value2 = params2.value;
|
|
5338
|
-
var pageSize = pageData.pageSize;
|
|
5339
|
-
var id = getNumberValue(value2);
|
|
5340
|
-
var serviceParams = _object_spread_props(_object_spread({}, conditions2), {
|
|
5341
|
-
id: id,
|
|
5342
|
-
seriesName: searchValue2,
|
|
5343
|
-
page: page,
|
|
5344
|
-
pageSize: pageSize
|
|
5345
|
-
});
|
|
5346
|
-
setParams(serviceParams);
|
|
5347
|
-
}, []);
|
|
5348
5325
|
var _ref4 = _sliced_to_array((0, import_react40.useState)({
|
|
5349
5326
|
categoryId: categoryId,
|
|
5350
5327
|
brandId: brandId,
|
|
5351
|
-
/** 兼容props分类Id 异常传入 */ id: getNumberValue(value),
|
|
5328
|
+
/** 兼容 props 分类 Id 异常传入 */ id: getNumberValue(value),
|
|
5352
5329
|
seriesName: searchValue,
|
|
5353
|
-
page: pageData.page,
|
|
5354
|
-
pageSize: pageData.pageSize
|
|
5330
|
+
page: pageData.current.page,
|
|
5331
|
+
pageSize: pageData.current.pageSize
|
|
5355
5332
|
}), 2), params = _ref4[0], setParams = _ref4[1];
|
|
5356
5333
|
var state = useSeriesOptions(params);
|
|
5357
5334
|
var prevControlValue = (0, import_react_use11.usePrevious)(controlValue);
|
|
5358
|
-
var
|
|
5335
|
+
var searchFetch = (0, import_react40.useCallback)(function(fetchParams) {
|
|
5336
|
+
var page = fetchParams.page, searchValue2 = fetchParams.searchValue, conditions2 = fetchParams.conditions, value2 = fetchParams.value;
|
|
5337
|
+
var pageSize = pageData.current.pageSize;
|
|
5338
|
+
var id = getNumberValue(value2);
|
|
5339
|
+
setParams(_object_spread_props(_object_spread({}, conditions2), {
|
|
5340
|
+
id: id,
|
|
5341
|
+
seriesName: searchValue2,
|
|
5342
|
+
page: page,
|
|
5343
|
+
pageSize: pageSize
|
|
5344
|
+
}));
|
|
5345
|
+
}, []);
|
|
5346
|
+
var debounceSearchFetch = (0, import_react40.useMemo)(function() {
|
|
5347
|
+
return (0, import_tools8.debounce)(300, searchFetch);
|
|
5348
|
+
}, [
|
|
5359
5349
|
searchFetch
|
|
5360
5350
|
]);
|
|
5361
5351
|
(0, import_react40.useEffect)(function() {
|
|
@@ -5371,9 +5361,12 @@ var EffectSeriesSelect = (0, import_react40.memo)(function(props) {
|
|
|
5371
5361
|
brandId: brandId
|
|
5372
5362
|
};
|
|
5373
5363
|
});
|
|
5374
|
-
|
|
5375
|
-
pageData.page
|
|
5376
|
-
pageData.hasMore = pageData.pageSize * pageData.page < state.data.total && newOptions.length > 0;
|
|
5364
|
+
var isFirstPage = state.data.page === 1;
|
|
5365
|
+
pageData.current.page = state.data.page;
|
|
5366
|
+
pageData.current.hasMore = pageData.current.pageSize * pageData.current.page < state.data.total && newOptions.length > 0;
|
|
5367
|
+
setOptions(function(prev) {
|
|
5368
|
+
return isFirstPage ? newOptions : _to_consumable_array(prev).concat(_to_consumable_array(newOptions));
|
|
5369
|
+
});
|
|
5377
5370
|
}, [
|
|
5378
5371
|
state.data
|
|
5379
5372
|
]);
|
|
@@ -5410,8 +5403,8 @@ var EffectSeriesSelect = (0, import_react40.memo)(function(props) {
|
|
|
5410
5403
|
searchValue,
|
|
5411
5404
|
conditions
|
|
5412
5405
|
]);
|
|
5413
|
-
var handleOnSearch = (0, import_react40.useCallback)(function(
|
|
5414
|
-
return setSearchValue(
|
|
5406
|
+
var handleOnSearch = (0, import_react40.useCallback)(function(text) {
|
|
5407
|
+
return setSearchValue(text);
|
|
5415
5408
|
}, []);
|
|
5416
5409
|
var handleOnClear = (0, import_react40.useCallback)(function() {
|
|
5417
5410
|
return setSearchValue("");
|
|
@@ -5424,7 +5417,7 @@ var EffectSeriesSelect = (0, import_react40.memo)(function(props) {
|
|
|
5424
5417
|
return [
|
|
5425
5418
|
4,
|
|
5426
5419
|
searchFetch({
|
|
5427
|
-
page: pageData.page + 1,
|
|
5420
|
+
page: pageData.current.page + 1,
|
|
5428
5421
|
value: value,
|
|
5429
5422
|
searchValue: searchValue,
|
|
5430
5423
|
conditions: conditions
|
|
@@ -5443,11 +5436,11 @@ var EffectSeriesSelect = (0, import_react40.memo)(function(props) {
|
|
|
5443
5436
|
searchValue,
|
|
5444
5437
|
conditions
|
|
5445
5438
|
]);
|
|
5446
|
-
var handleOnChange = (0, import_react40.useCallback)(function(
|
|
5439
|
+
var handleOnChange = (0, import_react40.useCallback)(function(newValue, option) {
|
|
5447
5440
|
var label = (option || {}).label;
|
|
5448
|
-
|
|
5449
|
-
setValue(
|
|
5450
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(
|
|
5441
|
+
var numValue = getNumberValue(newValue);
|
|
5442
|
+
setValue(numValue);
|
|
5443
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(numValue, label);
|
|
5451
5444
|
setOpenDropDown(false);
|
|
5452
5445
|
}, [
|
|
5453
5446
|
onChange
|
|
@@ -5457,27 +5450,25 @@ var EffectSeriesSelect = (0, import_react40.memo)(function(props) {
|
|
|
5457
5450
|
if (options.length) return "\u6CA1\u6709\u66F4\u591A\u4E86~";
|
|
5458
5451
|
return "\u6682\u65E0\u6570\u636E";
|
|
5459
5452
|
}, [
|
|
5460
|
-
state,
|
|
5461
|
-
options
|
|
5462
|
-
brandId
|
|
5453
|
+
state.isLoading,
|
|
5454
|
+
options.length
|
|
5463
5455
|
]);
|
|
5464
5456
|
var popupRender = (0, import_react40.useCallback)(function(_menu) {
|
|
5465
5457
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SelectDropdown, {
|
|
5466
5458
|
value: value,
|
|
5467
5459
|
options: options,
|
|
5468
5460
|
onLoadMore: handleOnLoadMore,
|
|
5469
|
-
hasMore: pageData.hasMore,
|
|
5461
|
+
hasMore: pageData.current.hasMore,
|
|
5470
5462
|
noMoreText: noMoreText,
|
|
5471
5463
|
onChange: handleOnChange
|
|
5472
5464
|
});
|
|
5473
5465
|
}, [
|
|
5474
5466
|
value,
|
|
5475
5467
|
options,
|
|
5476
|
-
state,
|
|
5477
5468
|
noMoreText,
|
|
5478
5469
|
handleOnChange
|
|
5479
5470
|
]);
|
|
5480
|
-
var
|
|
5471
|
+
var selectProps = {
|
|
5481
5472
|
popupMatchSelectWidth: false,
|
|
5482
5473
|
placeholder: "\u8BF7\u8F93\u5165\u7CFB\u5217\u540D\u79F0",
|
|
5483
5474
|
optionFilterProp: "label",
|
|
@@ -5500,9 +5491,9 @@ var EffectSeriesSelect = (0, import_react40.memo)(function(props) {
|
|
|
5500
5491
|
return document.body;
|
|
5501
5492
|
}
|
|
5502
5493
|
};
|
|
5503
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_antd27.Select, _object_spread({
|
|
5504
5495
|
className: (0, import_classnames10.default)(index_module_default13.input, className)
|
|
5505
|
-
},
|
|
5496
|
+
}, selectProps));
|
|
5506
5497
|
});
|
|
5507
5498
|
// src/EffectSpuSelect/index.tsx
|
|
5508
5499
|
var import_react41 = require("react");
|
|
@@ -5515,7 +5506,7 @@ var index_module_default14 = {
|
|
|
5515
5506
|
select: "index_module_select3"
|
|
5516
5507
|
};
|
|
5517
5508
|
// src/EffectSpuSelect/index.tsx
|
|
5518
|
-
var
|
|
5509
|
+
var import_antd28 = require("antd");
|
|
5519
5510
|
// src/EffectSpuSelect/useSpuOptions.ts
|
|
5520
5511
|
var import_immutable5 = __toESM(require("swr/immutable"));
|
|
5521
5512
|
function useSpuOptions(params) {
|
|
@@ -5765,13 +5756,13 @@ var EffectSpuSelect = (0, import_react41.memo)(function(props) {
|
|
|
5765
5756
|
return document.body;
|
|
5766
5757
|
}
|
|
5767
5758
|
};
|
|
5768
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5759
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_antd28.Select, _object_spread({
|
|
5769
5760
|
className: (0, import_classnames11.default)(index_module_default14.input, className)
|
|
5770
5761
|
}, selectBrandProps));
|
|
5771
5762
|
});
|
|
5772
5763
|
// src/EffectSkuTable/index.tsx
|
|
5773
5764
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
5774
|
-
var
|
|
5765
|
+
var _import_antd29_Table = import_antd29.Table, Column2 = _import_antd29_Table.Column;
|
|
5775
5766
|
var EffectSkuTable = (0, import_react42.memo)(function(props) {
|
|
5776
5767
|
var _curCategoryIds_slice;
|
|
5777
5768
|
var categoryIds = props.categoryIds, brandId = props.brandId, brandName = props.brandName, _props_seriesId = props.seriesId, seriesId = _props_seriesId === void 0 ? 0 : _props_seriesId, seriesName = props.seriesName, spuId = props.spuId, spuName = props.spuName, disabled = props.disabled, value = props.value, _props_showSkuId = props.showSkuId, showSkuId = _props_showSkuId === void 0 ? false : _props_showSkuId, _props_skuType = props.skuType, skuType = _props_skuType === void 0 ? "std" : _props_skuType, onChange = props.onChange;
|
|
@@ -6001,7 +5992,7 @@ var EffectSkuTable = (0, import_react42.memo)(function(props) {
|
|
|
6001
5992
|
skuImage: curSkuImage
|
|
6002
5993
|
}
|
|
6003
5994
|
];
|
|
6004
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
5995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_antd29.Table, _object_spread_props(_object_spread({}, commonTableProps), {
|
|
6005
5996
|
dataSource: skuDataSource,
|
|
6006
5997
|
rowKey: function rowKey(record) {
|
|
6007
5998
|
return record.categoryIds.join("_") || "empty";
|
|
@@ -6049,7 +6040,7 @@ var index_module_default15 = {
|
|
|
6049
6040
|
accept: "index_module_accept"
|
|
6050
6041
|
};
|
|
6051
6042
|
// src/EffectWithFilePanel/index.tsx
|
|
6052
|
-
var
|
|
6043
|
+
var import_antd30 = require("antd");
|
|
6053
6044
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
6054
6045
|
var EffectWithFilePanel = (0, import_react43.memo)(function(props) {
|
|
6055
6046
|
var disabled = props.disabled, children = props.children, header = props.header, defaultValue = props.defaultValue, onChange = props.onChange, onSave = props.onSave, max = props.max, accept = props.accept, remote = props.remote, title = props.title;
|
|
@@ -6060,7 +6051,7 @@ var EffectWithFilePanel = (0, import_react43.memo)(function(props) {
|
|
|
6060
6051
|
var handleCLose = function handleCLose() {
|
|
6061
6052
|
if (!uploadLoading) return true;
|
|
6062
6053
|
return new Promise(function(resolve) {
|
|
6063
|
-
|
|
6054
|
+
import_antd30.Modal.confirm({
|
|
6064
6055
|
title: "\u6587\u4EF6\u4E0A\u4F20\u4E2D, \u786E\u5B9A\u5173\u95ED\u4E48\uFF1F",
|
|
6065
6056
|
content: "\u5982\u679C\u5173\u95ED\uFF0C\u6B64\u6B21\u4E0A\u4F20\u4FDD\u5B58\u5C06\u4F1A\u5931\u8D25",
|
|
6066
6057
|
okType: "danger",
|
|
@@ -6078,9 +6069,9 @@ var EffectWithFilePanel = (0, import_react43.memo)(function(props) {
|
|
|
6078
6069
|
setUploadLoading(false);
|
|
6079
6070
|
setSubmitText(disabled ? "\u786E\u5B9A" : "\u4FDD\u5B58");
|
|
6080
6071
|
if (result) {
|
|
6081
|
-
void
|
|
6072
|
+
void import_antd30.message.success(msg || "\u4E0A\u4F20\u6210\u529F");
|
|
6082
6073
|
} else {
|
|
6083
|
-
void
|
|
6074
|
+
void import_antd30.message.error(msg);
|
|
6084
6075
|
}
|
|
6085
6076
|
};
|
|
6086
6077
|
var handleOnUpload = function handleOnUpload() {
|
|
@@ -6148,7 +6139,7 @@ var EffectWithFilePanel = (0, import_react43.memo)(function(props) {
|
|
|
6148
6139
|
});
|
|
6149
6140
|
// src/EffectSkuRecognize/index.tsx
|
|
6150
6141
|
var import_react44 = require("react");
|
|
6151
|
-
var
|
|
6142
|
+
var import_antd31 = require("antd");
|
|
6152
6143
|
var import_react_use14 = require("react-use");
|
|
6153
6144
|
// src/EffectSkuRecognize/index.module.less
|
|
6154
6145
|
var index_module_default16 = {
|
|
@@ -6156,7 +6147,7 @@ var index_module_default16 = {
|
|
|
6156
6147
|
};
|
|
6157
6148
|
// src/EffectSkuRecognize/index.tsx
|
|
6158
6149
|
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
6159
|
-
var
|
|
6150
|
+
var _import_antd31_Typography = import_antd31.Typography, Title = _import_antd31_Typography.Title, Text = _import_antd31_Typography.Text, Link = _import_antd31_Typography.Link;
|
|
6160
6151
|
var EffectSkuRecognize = (0, import_react44.memo)(function(props) {
|
|
6161
6152
|
var categoryId = props.categoryId, brandId = props.brandId, controlledValue = props.value, defaultValue = props.defaultValue, image = props.image, limitSize = props.limitSize, disabled = props.disabled, _props_size = props.size, size = _props_size === void 0 ? "default" : _props_size, _props_skuType = props.skuType, skuType = _props_skuType === void 0 ? "std" : _props_skuType, onChange = props.onChange;
|
|
6162
6153
|
var _ref = _sliced_to_array((0, import_react44.useState)(controlledValue || defaultValue), 2), value = _ref[0], setValue = _ref[1];
|
|
@@ -6271,19 +6262,19 @@ var EffectSkuRecognize = (0, import_react44.memo)(function(props) {
|
|
|
6271
6262
|
countRender: function countRender(current, total) {
|
|
6272
6263
|
var currentItem = skuList[current - 1] || {};
|
|
6273
6264
|
var currentImage = currentItem.image || currentItem.skuImage || "";
|
|
6274
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
6265
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_antd31.Space, {
|
|
6275
6266
|
children: [
|
|
6276
6267
|
current,
|
|
6277
6268
|
" / ",
|
|
6278
6269
|
total,
|
|
6279
|
-
!disabled && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6270
|
+
!disabled && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_antd31.Button, {
|
|
6280
6271
|
type: "primary",
|
|
6281
6272
|
onClick: function onClick() {
|
|
6282
6273
|
return handleSelected(currentItem);
|
|
6283
6274
|
},
|
|
6284
6275
|
children: "\u5C31\u662F\u5B83"
|
|
6285
6276
|
}),
|
|
6286
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6277
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_antd31.Button, {
|
|
6287
6278
|
onClick: function onClick() {
|
|
6288
6279
|
return window.open(currentImage);
|
|
6289
6280
|
},
|
|
@@ -6311,23 +6302,23 @@ var EffectSkuRecognize = (0, import_react44.memo)(function(props) {
|
|
|
6311
6302
|
})
|
|
6312
6303
|
]
|
|
6313
6304
|
});
|
|
6314
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_antd31.Spin, {
|
|
6315
6306
|
tip: "\u8BC6\u522B\u4E2D...",
|
|
6316
6307
|
spinning: state.loading,
|
|
6317
6308
|
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OSSImage.PreviewGroup, {
|
|
6318
6309
|
preview: previewProps,
|
|
6319
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6310
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_antd31.List, {
|
|
6320
6311
|
grid: gridProps[size],
|
|
6321
6312
|
header: listHeader,
|
|
6322
6313
|
dataSource: skuList,
|
|
6323
6314
|
className: index_module_default16.desc,
|
|
6324
6315
|
renderItem: function renderItem(item) {
|
|
6325
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_antd31.List.Item, {
|
|
6326
6317
|
className: index_module_default16.maring_top,
|
|
6327
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
6318
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_antd31.Card, {
|
|
6328
6319
|
hoverable: true,
|
|
6329
6320
|
children: [
|
|
6330
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6321
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_antd31.Badge, {
|
|
6331
6322
|
count: item.score,
|
|
6332
6323
|
overflowCount: 10,
|
|
6333
6324
|
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(OSSImage, {
|
|
@@ -6345,7 +6336,7 @@ var EffectSkuRecognize = (0, import_react44.memo)(function(props) {
|
|
|
6345
6336
|
item.name || item.skuName
|
|
6346
6337
|
]
|
|
6347
6338
|
}),
|
|
6348
|
-
!disabled && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6339
|
+
!disabled && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_antd31.Button, {
|
|
6349
6340
|
type: item.skuId === value ? "primary" : "default",
|
|
6350
6341
|
block: true,
|
|
6351
6342
|
onClick: function onClick() {
|
|
@@ -6433,7 +6424,7 @@ var index_module_default17 = {
|
|
|
6433
6424
|
selector: "index_module_selector"
|
|
6434
6425
|
};
|
|
6435
6426
|
// src/EffectMerchantSelect/index.tsx
|
|
6436
|
-
var
|
|
6427
|
+
var import_antd32 = require("antd");
|
|
6437
6428
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
6438
6429
|
var EffectMerchantSelect = (0, import_react45.memo)(function(props) {
|
|
6439
6430
|
var onChange = props.onChange, className = props.className, controlValue = props.value, disabled = props.disabled, _props_source = props.source, source = _props_source === void 0 ? "businessNo" : _props_source, _props_labelDisplayMode = props.labelDisplayMode, labelDisplayMode = _props_labelDisplayMode === void 0 ? "platformName" : _props_labelDisplayMode;
|
|
@@ -6497,7 +6488,7 @@ var EffectMerchantSelect = (0, import_react45.memo)(function(props) {
|
|
|
6497
6488
|
};
|
|
6498
6489
|
if (state.error) {
|
|
6499
6490
|
var _state_error;
|
|
6500
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6491
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_antd32.Typography.Text, {
|
|
6501
6492
|
type: "danger",
|
|
6502
6493
|
children: (_state_error = state.error) === null || _state_error === void 0 ? void 0 : _state_error.toString()
|
|
6503
6494
|
});
|
|
@@ -6538,8 +6529,8 @@ var EffectMerchantSelect = (0, import_react45.memo)(function(props) {
|
|
|
6538
6529
|
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", {
|
|
6539
6530
|
className: index_module_default17.merchant_select_wrap,
|
|
6540
6531
|
children: [
|
|
6541
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6542
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6532
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_antd32.Select, _object_spread({}, addonBeforeProps)),
|
|
6533
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_antd32.Select, _object_spread({
|
|
6543
6534
|
className: (0, import_classnames12.default)(index_module_default17.selector, className)
|
|
6544
6535
|
}, selectBrandProps))
|
|
6545
6536
|
]
|
|
@@ -6547,11 +6538,11 @@ var EffectMerchantSelect = (0, import_react45.memo)(function(props) {
|
|
|
6547
6538
|
});
|
|
6548
6539
|
// src/EffectScopeSelect/index.tsx
|
|
6549
6540
|
var import_react47 = require("react");
|
|
6550
|
-
var
|
|
6541
|
+
var import_antd34 = require("antd");
|
|
6551
6542
|
var import_react_use16 = require("react-use");
|
|
6552
6543
|
// src/EffectScopeSelect/ScopeViewMode.tsx
|
|
6553
6544
|
var import_react46 = require("react");
|
|
6554
|
-
var
|
|
6545
|
+
var import_antd33 = require("antd");
|
|
6555
6546
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
6556
6547
|
var ScopeViewMode = (0, import_react46.memo)(function(props) {
|
|
6557
6548
|
var _ref = props || {}, categoryIds = _ref.categoryIds, categoryName = _ref.categoryName, brandId = _ref.brandId, brandName = _ref.brandName, seriesId = _ref.seriesId, seriesName = _ref.seriesName, spuId = _ref.spuId, spuName = _ref.spuName, skuId = _ref.skuId, skuName = _ref.skuName;
|
|
@@ -6576,18 +6567,18 @@ var ScopeViewMode = (0, import_react46.memo)(function(props) {
|
|
|
6576
6567
|
label: "SKU",
|
|
6577
6568
|
value: skuName || String(skuId)
|
|
6578
6569
|
});
|
|
6579
|
-
if (items.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6570
|
+
if (items.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_antd33.Typography.Text, {
|
|
6580
6571
|
style: {
|
|
6581
6572
|
fontSize: 14
|
|
6582
6573
|
},
|
|
6583
6574
|
type: "danger",
|
|
6584
6575
|
children: "\u8BF7\u5148\u9009\u62E9\u54C1\u7C7B\u4FE1\u606F"
|
|
6585
6576
|
});
|
|
6586
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6577
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_antd33.Space, {
|
|
6587
6578
|
size: 4,
|
|
6588
6579
|
children: items.map(function(param) {
|
|
6589
6580
|
var label = param.label, value = param.value;
|
|
6590
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
6581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_antd33.Space, {
|
|
6591
6582
|
size: 4,
|
|
6592
6583
|
style: {
|
|
6593
6584
|
height: 32,
|
|
@@ -6595,7 +6586,7 @@ var ScopeViewMode = (0, import_react46.memo)(function(props) {
|
|
|
6595
6586
|
borderRadius: 6
|
|
6596
6587
|
},
|
|
6597
6588
|
children: [
|
|
6598
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
6589
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_antd33.Typography.Text, {
|
|
6599
6590
|
style: {
|
|
6600
6591
|
fontSize: 14,
|
|
6601
6592
|
paddingRight: 16
|
|
@@ -6605,7 +6596,7 @@ var ScopeViewMode = (0, import_react46.memo)(function(props) {
|
|
|
6605
6596
|
":"
|
|
6606
6597
|
]
|
|
6607
6598
|
}),
|
|
6608
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6599
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_antd33.Typography.Text, {
|
|
6609
6600
|
style: {
|
|
6610
6601
|
fontSize: 14
|
|
6611
6602
|
},
|
|
@@ -6733,9 +6724,9 @@ var EffectScopeSelect = (0, import_react47.memo)(function(props) {
|
|
|
6733
6724
|
requireLevel
|
|
6734
6725
|
]);
|
|
6735
6726
|
var renderLabel = (0, import_react47.useCallback)(function(label, required) {
|
|
6736
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
6727
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_antd34.Flex, {
|
|
6737
6728
|
flex: "0 0 auto",
|
|
6738
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
6729
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_antd34.Space, {
|
|
6739
6730
|
children: [
|
|
6740
6731
|
required && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", {
|
|
6741
6732
|
style: {
|
|
@@ -6756,13 +6747,13 @@ var EffectScopeSelect = (0, import_react47.memo)(function(props) {
|
|
|
6756
6747
|
if (mode === "view") {
|
|
6757
6748
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ScopeViewMode, _object_spread({}, value));
|
|
6758
6749
|
}
|
|
6759
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
6750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_antd34.Flex, {
|
|
6760
6751
|
justify: "flex-start",
|
|
6761
6752
|
align: "center",
|
|
6762
6753
|
wrap: "nowrap",
|
|
6763
6754
|
gap: "15px",
|
|
6764
6755
|
children: [
|
|
6765
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
6756
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_antd34.Flex, {
|
|
6766
6757
|
align: "center",
|
|
6767
6758
|
gap: "5px",
|
|
6768
6759
|
flex: "0 0 auto",
|
|
@@ -6775,7 +6766,7 @@ var EffectScopeSelect = (0, import_react47.memo)(function(props) {
|
|
|
6775
6766
|
})
|
|
6776
6767
|
]
|
|
6777
6768
|
}),
|
|
6778
|
-
lastLevelCategoryId && scopeLevel >= 2 /* BRAND */ && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
6769
|
+
lastLevelCategoryId && scopeLevel >= 2 /* BRAND */ && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_antd34.Flex, {
|
|
6779
6770
|
align: "center",
|
|
6780
6771
|
gap: "5px",
|
|
6781
6772
|
flex: "0 0 auto",
|
|
@@ -6789,7 +6780,7 @@ var EffectScopeSelect = (0, import_react47.memo)(function(props) {
|
|
|
6789
6780
|
}))
|
|
6790
6781
|
]
|
|
6791
6782
|
}),
|
|
6792
|
-
!!value.brandId && scopeLevel >= 3 /* SERIES */ && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
6783
|
+
!!value.brandId && scopeLevel >= 3 /* SERIES */ && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_antd34.Flex, {
|
|
6793
6784
|
align: "center",
|
|
6794
6785
|
gap: "5px",
|
|
6795
6786
|
flex: "0 0 auto",
|
|
@@ -6803,7 +6794,7 @@ var EffectScopeSelect = (0, import_react47.memo)(function(props) {
|
|
|
6803
6794
|
}))
|
|
6804
6795
|
]
|
|
6805
6796
|
}),
|
|
6806
|
-
!!value.seriesId && scopeLevel >= 4 /* SPU */ && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
6797
|
+
!!value.seriesId && scopeLevel >= 4 /* SPU */ && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_antd34.Flex, {
|
|
6807
6798
|
align: "center",
|
|
6808
6799
|
gap: "5px",
|
|
6809
6800
|
flex: "0 0 auto",
|
|
@@ -6817,7 +6808,7 @@ var EffectScopeSelect = (0, import_react47.memo)(function(props) {
|
|
|
6817
6808
|
}))
|
|
6818
6809
|
]
|
|
6819
6810
|
}),
|
|
6820
|
-
!!value.spuId && scopeLevel >= 5 /* SKU */ && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
6811
|
+
!!value.spuId && scopeLevel >= 5 /* SKU */ && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_antd34.Flex, {
|
|
6821
6812
|
align: "center",
|
|
6822
6813
|
gap: "5px",
|
|
6823
6814
|
flex: "0 0 auto",
|
|
@@ -6838,7 +6829,7 @@ var EffectScopeSelect = (0, import_react47.memo)(function(props) {
|
|
|
6838
6829
|
var import_react48 = require("react");
|
|
6839
6830
|
var import_react_use17 = require("react-use");
|
|
6840
6831
|
var import_classnames13 = __toESM(require("classnames"));
|
|
6841
|
-
var
|
|
6832
|
+
var import_antd35 = require("antd");
|
|
6842
6833
|
var import_tools11 = require("@xfe-repo/web-utils/tools");
|
|
6843
6834
|
// src/EffectStaffSelect/index.module.less
|
|
6844
6835
|
var index_module_default18 = {
|
|
@@ -6942,7 +6933,7 @@ var EffectStaffSelect = (0, import_react48.memo)(function(props) {
|
|
|
6942
6933
|
}
|
|
6943
6934
|
};
|
|
6944
6935
|
var defaultPlaceholder = deptId ? "\u8BF7\u9009\u62E9\u5458\u5DE5\u59D3\u540D" : "\u8BF7\u5148\u8F93\u5165\u5458\u5DE5\u59D3\u540D";
|
|
6945
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_antd35.Select, {
|
|
6946
6937
|
className: (0, import_classnames13.default)(index_module_default18.select, className),
|
|
6947
6938
|
style: style,
|
|
6948
6939
|
notFoundContent: state.loading ? "\u641C\u7D22\u4E2D" : ((_state_value = state.value) === null || _state_value === void 0 ? void 0 : (_state_value_data = _state_value.data) === null || _state_value_data === void 0 ? void 0 : _state_value_data.total) === 0 ? "\u6682\u65E0\u6570\u636E" : defaultPlaceholder,
|
|
@@ -6963,7 +6954,7 @@ var EffectStaffSelect = (0, import_react48.memo)(function(props) {
|
|
|
6963
6954
|
// src/EffectReservoirSelect/EffectReservoirSelect.tsx
|
|
6964
6955
|
var import_react49 = require("react");
|
|
6965
6956
|
var import_react_use18 = require("react-use");
|
|
6966
|
-
var
|
|
6957
|
+
var import_antd36 = require("antd");
|
|
6967
6958
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
6968
6959
|
var EffectReservoirSelect = (0, import_react49.memo)(function(props) {
|
|
6969
6960
|
var onChange = props.onChange, className = props.className, defaultValue = props.defaultValue, controlValue = props.value, disabled = props.disabled, warehouseId = props.warehouseId, _props_reservoirType = props.reservoirType, reservoirType = _props_reservoirType === void 0 ? "normal" : _props_reservoirType;
|
|
@@ -7052,14 +7043,14 @@ var EffectReservoirSelect = (0, import_react49.memo)(function(props) {
|
|
|
7052
7043
|
onChange: handleOnChange,
|
|
7053
7044
|
loading: state.loading
|
|
7054
7045
|
};
|
|
7055
|
-
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
7046
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_antd36.Select, _object_spread({
|
|
7056
7047
|
className: className
|
|
7057
7048
|
}, selectBrandProps));
|
|
7058
7049
|
});
|
|
7059
7050
|
// src/EffectReservoirSelect/EffectShelveSelect.tsx
|
|
7060
7051
|
var import_react50 = require("react");
|
|
7061
7052
|
var import_react_use19 = require("react-use");
|
|
7062
|
-
var
|
|
7053
|
+
var import_antd37 = require("antd");
|
|
7063
7054
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
7064
7055
|
var EffectShelveSelect = (0, import_react50.memo)(function(props) {
|
|
7065
7056
|
var onChange = props.onChange, className = props.className, defaultValue = props.defaultValue, controlValue = props.value, disabled = props.disabled, warehouseId = props.warehouseId, reservoirId = props.reservoirId;
|
|
@@ -7152,12 +7143,12 @@ var EffectShelveSelect = (0, import_react50.memo)(function(props) {
|
|
|
7152
7143
|
onChange: handleOnChange,
|
|
7153
7144
|
loading: state.loading
|
|
7154
7145
|
};
|
|
7155
|
-
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
7146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd37.Select, _object_spread({
|
|
7156
7147
|
className: className
|
|
7157
7148
|
}, selectBrandProps));
|
|
7158
7149
|
});
|
|
7159
7150
|
// src/EffectWarehouseSelect/index.tsx
|
|
7160
|
-
var
|
|
7151
|
+
var import_antd38 = require("antd");
|
|
7161
7152
|
var import_classnames14 = __toESM(require("classnames"));
|
|
7162
7153
|
var import_react51 = require("react");
|
|
7163
7154
|
// src/EffectWarehouseSelect/useStoreOptions.ts
|
|
@@ -7233,7 +7224,7 @@ var EffectWarehouseSelect = (0, import_react51.memo)(function(props) {
|
|
|
7233
7224
|
var handleClear = function handleClear() {
|
|
7234
7225
|
onChange === null || onChange === void 0 ? void 0 : onChange(void 0, void 0);
|
|
7235
7226
|
};
|
|
7236
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_antd38.Select, {
|
|
7237
7228
|
className: (0, import_classnames14.default)(index_module_default19.select, className),
|
|
7238
7229
|
placeholder: "\u8BF7\u9009\u62E9\u4ED3\u5E93",
|
|
7239
7230
|
notFoundContent: state.isLoading ? "\u52A0\u8F7D\u4E2D..." : "\u6682\u65E0\u4ED3\u5E93\u6570\u636E",
|
|
@@ -7255,7 +7246,7 @@ var index_module_default20 = {
|
|
|
7255
7246
|
select: "index_module_select6"
|
|
7256
7247
|
};
|
|
7257
7248
|
// src/EffectAddressCascade/index.tsx
|
|
7258
|
-
var
|
|
7249
|
+
var import_antd39 = require("antd");
|
|
7259
7250
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
7260
7251
|
var EffectAddressCascade = (0, import_react52.memo)(function(props) {
|
|
7261
7252
|
var _selectedList_;
|
|
@@ -7353,7 +7344,7 @@ var EffectAddressCascade = (0, import_react52.memo)(function(props) {
|
|
|
7353
7344
|
setSelectedList(_selectedList);
|
|
7354
7345
|
if (onChange) onChange(_selectedList);
|
|
7355
7346
|
};
|
|
7356
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7347
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_antd39.Cascader, {
|
|
7357
7348
|
className: (0, import_classnames15.default)(index_module_default20.input, className),
|
|
7358
7349
|
disabled: disabled,
|
|
7359
7350
|
defaultValue: defaultValue,
|
|
@@ -7437,7 +7428,7 @@ var index_module_default21 = {
|
|
|
7437
7428
|
select: "index_module_select7"
|
|
7438
7429
|
};
|
|
7439
7430
|
// src/EffectLabelSelect/index.tsx
|
|
7440
|
-
var
|
|
7431
|
+
var import_antd40 = require("antd");
|
|
7441
7432
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
7442
7433
|
var EffectLabelSelect = (0, import_react53.memo)(function(props) {
|
|
7443
7434
|
var onChange = props.onChange, className = props.className, value = props.value, disabled = props.disabled, defaultLabel = props.defaultLabel, _props_labelDic = props.labelDic, labelDic = _props_labelDic === void 0 ? defaultLabelDic : _props_labelDic, onFetchData = props.onFetchData, _props_onTransformData = props.onTransformData, onTransformData = _props_onTransformData === void 0 ? defaultTransformDataFn : _props_onTransformData, _props_fetchParams = props.fetchParams, fetchParams = _props_fetchParams === void 0 ? {} : _props_fetchParams, _props_customLabelInValue = props.customLabelInValue, customLabelInValue = _props_customLabelInValue === void 0 ? false : _props_customLabelInValue, optionsDisplayType = props.optionsDisplayType, style = props.style;
|
|
@@ -7528,12 +7519,12 @@ var EffectLabelSelect = (0, import_react53.memo)(function(props) {
|
|
|
7528
7519
|
filterOption: false,
|
|
7529
7520
|
popupMatchSelectWidth: false
|
|
7530
7521
|
};
|
|
7531
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
7522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_antd40.Space.Compact, {
|
|
7532
7523
|
className: index_module_default21.select_wrap,
|
|
7533
7524
|
style: style,
|
|
7534
7525
|
children: [
|
|
7535
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7536
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7526
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_antd40.Select, _object_spread({}, selectLabelProps)),
|
|
7527
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_antd40.Select, _object_spread({}, selectValueProps))
|
|
7537
7528
|
]
|
|
7538
7529
|
});
|
|
7539
7530
|
});
|