@bit-sun/business-component 4.0.12-alpha.23 → 4.0.12-alpha.25
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.esm.js +458 -413
- package/dist/index.js +459 -414
- package/package.json +1 -1
- package/src/components/Business/PropertyModal/index.tsx +15 -10
package/package.json
CHANGED
|
@@ -84,11 +84,11 @@ const PropertySelector = ({
|
|
|
84
84
|
|
|
85
85
|
const newArr = (data?.data || []).map((item: any) => {
|
|
86
86
|
return {
|
|
87
|
-
propertyCode: item.property
|
|
88
|
-
propertyName: item.property
|
|
89
|
-
propertyId: item.property
|
|
90
|
-
isCommonUse: item.property
|
|
91
|
-
detailList: item.propertyValueList.map((detail: any) => ({
|
|
87
|
+
propertyCode: item.property?.propertyCode,
|
|
88
|
+
propertyName: item.property?.name,
|
|
89
|
+
propertyId: item.property?.id,
|
|
90
|
+
isCommonUse: item.property?.isCommonUse === 'commonUse',
|
|
91
|
+
detailList: (item.propertyValueList || []).map((detail: any) => ({
|
|
92
92
|
name: detail.value,
|
|
93
93
|
value: detail.value,
|
|
94
94
|
isCommonUse: detail.isCommonUse === 'commonUse',
|
|
@@ -104,17 +104,22 @@ const PropertySelector = ({
|
|
|
104
104
|
|
|
105
105
|
|
|
106
106
|
useEffect(() => {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
if (visible) {
|
|
108
|
+
// 获取选中品类信息
|
|
109
|
+
setChoosedClassify(value?.classifyCode || classifyOptionList[0]?.value);
|
|
110
|
+
}
|
|
110
111
|
// 获取选中属性值展示
|
|
111
112
|
const choosedPropertyList = (value?.propertyList || []).map(item => (item.detailList || []).map(detail => detail.name)).flat();
|
|
112
113
|
if ((value?.propertyList || []).some(item => !item.isCommonUse)) {
|
|
113
114
|
setShowNotCommon(true);
|
|
114
115
|
}
|
|
116
|
+
settingValue.current = {
|
|
117
|
+
...value,
|
|
118
|
+
classifyCode: value?.classifyCode || classifyOptionList[0]?.value,
|
|
119
|
+
};
|
|
115
120
|
setChoosedValues(choosedPropertyList);
|
|
116
|
-
|
|
117
|
-
}, [value])
|
|
121
|
+
|
|
122
|
+
}, [value, visible])
|
|
118
123
|
|
|
119
124
|
// 关闭弹窗回传组件值
|
|
120
125
|
const handleConfirm = () => {
|