Skip to content

业务怎么结合呢 没有 demo 不太清楚怎么把业务数据注入进去 #3

@linshuizhaoying

Description

@linshuizhaoying

import * as React from 'react';
import { memo, useState } from "react"
import { ButtonSelect } from "../../../components/workflow-editor/components/ButtonSelect"
import { QuestionCircleOutlined } from "@ant-design/icons"
import { FormAuth } from "./FormAuth"
import { useTranslate } from "../../../components/workflow-editor/react-locales"
import { Form, Radio } from "antd"
import FormItem from "antd/es/form/FormItem"
import SelectDepartmentUser from '../components/select-department-user';

export interface IApproverSettings {

}

export const ApproverPanel = memo((
props: {
value?: IApproverSettings
onChange?: (value?: IApproverSettings) => void
}
) => {
const [settingsType, setSettingsType] = useState("node")
const t = useTranslate()

return (


<FormItem label={t("approveType")}>
<Radio.Group>
{t("manualApproval")}
{t("autoPass")}
{/* {t("autoReject")} */}
</Radio.Group>

<ButtonSelect
options={[
{
key: "node",
label: t("setApprover"),
},
// {
// key: "formAuth",
// label: <>{t("formAuth")} </>
// },
// {
// key: "addvancedSettings",
// label: t("addvancedSettings")
// }
]}
value={settingsType}
onChange={setSettingsType}
/>

  {settingsType === "node" && <>
    <SelectDepartmentUser />

  </>}
</Form>

)
})

比如自己写了一个选择成员的,但是该怎么把数据注入到整个结构里?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions