@schema-render/form-render-react
Version:
Out-of-the-box form rendering library based on Core and Antd.
15 lines (14 loc) • 425 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { Rate as AntRate } from "antd";
const Rate = ({ schema, disabled, readonly, value, onChange })=>{
return /*#__PURE__*/ _jsx(AntRate, {
...schema.renderOptions,
value: value ?? 0,
onChange: onChange,
// 禁用态、只读态都表现为禁用
disabled: disabled || readonly
});
};
export default {
component: Rate
};