initial-data.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. import type { FlowDocumentJSON } from '@flowgram.ai/fixed-layout-editor';
  2. export const initialData: FlowDocumentJSON = {
  3. nodes: [
  4. // 开始节点
  5. {
  6. id: 'start_0',
  7. type: 'start',
  8. data: {
  9. title: 'Start',
  10. content: 'start content',
  11. },
  12. blocks: [],
  13. },
  14. // 分支节点
  15. {
  16. id: 'condition_0',
  17. type: 'condition',
  18. data: {
  19. title: 'Condition',
  20. content: 'condition content',
  21. },
  22. blocks: [
  23. {
  24. id: 'branch_0',
  25. type: 'block',
  26. data: {
  27. title: 'Branch 0',
  28. content: 'branch 1 content',
  29. },
  30. blocks: [
  31. {
  32. id: 'custom_0',
  33. type: 'custom',
  34. data: {
  35. title: 'Custom',
  36. content: 'custom content',
  37. },
  38. },
  39. ],
  40. },
  41. {
  42. id: 'branch_1',
  43. type: 'block',
  44. data: {
  45. title: 'Branch 1',
  46. content: 'branch 1 content',
  47. },
  48. blocks: [
  49. {
  50. id: 'break_0',
  51. type: 'break',
  52. data: {
  53. title: 'Break',
  54. content: 'Break content',
  55. },
  56. },
  57. ],
  58. },
  59. {
  60. id: 'branch_2',
  61. type: 'block',
  62. data: {
  63. title: 'Branch 2',
  64. content: 'branch 2 content',
  65. },
  66. blocks: [],
  67. },
  68. ],
  69. },
  70. // 结束节点
  71. {
  72. id: 'end_0',
  73. type: 'end',
  74. data: {
  75. title: 'End',
  76. content: 'end content',
  77. },
  78. },
  79. ],
  80. };