-
Notifications
You must be signed in to change notification settings - Fork 58
Description
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>
)
})
比如自己写了一个选择成员的,但是该怎么把数据注入到整个结构里?