EmptyState 컴포넌트 — sgcHTML | eSeGeCe

EmptyState

TsgcHTMLComponent_EmptyState — 그리드, 목록 또는 검색 결과에 표시할 행이 없을 때 보여주는 패널로, 아이콘 또는 이미지, 제목, 설명, 최대 두 개의 버튼으로 구성됩니다. Delphi, C++ Builder 및 .NET에서 사용할 수 있습니다.

TsgcHTMLComponent_EmptyState

Icon, Title, Description을 설정한 다음 HTML 속성을 읽습니다. 스크립트를 전혀 생성하지 않으므로 페이지가 필요로 하는 만큼 자주 대역 외(out-of-band) 조각으로 전송해도 안전합니다.

컴포넌트 클래스

TsgcHTMLComponent_EmptyState

렌더링

단일 플레이스홀더 <div>, 스크립트 없음

언어

Delphi, C++ Builder, .NET

여기에 아무것도 없다는 것을 제대로 보여주기

Icon은 CSS 아이콘 클래스 또는 인라인 SVG 마크업을 받아들이며, 좁은 범위의 안전성 검사를 거친 후 그대로 출력됩니다. 최종 사용자 입력을 여기에 바인딩하지 말고, 신뢰할 수 없는 텍스트는 항상 HTML로 인코딩되는 TitleDescription에 바인딩하십시오.

uses
  sgcHTML_Enums, sgcHTML_Component_EmptyState;

var
  oEmpty: TsgcHTMLComponent_EmptyState;
begin
  oEmpty := TsgcHTMLComponent_EmptyState.Create(nil);
  try
    oEmpty.Icon := 'bi bi-inbox';
    oEmpty.Title := 'No results';
    oEmpty.Description := 'Try a different search, or clear your filters.';
    oEmpty.ActionCaption := 'Clear filters';
    oEmpty.ActionHref := '/orders';
    oEmpty.ActionStyle := bsPrimary;

    WebModule.Response := oEmpty.HTML;
  finally
    oEmpty.Free;
  end;
end;

// Or the one-line static helper for the simple case:
WebModule.Response := TsgcHTMLComponent_EmptyState.Build('No results', 'Try a different search.');
// includes: sgcHTML_Component_EmptyState.hpp

TsgcHTMLComponent_EmptyState *oEmpty = new TsgcHTMLComponent_EmptyState(NULL);
try
{
  oEmpty->Icon = "bi bi-inbox";
  oEmpty->Title = "No results";
  oEmpty->Description = "Try a different search, or clear your filters.";
  oEmpty->ActionCaption = "Clear filters";
  oEmpty->ActionHref = "/orders";
  oEmpty->ActionStyle = bsPrimary;

  String html = oEmpty->HTML;
}
__finally
{
  delete oEmpty;
}

// Or the one-line static helper for the simple case:
String html2 = TsgcHTMLComponent_EmptyState::Build("No results", "Try a different search.");
using esegece.sgcWebSockets;

var empty = new TsgcHTMLComponent_EmptyState();
empty.Icon = "bi bi-inbox";
empty.Title = "No results";
empty.Description = "Try a different search, or clear your filters.";
empty.ActionCaption = "Clear filters";
empty.ActionHref = "/orders";
empty.ActionStyle = ButtonStyle.bsPrimary;

string html = empty.HTML;

// Or the one-line static helper for the simple case:
string html2 = TsgcHTMLComponent_EmptyState.Build("No results", "Try a different search.");

주요 속성 및 메서드

가장 자주 사용하게 되는 멤버.

Icon / ImageURL

CSS 아이콘 클래스 또는 인라인 SVG(살균 처리되며, 거부 시 삭제됨)입니다. 둘 다 설정된 경우 ImageURLIcon보다 우선합니다.

Title / Description

항상 HTML로 인코딩되므로, 데이터베이스나 사용자가 입력한 텍스트를 바인딩하기에 안전한 한 쌍입니다.

ActionCaption / ActionHref / ActionStyle

공유 TsgcHTMLButtonStyle 열거형으로 스타일이 지정되는 주요 행동 유도 버튼으로, 기본값은 bsPrimary입니다.

SecondaryActionCaption / SecondaryActionHref

두 번째 버튼으로, 항상 아웃라인 스타일이며 자체 스타일 속성은 없습니다.

Compact

전체 페이지/섹션이 아닌 위젯이나 테이블 본문 같은 작은 임베드 영역을 위한 더 좁은 패딩입니다.

Build

클래스 함수로, 임시 인스턴스를 생성하고 Title/Description을 설정한 후 렌더링하고 해제하는 과정을 한 번의 호출로 수행합니다.

계속 살펴보기

온라인 도움말이 컴포넌트의 전체 API 참조 및 사용 가이드입니다.
모든 sgcHTML 컴포넌트80개 이상의 컴포넌트 전체 기능 매트릭스를 둘러보십시오.
무료 체험판 다운로드30일 체험판에는 60.HTML 데모 프로젝트가 포함됩니다.
가격전체 소스 코드가 포함된 Single, Team 및 Site 라이선스.
최고의 가성비: All-Access모든 eSeGeCe 제품과 프리미엄 지원이 포함되어 연 €1,059부터 이용할 수 있어요.
All-Access 가격 보기

시작할 준비가 되셨습니까?

무료 체험판을 다운로드하고 Delphi, C++ Builder 및 .NET에서 웹 UI를 구축하기 시작하십시오.