Commit 1d2f86f1 authored by 武广's avatar 武广

fix: 修改添加商品没有属性报错问题

parent 36d460ca
...@@ -420,6 +420,7 @@ class goodsManage extends Component { ...@@ -420,6 +420,7 @@ class goodsManage extends Component {
} }
}); });
const attributeApplyList = []; const attributeApplyList = [];
if (values.attributeApplyList && values.attributeApplyList.length) {
values.attributeApplyList.forEach(item => { values.attributeApplyList.forEach(item => {
const key = Object.keys(item)[0]; const key = Object.keys(item)[0];
let attrs = item[key]; let attrs = item[key];
...@@ -443,6 +444,7 @@ class goodsManage extends Component { ...@@ -443,6 +444,7 @@ class goodsManage extends Component {
attributeApplyValueList: attrs, attributeApplyValueList: attrs,
}); });
}); });
}
await this.setState(prev => ({ await this.setState(prev => ({
confirmLoading: true, confirmLoading: true,
createData: { createData: {
...@@ -859,6 +861,7 @@ class goodsManage extends Component { ...@@ -859,6 +861,7 @@ class goodsManage extends Component {
})( })(
<Select <Select
mode={this.getMode(k.supportCustomValue, k.optionType)} mode={this.getMode(k.supportCustomValue, k.optionType)}
maxTagTextLength={8}
allowClear allowClear
> >
{k.valueList && {k.valueList &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment