@blueking/bkflow-canvas-editor 1.0.10 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -244,6 +244,12 @@ interface SelectPanelConfig {
244
244
  | `before-close` | - | 面板关闭前触发 |
245
245
  | `view-flow` | - | 点击查看排障流程按钮触发 |
246
246
 
247
+ #### Slots
248
+
249
+ | 插槽名 | Slot Props | 说明 |
250
+ | ------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
251
+ | `customFormContent` | `customFormData`、`additionalTaskParams`、`updateCustomFormData`、`updateAdditionalTaskParams` | 自定义额外表单项;`additionalTaskParams` 会合并进 `createFlowTask` |
252
+
247
253
  ---
248
254
 
249
255
  ### FlowExecute 组件
@@ -561,6 +561,14 @@ interface DrawPipelineParams {
561
561
  gateway_size?: [number, number];
562
562
  start?: [number, number];
563
563
  }
564
+ interface CreateFlowTaskParams {
565
+ template_id: number;
566
+ name: string;
567
+ creator: string;
568
+ constants: Record<string, any>;
569
+ label_ids?: number[];
570
+ [key: string]: unknown;
571
+ }
564
572
  interface CreateFlowTaskResult {
565
573
  data: {
566
574
  id: number;
@@ -610,12 +618,7 @@ interface FlowViewApiConfig {
610
618
  data: any[];
611
619
  };
612
620
  }>;
613
- createFlowTask?: (params: {
614
- template_id: number;
615
- name: string;
616
- creator: string;
617
- constants: Record<string, any>;
618
- }) => Promise<CreateFlowTaskResult>;
621
+ createFlowTask?: (params: CreateFlowTaskParams) => Promise<CreateFlowTaskResult>;
619
622
  executeFlowTask?: (params: {
620
623
  task_id: number;
621
624
  action: string;
@@ -660,12 +663,7 @@ interface FlowEditApiConfig extends FlowViewApiConfig {
660
663
  drawPipeline?: (params: DrawPipelineParams) => Promise<{
661
664
  pipeline_tree: PipelineTree;
662
665
  }>;
663
- createFlowTask?: (params: {
664
- template_id: number;
665
- name: string;
666
- creator: string;
667
- constants: Record<string, any>;
668
- }) => Promise<CreateFlowTaskResult>;
666
+ createFlowTask?: (params: CreateFlowTaskParams) => Promise<CreateFlowTaskResult>;
669
667
  executeFlowTask?: (params: {
670
668
  task_id: number;
671
669
  action: string;