import React, { useEffect } from 'react'
import { InputNumber } from 'antd'
const AutoCalculate = (props) => {
const { value, onChange, schema, addons } = props
const { disabled, presetValue } = schema
useEffect(() => {
onChange(presetValue)
}, [presetValue])
return (
<InputNumber
value={Number(value)}
style={{ width: '100%' }}
disabled={disabled}
>
</InputNumber>
)
}
export default AutoCalculate
-
田翔 authorede18b4890