Commit e210d04b authored by 田翔's avatar 田翔

fix: 下拉框问题

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