Commit e210d04b authored by 田翔's avatar 田翔

fix: 下拉框问题

parent 33628a00
{
"name": "panda-xform",
"version": "2.7.0",
"description": "2.7.0: 样式组件修改",
"version": "2.7.1",
"description": "2.7.1: 下拉框问题",
"keywords": [
"panda-xform"
],
......
......@@ -96,30 +96,20 @@ const ComboBox = (props) => {
}
}
if (sourceType === '站点') {
getStation()
}
}
}
const getStation = async () => {
const { code, data, msg } = await getStationIDListByUserID(userID, !isMySite)
if (code === 0) {
if (Array.isArray(data)) {
setSite(data)
} else {
setSite([])
const { code, data, msg } = await getStationIDListByUserID(userID, !isMySite)
if (code === 0) {
if (Array.isArray(data)) {
setSite(data)
} else {
setSite([])
}
} else {
message.error(msg)
}
}
} else {
message.error(msg)
}
}
useEffect(async () => {
if (sourceType === '站点' && isStoreID) {
getStation()
}
}, [])
return (
<Select
onFocus={onFocus}
......
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