Skip to content

feat(Split): support pane collapsible/fixable/min-size #4133

@izanhzh

Description

@izanhzh

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

  1. 希望在split-bar中增加一个可快速折叠窗格的箭头符号,目前只能靠拖动到最小,不是很方便

箭头符号参考:
\025C0;
\025B6;
\025B2;
\025BC;

折叠前效果参考
image

折叠后效果参考
image

  1. 希望可以设置固定大小的窗格,父容器变大/变小时,固定的那个窗格不变,另外一个窗格自动变大/变小,如果设置了固定大小,禁用拖动改变大小

  2. 不是很重要的项: 考虑增加设置窗格的可拖动到的最小值,目前默认拖动到最小是0,希望可以对窗格设置一个最小px值,会有冲突的情况:

    • 容器总共就100px,窗格设置最小60px,窗格二设置最小50px,这种情况可以优先满足窗格一,或可配置窗格优先级
    • 和第2点有冲突,默认优先按固定

Describe the solution you'd like

Split组件考虑增加以下属性:

/// <summary>
/// 获取/设置 第一个窗格是否可关闭
/// </summary>
[Parameter]
public bool FirstPaneCollapsible { get; set; }

/// <summary>
/// 获取/设置 第二个窗格是否可关闭
/// </summary>
[Parameter]
public bool SecondPaneCollapsible { get; set; }

/// <summary>
/// 获取/设置 当前折叠的窗格(FirstPane/SecondPane)
/// </summary>
[Parameter]
public string? CollapsedPane { get; set; }

/// <summary>
/// 获取/设置 固定大小的窗格(FirstPane/SecondPane)
/// </summary>
[Parameter]
public string? FixedPane { get; set; }

/// <summary>
/// 获取/设置 第一个窗格拖动最小值(px或%)
/// </summary>
[Parameter]
public string? FirstPaneMinSize { get; set; }

/// <summary>
/// 获取/设置 第二个窗格拖动最小值(px或%)
/// </summary>
[Parameter]
public string? SecondPaneMinSize { get; set; }

/// <summary>
/// 获取/设置 优先级窗格(FirstPane/SecondPane)
/// </summary>
[Parameter]
public string? PriorityPane { get; set; }

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions