PublicitySelect.tsx 724 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { ProFormSelect } from "@ant-design/pro-components";
  2. import { useIntl } from "react-intl";
  3. const Widget = () => {
  4. const intl = useIntl();
  5. const options = [
  6. {
  7. value: 0,
  8. label: intl.formatMessage({
  9. id: "forms.fields.publicity.disable.label",
  10. }),
  11. },
  12. {
  13. value: 10,
  14. label: intl.formatMessage({
  15. id: "forms.fields.publicity.private.label",
  16. }),
  17. },
  18. {
  19. value: 30,
  20. label: intl.formatMessage({
  21. id: "forms.fields.publicity.public.label",
  22. }),
  23. },
  24. ];
  25. return (
  26. <ProFormSelect
  27. options={options}
  28. initialValue={10}
  29. width="sm"
  30. name="status"
  31. allowClear={false}
  32. label={intl.formatMessage({ id: "forms.fields.publicity.label" })}
  33. />
  34. );
  35. };
  36. export default Widget;