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

ResourceSelectorModal.mdx 907 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import { Meta, Title, Subtitle, Description, Primary, Controls, Stories } from '@storybook/blocks';
  2. import * as ResourceSelectorModalStories from "./ResourceSelectorModal.stories"
  3. import { StoryName } from "../../.storybook/blocks/StoryName"
  4. <Meta of={ResourceSelectorModalStories} />
  5. <Title />
  6. <Subtitle />
  7. <Description />
  8. ### Usage
  9. 推荐通过 `openAntdModal` 函数打开 `ResourceSelectorModal`,打开 -> 处理 -> 关闭,整套代码在同一个地方
  10. ```ts
  11. import { openAntdModal } from '@/utils/modal';
  12. import ResourceSelectorModal } from '@/components/ResourceSelectorModal';
  13. // 打开资源选择对话框
  14. const handleClick = () => {
  15. const { close } = openAntdModal(ResourceSelectorModal, {
  16. type: ResourceSelectorType.Dataset,
  17. onOk: (res) => {
  18. // 处理逻辑
  19. close();
  20. },
  21. });
  22. ```
  23. ### Primary
  24. <Primary />
  25. <Controls />
  26. <Stories of={ResourceSelectorModalStories} />