mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-30 13:06:34 +08:00
实现了多画布下,节点的复制粘贴功能
This commit is contained in:
@@ -23,9 +23,6 @@ namespace Serein.Workbench.ViewModels
|
||||
public partial class FlowEditViewModel : ObservableObject
|
||||
{
|
||||
public ObservableCollection<FlowEditorTabModel> CanvasTabs { get; set; } = [];
|
||||
public ICommand AddTabCommand { get; set; }
|
||||
public ICommand RemoveTabCommand { get; set; }
|
||||
public ICommand RenameTabCommand { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -39,8 +36,7 @@ namespace Serein.Workbench.ViewModels
|
||||
public FlowEditViewModel(FlowNodeService flowNodeService)
|
||||
{
|
||||
this.flowNodeService = flowNodeService;
|
||||
AddTabCommand = new RelayCommand(AddTab);
|
||||
RemoveTabCommand = new RelayCommand(RemoveTab);
|
||||
|
||||
|
||||
flowNodeService.OnCreateFlowCanvasView += OnCreateFlowCanvasView; // 创建了画布
|
||||
flowNodeService.OnRemoveFlowCanvasView += OnRemoveFlowCanvasView; // 移除了画布
|
||||
@@ -81,13 +77,6 @@ namespace Serein.Workbench.ViewModels
|
||||
#endregion
|
||||
|
||||
|
||||
private void AddTab() => flowNodeService.CreateFlowCanvas();
|
||||
private void RemoveTab()
|
||||
{
|
||||
if (CanvasTabs.Count > 0 && SelectedTab != null) flowNodeService.RemoveFlowCanvas();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user