You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.tsx 1.1KB

12345678910111213141516171819202122232425262728293031323334
  1. import TopNItem from '@/components/top-n-item';
  2. import { useTranslate } from '@/hooks/common-hooks';
  3. import { Form, Input, Select } from 'antd';
  4. import { GoogleCountryOptions, GoogleLanguageOptions } from '../../constant';
  5. import { IOperatorForm } from '../../interface';
  6. import DynamicInputVariable from '../components/dynamic-input-variable';
  7. const GoogleForm = ({ onValuesChange, form, node }: IOperatorForm) => {
  8. const { t } = useTranslate('flow');
  9. return (
  10. <Form
  11. name="basic"
  12. autoComplete="off"
  13. form={form}
  14. onValuesChange={onValuesChange}
  15. layout={'vertical'}
  16. >
  17. <DynamicInputVariable nodeId={node?.id}></DynamicInputVariable>
  18. <TopNItem initialValue={10}></TopNItem>
  19. <Form.Item label={t('apiKey')} name={'api_key'}>
  20. <Input></Input>
  21. </Form.Item>
  22. <Form.Item label={t('country')} name={'country'}>
  23. <Select options={GoogleCountryOptions}></Select>
  24. </Form.Item>
  25. <Form.Item label={t('language')} name={'language'}>
  26. <Select options={GoogleLanguageOptions}></Select>
  27. </Form.Item>
  28. </Form>
  29. );
  30. };
  31. export default GoogleForm;