1.6.6 • Published 5 months ago

@fruits-chain/sop v1.6.6

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

sop

SOP 业务公共组件, 内部对 SOP 表单、预览进行了封装

使用

yarn add @fruits-chain/sop @fruits-chain/upload

请确保项目安装了上述包中peerDependencies列出的所有三方包,并仔细检查版本。

API

Form

SOP 表单组件

使用

import React from 'react'
import { SopForm, useSopForm } from '@fruits-chain/sop'

const Demo = () => {
  const form = useSopForm()
  return (
    <SopForm
      loading={false}
      uuid={'uuid'}
      form={form}
      data={[]}
      title={'title'}
      uploadProps={
        {
          // upload props
        }
      }
    />
  )
}

Preview

SOP 预览组件

使用

import React from 'react'
import { SopPreview } from '@fruits-chain/sop'

const Demo = () => {
  return <SopPreview loading={false} data={[]} title={'title'} />
}

useSopForm

创建SopForm组件的form属性实例,相较xiaoshuform, 其多了一个属性strictValidation, 其值为bool类型, 用来控制表单是否需要严格校验, 在调用form.validateFields方法时, 用户应该手动设置该属性的值

1.6.6

5 months ago

1.6.5

5 months ago

1.2.0

10 months ago

1.1.1

11 months ago

1.1.0

11 months ago

1.6.4

6 months ago

1.6.3

6 months ago

1.6.2

6 months ago

1.1.7

11 months ago

1.1.6

11 months ago

1.6.0

6 months ago

1.1.5

11 months ago

1.1.4

11 months ago

1.4.0

9 months ago

1.2.2

10 months ago

1.1.3

11 months ago

1.3.0

9 months ago

1.2.1

10 months ago

1.1.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago