@kc-components/basic
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

@kc-components/basic

Usage


import { Input } from 'antd';
import { JsonSchemaForm } from '@kc-components/basic';
import { JsonSchemaFormItemType } from '@kc-components/basic/JsonSchemaForm/type';

const schema: JsonSchemaFormItemType[] = [
  {
    $type: 'input',
    formItemProps: {
      label: '用户名',
      name: 'username',
    },
    placeholder: '请输入用户名',
  },
  {
    $type: 'password',
    formItemProps: {
      label: '密码',
      name: 'password',
    },
    placeholder: '请输入用户名',
  },
];

export default () => {
  return (
    <JsonSchemaForm
      schema={schema}
      formProps={{
        onFinish(values) {
          console.log('values---', values);
        },
      }}
    />
  );
};

Readme

Keywords

none

Package Sidebar

Install

npm i @kc-components/basic

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

62.4 kB

Total Files

43

Last publish

Collaborators

  • jackson-mseven