Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
linshuizhaoying opened this issue Dec 4, 2024 · 0 comments

Comments

@linshuizhaoying
Copy link

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>

)
})

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant