Commit fc75f812 authored by GuanHua's avatar GuanHua

fix: 店铺装修选择商品品牌筛选,品牌选择列表问题

parent 41cc5889
...@@ -23,6 +23,7 @@ const CustomInputSearch = props => { ...@@ -23,6 +23,7 @@ const CustomInputSearch = props => {
const [dataOption, setDataOption] = useState<any>([]) const [dataOption, setDataOption] = useState<any>([])
useEffect(() => { useEffect(() => {
console.log(option, 'option')
setDataOption(option) setDataOption(option)
}, [option]) }, [option])
......
...@@ -16,7 +16,7 @@ export const searchBrandOptionEffect = ( ...@@ -16,7 +16,7 @@ export const searchBrandOptionEffect = (
}).then(res => { }).then(res => {
context.setFieldState(fieldName, state => { context.setFieldState(fieldName, state => {
state.props['x-component-props'].dataoption = res.data?.data?.map(item => { state.props['x-component-props'].dataoption = res.data?.data?.map(item => {
return { label: item.name, value: item.id }; return { name: item.name, id: item.id };
}); });
}); });
}); });
......
...@@ -53,6 +53,7 @@ const CommoditySchema: ISchema = { ...@@ -53,6 +53,7 @@ const CommoditySchema: ISchema = {
style: { width: '174px' }, style: { width: '174px' },
searchValue: null, searchValue: null,
dataoption: [], dataoption: [],
fieldNames: { label: 'title', value: 'id', children: 'children' },
}, },
}, },
categoryId: { categoryId: {
......
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