Spring til indhold
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Betingelser

De kan bruge komponenten <Condition /> i widgets til valgfrit at vise sektioner af widgeten.

Scriptblok

Brug af attributten ScriptBlock til at definere en scriptblok, der bestemmer værdien af betingelsen. Scriptblokken skal returnere true eller false.

<Condition ScriptBlock="$Errors -eq $null">
</Condition>

Underordnet indhold

Sektionen ChildContent vises, hvis betingelsen er sand.

<Condition ScriptBlock="$Errors -eq $null">
   <ChildContent>
      <Alert Message="Success!" />
   </ChildContent>
</Condition>

Else

Afsnittet Else vises, hvis betingelsen er falsk.

<Condition ScriptBlock="$Errors -eq $null">
   <ChildContent>
      <Alert Message="Success!" />
   </ChildContent>
   <Else>
      <Alert Message="Failure!" Type="error" ShowIcon="true" />
   </Else>
</Condition>

Sidst opdateret

Var dette nyttigt?