快速预览 (QuickView)

从屏幕边缘滑出的面板。

概述

  • 从屏幕边缘滑出的面板

代码演示

1.默认示例

这里是快速预览
namespace WebSite.Docus.View.QuickViews;

class QuickView1 : BaseComponent
{
    protected override void BuildRenderTree(RenderTreeBuilder builder)
    {
        builder.Button("显示", Callback(OnShow), StyleType.Primary);
        builder.Component<QuickView>().Id("qvTest")
               .Set(c => c.ChildContent, BuildContent)
               .Build();
    }

    private void OnShow() => UI.ShowQuickView("qvTest");

    private void BuildContent(RenderTreeBuilder builder)
    {
        builder.Span("这里是快速预览");
    }
}