Commit 11599d21 authored by 田翔's avatar 田翔

fix: 地址坐标初始未赋值问题

parent 8d3743a2
{
"name": "panda-xform",
"version": "3.0.2",
"description": "3.0.2: 测试提交增加提示 ",
"version": "3.0.3",
"description": "3.0.3: 地址坐标初始未赋值问题",
"keywords": [
"panda-xform"
],
......
......@@ -4,7 +4,7 @@ import { AMap } from '@wisdom-map/amap'
const SearchLocation = (props) => {
const { value, onChange, name, schema, addons } = props
const { disabled, placeholder } = schema
const { disabled, placeholder, presetValue } = schema
const [extraData, setExtraData] = useState(null);
const [address, setAddress] = useState('');
......@@ -44,6 +44,12 @@ const SearchLocation = (props) => {
}
}
useEffect(() => {
if (addons) {
addons.setValue(addons.dataPath, presetValue)
}
}, [presetValue])
useEffect(() => {
if (addons) {
renderSearch()
......
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