Commit 3b787f93 authored by 田翔's avatar 田翔

fix: 默认第一个站点bug修复

parent dae8b742
{
"name": "panda-xform",
"version": "4.7.1",
"description": "4.7.1 关联选择支持清空",
"version": "4.7.2",
"description": "4.7.2 默认第一个站点bug修复",
"keywords": [
"panda-xform"
],
......
......@@ -82,9 +82,10 @@ const ComboBox = (props) => {
const { code, data, msg } = await getStationIDListByUserID(userID, !isMySite)
if (code === 0) {
if (Array.isArray(data)) {
setSite(data.map(v => ({ stationID: v.stationID + '', stationName: v.stationName })))
let values = data.map(v => ({ stationID: v.stationID + '', stationName: v.stationName }))
setSite(values)
if (!value && !presetValue) {
onChange(data[0][isStoreID ? 'stationID' : 'stationName'])
onChange(values[0][isStoreID ? 'stationID' : 'stationName'])
}
} else {
setSite([])
......
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