Removed unnecessary preceding @s (#11520)
This commit is contained in:
parent
397a27f810
commit
bff743aced
|
|
@ -445,7 +445,7 @@ namespace Test
|
|||
|
||||
// Act
|
||||
var component = CompileToComponent(@"
|
||||
<p @onmouseover=""@OnComponentHover"" style=""background: @ParentBgColor;"" />
|
||||
<p @onmouseover=""OnComponentHover"" style=""background: @ParentBgColor;"" />
|
||||
@code {
|
||||
public string ParentBgColor { get; set; } = ""#FFFFFF"";
|
||||
|
||||
|
|
|
|||
|
|
@ -498,7 +498,7 @@ namespace Microsoft.AspNetCore.Blazor.Build.Test
|
|||
{
|
||||
// Arrange
|
||||
var component = CompileToComponent(@"
|
||||
<button @onclick=""@(x => Clicked = true)"" />
|
||||
<button @onclick=""x => Clicked = true"" />
|
||||
@code {
|
||||
public bool Clicked { get; set; }
|
||||
}");
|
||||
|
|
@ -530,7 +530,7 @@ namespace Microsoft.AspNetCore.Blazor.Build.Test
|
|||
{
|
||||
// Arrange
|
||||
var component = CompileToComponent(@"
|
||||
<button @onclick=""@OnClick"" />
|
||||
<button @onclick=""OnClick"" />
|
||||
@code {
|
||||
public void OnClick(UIMouseEventArgs e) { Clicked = true; }
|
||||
public bool Clicked { get; set; }
|
||||
|
|
|
|||
|
|
@ -4,19 +4,19 @@
|
|||
|
||||
<h2>JSON performance</h2>
|
||||
|
||||
<p><button id="reset-all" @onclick=@Reset>Reset</button></p>
|
||||
<p><button id="reset-all" @onclick=Reset>Reset</button></p>
|
||||
|
||||
<button id="serialize-small" @onclick=@SerializeSmall>Serialize (small)</button>
|
||||
<button id="serialize-large" @onclick=@SerializeLarge>Serialize (large)</button>
|
||||
<button id="serialize-small" @onclick=SerializeSmall>Serialize (small)</button>
|
||||
<button id="serialize-large" @onclick=SerializeLarge>Serialize (large)</button>
|
||||
|
||||
<p><pre style="border: 1px solid black; overflow: scroll;">@serializedValue</pre></p>
|
||||
<p><pre style="border: 1px solid black; overflow: scroll;">serializedValue</pre></p>
|
||||
@if (serializedValue != null)
|
||||
{
|
||||
<p>Serialized length: <strong id="serialized-length">@serializedValue.Length</strong> chars</p>
|
||||
<p>Serialized length: <strong id="serialized-length">serializedValue.Length</strong> chars</p>
|
||||
}
|
||||
|
||||
<button id="deserialize-small" @onclick=@DeserializeSmall>Deserialize (small)</button>
|
||||
<button id="deserialize-large" @onclick=@DeserializeLarge>Deserialize (large)</button>
|
||||
<button id="deserialize-small" @onclick=DeserializeSmall>Deserialize (small)</button>
|
||||
<button id="deserialize-large" @onclick=DeserializeLarge>Deserialize (large)</button>
|
||||
|
||||
@if (numPeopleDeserialized > 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
<h2>Render List</h2>
|
||||
|
||||
Number of items: <input id="num-items" type="number" @bind=@numItems />
|
||||
<button id="show-list" @onclick=@Show>Show</button>
|
||||
<button id="hide-list" @onclick=@Hide>Hide</button>
|
||||
Number of items: <input id="num-items" type="number" @bind=numItems />
|
||||
<button id="show-list" @onclick=Show>Show</button>
|
||||
<button id="hide-list" @onclick=Hide>Hide</button>
|
||||
|
||||
@if (show)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<p>Current count: @currentCount</p>
|
||||
|
||||
<button class="btn btn-primary" @onclick="@IncrementCount">Click me</button>
|
||||
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
|
||||
|
||||
@code {
|
||||
int currentCount = 0;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<div class="top-row pl-4 navbar navbar-dark">
|
||||
<a class="navbar-brand" href="">Blazor app</a>
|
||||
<button class="navbar-toggler" @onclick=@ToggleNavMenu>
|
||||
<button class="navbar-toggler" @onclick=ToggleNavMenu>
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class=@(collapseNavMenu ? "collapse" : null) @onclick=@ToggleNavMenu>
|
||||
<div class=@(collapseNavMenu ? "collapse" : null) @onclick=ToggleNavMenu>
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="" Match=NavLinkMatch.All>
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace Microsoft.AspNetCore.Components.Forms
|
|||
/// Gets or sets the value of the input. This should be used with two-way binding.
|
||||
/// </summary>
|
||||
/// <example>
|
||||
/// @bind-Value="@model.PropertyName"
|
||||
/// @bind-Value="model.PropertyName"
|
||||
/// </example>
|
||||
[Parameter] public T Value { get; private set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Components.Forms
|
|||
/* This is exactly equivalent to a .razor file containing:
|
||||
*
|
||||
* @inherits InputBase<bool>
|
||||
* <input type="checkbox" @bind="@CurrentValue" id="@Id" class="@CssClass" />
|
||||
* <input type="checkbox" @bind="CurrentValue" id="@Id" class="@CssClass" />
|
||||
*
|
||||
* The only reason it's not implemented as a .razor file is that we don't presently have the ability to compile those
|
||||
* files within this project. Developers building their own input components should use Razor syntax.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Components.Forms
|
|||
/* This is almost equivalent to a .razor file containing:
|
||||
*
|
||||
* @inherits InputBase<string>
|
||||
* <input @bind="@CurrentValue" id="@Id" class="@CssClass" />
|
||||
* <input @bind="CurrentValue" id="@Id" class="@CssClass" />
|
||||
*
|
||||
* The only reason it's not implemented as a .razor file is that we don't presently have the ability to compile those
|
||||
* files within this project. Developers building their own input components should use Razor syntax.
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.Components.Forms
|
|||
/* This is almost equivalent to a .razor file containing:
|
||||
*
|
||||
* @inherits InputBase<string>
|
||||
* <textarea @bind="@CurrentValue" id="@Id" class="@CssClass"></textarea>
|
||||
* <textarea @bind="CurrentValue" id="@Id" class="@CssClass"></textarea>
|
||||
*
|
||||
* The only reason it's not implemented as a .razor file is that we don't presently have the ability to compile those
|
||||
* files within this project. Developers building their own input components should use Razor syntax.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@using System.Collections.Generic
|
||||
Child components follow.
|
||||
<button class="addChild" @onclick="@AddChild">Add</button>
|
||||
<button class="removeChild" @onclick="@RemoveChild">Remove</button>
|
||||
<button class="addChild" @onclick="AddChild">Add</button>
|
||||
<button class="removeChild" @onclick="RemoveChild">Remove</button>
|
||||
|
||||
@foreach (var message in currentChildrenMessages)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
<div>
|
||||
<span id="state">@state</span>
|
||||
<button id="tick" @onclick="@Tick">Tick</button>
|
||||
<button id="tock" @onclick="@Tock">Tock</button>
|
||||
<button id="tick" @onclick="Tick">Tick</button>
|
||||
<button id="tock" @onclick="Tock">Tock</button>
|
||||
</div>
|
||||
|
||||
@code
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@
|
|||
|
||||
<h2>Select</h2>
|
||||
<p>
|
||||
<select id="select-box" @bind="@selectValue">
|
||||
<select id="select-box" @bind="selectValue">
|
||||
<option value=@SelectableValue.First>First choice</option>
|
||||
<option value=@SelectableValue.Second>Second choice</option>
|
||||
<option value=@SelectableValue.Third>Third choice</option>
|
||||
|
|
@ -154,7 +154,7 @@
|
|||
}
|
||||
</select>
|
||||
<span id="select-box-value">@selectValue</span>
|
||||
<button id="select-box-add-option" @onclick="@AddAndSelectNewSelectOption">Add and select new item</button>
|
||||
<button id="select-box-add-option" @onclick="AddAndSelectNewSelectOption">Add and select new item</button>
|
||||
</p>
|
||||
|
||||
@code {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
<strong id="receive-by-interface-num-renders">@numRenders</strong>
|
||||
|
||||
@* Prevent rerendering this component when the button is clicked. *@
|
||||
<button id="decrement-count" @onclick=@Ancestor.DecrementCount>Decrement</button>
|
||||
<button id="decrement-count" @onclick=Ancestor.DecrementCount>Decrement</button>
|
||||
</p>
|
||||
|
||||
@code {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
<fieldset>
|
||||
<legend>External controls</legend>
|
||||
<button id="reset-child" @onclick="@ResetChildCounter">Reset</button>
|
||||
<button id="reset-child" @onclick="ResetChildCounter">Reset</button>
|
||||
<label>
|
||||
<input id="toggle-child" type="checkbox" @bind="_toggleCapturedComponentPresence" />
|
||||
Toggle counter presence
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<h1>Counter</h1>
|
||||
<p>Current count: @currentCount</p>
|
||||
<p><button @onclick="@((handleClicks ? (Action)IncrementCount : null))">Click me</button></p>
|
||||
<p><button @onclick="@(handleClicks ? (Action)IncrementCount : null)">Click me</button></p>
|
||||
|
||||
<label>
|
||||
<input type="checkbox" @bind="@handleClicks" />
|
||||
<input type="checkbox" @bind="handleClicks" />
|
||||
Toggle click handler registration
|
||||
</label>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<!-- Note: passing 'Message' parameter with lowercase name to show it's case insensitive -->
|
||||
<p>Current count: <MessageComponent message=@currentCount.ToString() /></p>
|
||||
|
||||
<button @onclick="@IncrementCount">Click me</button>
|
||||
<button @onclick="IncrementCount">Click me</button>
|
||||
|
||||
@code {
|
||||
int currentCount = 0;
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@
|
|||
Result: <strong id="result">@result</strong>
|
||||
</p>
|
||||
|
||||
<button id="run-without-dispatch" @onclick=@RunWithoutDispatch>Run without dispatch</button>
|
||||
<button id="run-with-dispatch" @onclick=@RunWithDispatch>Run with dispatch</button>
|
||||
<button id="run-with-double-dispatch" @onclick=@RunWithDoubleDispatch>Run with double dispatch</button>
|
||||
<button id="run-async-with-dispatch" @onclick=@RunAsyncWorkWithDispatch>Run async work with dispatch</button>
|
||||
<button id="run-without-dispatch" @onclick=RunWithoutDispatch>Run without dispatch</button>
|
||||
<button id="run-with-dispatch" @onclick=RunWithDispatch>Run with dispatch</button>
|
||||
<button id="run-with-double-dispatch" @onclick=RunWithDoubleDispatch>Run with double dispatch</button>
|
||||
<button id="run-async-with-dispatch" @onclick=RunAsyncWorkWithDispatch>Run async work with dispatch</button>
|
||||
|
||||
@code {
|
||||
string result;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
{
|
||||
<input id="capturedElement" @ref="_myInput" />
|
||||
}
|
||||
<button @onclick="@MakeInteropCall">Click me</button>
|
||||
<button @onclick="MakeInteropCall">Click me</button>
|
||||
<label>
|
||||
<input type="checkbox" @bind="_toggleCapturedElementPresence" />
|
||||
Toggle input
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<h3>Event log</h3>
|
||||
|
||||
<textarea readonly @bind="@logValue"></textarea>
|
||||
<textarea readonly @bind="logValue"></textarea>
|
||||
|
||||
@code {
|
||||
string logValue = string.Empty;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
<button @onclick="@OnClick">@Text</button>
|
||||
<button @onclick="OnClick">@Text</button>
|
||||
|
||||
@code {
|
||||
[Parameter] int Count { get; set; }
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
<button @onclick="@OnClick">@Text</button>
|
||||
<button @onclick="OnClick">@Text</button>
|
||||
|
||||
@code {
|
||||
[Parameter] EventCallback OnClick { get; set; }
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
<button @onclick="@OnClick">@Text</button>
|
||||
<button @onclick="OnClick">@Text</button>
|
||||
|
||||
@code {
|
||||
[Parameter] EventCallback<UIMouseEventArgs> OnClick { get; set; }
|
||||
|
|
|
|||
|
|
@ -14,13 +14,13 @@
|
|||
<h2>Form with onsubmit handler</h2>
|
||||
|
||||
<form action="about:blank" @onsubmit=@(() => { })>
|
||||
<button id="form-1-button" @onclick=@HandleClick>Click me</button>
|
||||
<button id="form-1-button" @onclick=HandleClick>Click me</button>
|
||||
</form>
|
||||
|
||||
<h2>Form without onsubmit handler</h2>
|
||||
|
||||
<form action="about:blank">
|
||||
<button id="form-2-button" @onclick=@HandleClick>Click me</button>
|
||||
<button id="form-2-button" @onclick=HandleClick>Click me</button>
|
||||
</form>
|
||||
|
||||
@if (didHandleEvent)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
<p>Click the following button to invoke a JavaScript function.</p>
|
||||
|
||||
<button @onclick="@ShowJavaScriptPrompt">Show JavaScript prompt</button>
|
||||
<button @onclick="ShowJavaScriptPrompt">Show JavaScript prompt</button>
|
||||
|
||||
@if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
<h2>Focus and activation</h2>
|
||||
|
||||
<p @onfocusin="@OnFocusIn" @onfocusout="@OnFocusOut">
|
||||
Input: <input id="input" type="text" @onfocus="@OnFocus" @onblur="@OnBlur"/>
|
||||
<p @onfocusin="OnFocusIn" @onfocusout="OnFocusOut">
|
||||
Input: <input id="input" type="text" @onfocus="OnFocus" @onblur="OnBlur"/>
|
||||
</p>
|
||||
<p>
|
||||
Output: <span id="output">@message</span>
|
||||
</p>
|
||||
<p>
|
||||
<button @onclick="@Clear">Clear</button>
|
||||
<button @onclick="Clear">Clear</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
|
|
|||
|
|
@ -15,14 +15,14 @@
|
|||
cascade an EditContext to the components that integrate with it.
|
||||
</p>
|
||||
|
||||
<form @onsubmit="@HandleSubmit">
|
||||
<form @onsubmit="HandleSubmit">
|
||||
<p class="user-name">
|
||||
User name:
|
||||
<input @bind="@person.UserName" class="@editContext.FieldClass(() => person.UserName)" />
|
||||
<input @bind="person.UserName" class="@editContext.FieldClass(() => person.UserName)" />
|
||||
</p>
|
||||
<p class="accepts-terms">
|
||||
Accept terms:
|
||||
<input type="checkbox" @bind="@person.AcceptsTerms" class="@editContext.FieldClass(() => person.AcceptsTerms)" />
|
||||
<input type="checkbox" @bind="person.AcceptsTerms" class="@editContext.FieldClass(() => person.AcceptsTerms)" />
|
||||
</p>
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
<DataAnnotationsValidator />
|
||||
|
||||
<p class="user-name">
|
||||
User name: <input @bind="@UserName" class="@context.FieldClass(() => UserName)" />
|
||||
User name: <input @bind="UserName" class="@context.FieldClass(() => UserName)" />
|
||||
</p>
|
||||
<p class="accepts-terms">
|
||||
Accept terms: <input type="checkbox" @bind="@AcceptsTerms" class="@context.FieldClass(() => AcceptsTerms)" />
|
||||
Accept terms: <input type="checkbox" @bind="AcceptsTerms" class="@context.FieldClass(() => AcceptsTerms)" />
|
||||
</p>
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
|
|
|
|||
|
|
@ -5,30 +5,30 @@
|
|||
<DataAnnotationsValidator />
|
||||
|
||||
<p class="name">
|
||||
Name: <InputText @bind-Value="@person.Name" placeholder="Enter your name" />
|
||||
Name: <InputText @bind-Value="person.Name" placeholder="Enter your name" />
|
||||
</p>
|
||||
<p class="email">
|
||||
Email: <InputText @bind-Value="@person.Email" />
|
||||
Email: <InputText @bind-Value="person.Email" />
|
||||
<ValidationMessage For="@(() => person.Email)" />
|
||||
</p>
|
||||
<p class="age">
|
||||
Age (years): <InputNumber @bind-Value="@person.AgeInYears" placeholder="Enter your age" />
|
||||
Age (years): <InputNumber @bind-Value="person.AgeInYears" placeholder="Enter your age" />
|
||||
</p>
|
||||
<p class="height">
|
||||
Height (optional): <InputNumber @bind-Value="@person.OptionalHeight" />
|
||||
Height (optional): <InputNumber @bind-Value="person.OptionalHeight" />
|
||||
</p>
|
||||
<p class="description">
|
||||
Description: <InputTextArea @bind-Value="@person.Description" placeholder="Tell us about yourself" />
|
||||
Description: <InputTextArea @bind-Value="person.Description" placeholder="Tell us about yourself" />
|
||||
</p>
|
||||
<p class="renewal-date">
|
||||
Renewal date: <InputDate @bind-Value="@person.RenewalDate" placeholder="Enter the date" />
|
||||
Renewal date: <InputDate @bind-Value="person.RenewalDate" placeholder="Enter the date" />
|
||||
</p>
|
||||
<p class="expiry-date">
|
||||
Expiry date (optional): <InputDate @bind-Value="@person.OptionalExpiryDate" />
|
||||
Expiry date (optional): <InputDate @bind-Value="person.OptionalExpiryDate" />
|
||||
</p>
|
||||
<p class="ticket-class">
|
||||
Ticket class:
|
||||
<InputSelect @bind-Value="@person.TicketClass" size="4">
|
||||
<InputSelect @bind-Value="person.TicketClass" size="4">
|
||||
<option>(select)</option>
|
||||
<option value="@TicketClass.Economy">Economy class</option>
|
||||
<option value="@TicketClass.Premium">Premium class</option>
|
||||
|
|
@ -37,10 +37,10 @@
|
|||
<span id="selected-ticket-class">@person.TicketClass</span>
|
||||
</p>
|
||||
<p class="accepts-terms">
|
||||
Accepts terms: <InputCheckbox @bind-Value="@person.AcceptsTerms" title="You have to check this" />
|
||||
Accepts terms: <InputCheckbox @bind-Value="person.AcceptsTerms" title="You have to check this" />
|
||||
</p>
|
||||
<p class="is-evil">
|
||||
Is evil: <InputCheckbox @bind-Value="@person.IsEvil" />
|
||||
Is evil: <InputCheckbox @bind-Value="person.IsEvil" />
|
||||
</p>
|
||||
|
||||
<button type="submit">Submit</button>
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@
|
|||
|
||||
<p>
|
||||
<div>URI:</div>
|
||||
<input id="request-uri" @bind="@uri" size="60"/>
|
||||
<input id="request-uri" @bind="uri" size="60"/>
|
||||
</p>
|
||||
|
||||
<button id="send-request" @onclick="@DoRequest">Request</button>
|
||||
<button id="send-request" @onclick="DoRequest">Request</button>
|
||||
|
||||
@if (responseStatusCode.HasValue)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
<h1>Cookie counter</h1>
|
||||
<p>The server increments the count by one on each request.</p>
|
||||
<p>TestServer base URL: <input @bind="@testServerBaseUrl" /></p>
|
||||
<button id="delete" @onclick="@DeleteCookie">Delete cookie</button>
|
||||
<button id="increment" @onclick="@GetAndIncrementCounter">Get and increment current value</button>
|
||||
<p>TestServer base URL: <input @bind="testServerBaseUrl" /></p>
|
||||
<button id="delete" @onclick="DeleteCookie">Delete cookie</button>
|
||||
<button id="increment" @onclick="GetAndIncrementCounter">Get and increment current value</button>
|
||||
|
||||
@if (!requestInProgress)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@
|
|||
|
||||
<p>
|
||||
<div>URI:</div>
|
||||
<input id="request-uri" @bind="@uri" size="60"/>
|
||||
<input id="request-uri" @bind="uri" size="60"/>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<div>Method:</div>
|
||||
<select id="request-method" @bind="@method">
|
||||
<select id="request-method" @bind="method">
|
||||
<option value="GET">GET</option>
|
||||
<option value="POST">POST</option>
|
||||
<option value="PUT">PUT</option>
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
<p>
|
||||
<div>Request body:</div>
|
||||
<textarea id="request-body" @bind="@requestBody"></textarea>
|
||||
<textarea id="request-body" @bind="requestBody"></textarea>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
|
@ -30,20 +30,20 @@
|
|||
@foreach (var header in requestHeaders)
|
||||
{
|
||||
<div class="header-entry">
|
||||
Name: <input @bind="@header.Name" />
|
||||
Value: <input @bind="@header.Value" />
|
||||
Name: <input @bind="header.Name" />
|
||||
Value: <input @bind="header.Value" />
|
||||
[<a href="#" @onclick="@(e => RemoveHeader(header))">remove</a>]
|
||||
</div>
|
||||
}
|
||||
<button id="add-header" @onclick="@AddHeader">Add</button>
|
||||
<button id="add-header" @onclick="AddHeader">Add</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<div>Request referrer:</div>
|
||||
<input id="request-referrer" type="text" @bind=@requestReferrer />
|
||||
<input id="request-referrer" type="text" @bind=requestReferrer />
|
||||
</p>
|
||||
|
||||
<button id="send-request" @onclick="@DoRequest">Request</button>
|
||||
<button id="send-request" @onclick="DoRequest">Request</button>
|
||||
|
||||
@if (responseStatusCode.HasValue)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@using Microsoft.AspNetCore.Components.RenderTree
|
||||
<div id="test-selector">
|
||||
Select test:
|
||||
<select @bind=@SelectedComponentTypeName>
|
||||
<select @bind=SelectedComponentTypeName>
|
||||
<option value="none">Choose...</option>
|
||||
<option value="BasicTestApp.InteropComponent">Interop component</option>
|
||||
<option value="BasicTestApp.AsyncEventHandlerComponent">Async event handlers</option>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<input @bind-value=@inputText @bind-value:event="oninput" />
|
||||
<input @bind-value=inputText @bind-value:event="oninput" />
|
||||
|
||||
<p>The text below should update automatically as you type in the text field above</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
@using System.Text.Json
|
||||
@inject IJSRuntime JSRuntime
|
||||
|
||||
<button id="btn-interop" @onclick="@InvokeInteropAsync">Invoke interop!</button>
|
||||
<button id="btn-interop" @onclick="InvokeInteropAsync">Invoke interop!</button>
|
||||
|
||||
<div>
|
||||
<h1>Invocations</h1>
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
<div class="key-cases">
|
||||
<div class="model">
|
||||
<p>Model</p>
|
||||
<textarea @bind="@modelJson" id="key-model"></textarea>
|
||||
<button @onclick="@Update">Update</button>
|
||||
<textarea @bind="modelJson" id="key-model"></textarea>
|
||||
<button @onclick="Update">Update</button>
|
||||
</div>
|
||||
<div class="render-output">
|
||||
<p>Output</p>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
@using System.Text.Json
|
||||
|
||||
Type here: <input @onkeypress=@OnKeyPressed />
|
||||
Type here: <input @onkeypress=OnKeyPressed />
|
||||
<ul>
|
||||
@foreach (var key in keysPressed)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,23 +7,23 @@
|
|||
Output: <span id="output">@message</span>
|
||||
</p>
|
||||
<p>
|
||||
Mouseover: <input id="mouseover_input" type="text" @onmouseover="@OnMouseOver" @onmouseout="@OnMouseOut" />
|
||||
Mouseover: <input id="mouseover_input" type="text" @onmouseover="OnMouseOver" @onmouseout="OnMouseOut" />
|
||||
</p>
|
||||
<p>
|
||||
<span id="mousemove_input" @onmousemove="@OnMouseMove">Mousemove city!</span>
|
||||
<span id="mousemove_input" @onmousemove="OnMouseMove">Mousemove city!</span>
|
||||
</p>
|
||||
<p>
|
||||
Mousedown: <input id="mousedown_input" @onmousedown="@OnMouseDown" @onmouseup="@OnMouseUp" />
|
||||
Mousedown: <input id="mousedown_input" @onmousedown="OnMouseDown" @onmouseup="OnMouseUp" />
|
||||
</p>
|
||||
<p>
|
||||
Pointerdown: <input id="pointerdown_input" @onpointerdown="@OnPointerDown" />
|
||||
Pointerdown: <input id="pointerdown_input" @onpointerdown="OnPointerDown" />
|
||||
</p>
|
||||
<p>
|
||||
<div id="drag_input" draggable="true" @ondragstart="@OnDragStart">Drag Me</div>
|
||||
<div id="drop" @ondrop="@OnDrop" ondragover="event.preventDefault()" style="width: 100px; height: 100px; border: dotted">Drop Target</div>
|
||||
<div id="drag_input" draggable="true" @ondragstart="OnDragStart">Drag Me</div>
|
||||
<div id="drop" @ondrop="OnDrop" ondragover="event.preventDefault()" style="width: 100px; height: 100px; border: dotted">Drop Target</div>
|
||||
</p>
|
||||
<p>
|
||||
<button @onclick="@Clear">Clear</button>
|
||||
<button @onclick="Clear">Clear</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@
|
|||
@foreach (var item in todoItems.Where(item => !item.IsDone))
|
||||
{
|
||||
<li @key="@item.Id" class="@($"item-{item.Id}")">
|
||||
<input type="checkbox" @bind="@item.IsDone"/>
|
||||
<input type="text" @bind="@item.Text" @oninput="@Shuffle" />
|
||||
<input type="checkbox" @bind="item.IsDone"/>
|
||||
<input type="text" @bind="item.Text" @oninput="Shuffle" />
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
|
|
@ -24,8 +24,8 @@
|
|||
@foreach (var item in todoItems.Where(item => item.IsDone))
|
||||
{
|
||||
<li @key="@item.Id" class="@($"item-{item.Id}")">
|
||||
<input type="checkbox" @bind="@item.IsDone" />
|
||||
<input type="text" @bind="@item.Text" @oninput="@Shuffle" />
|
||||
<input type="checkbox" @bind="item.IsDone" />
|
||||
<input type="text" @bind="item.Text" @oninput="Shuffle" />
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@inject IUriHelper UriHelper
|
||||
@inject Microsoft.JSInterop.IJSRuntime JSRuntime
|
||||
|
||||
<button @onclick="@Navigate">Navigate</button>
|
||||
<button @onclick="Navigate">Navigate</button>
|
||||
|
||||
<span id="test-info">@UrlLocation</span>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,17 +7,17 @@
|
|||
Output: <span id="output">@message</span>
|
||||
</p>
|
||||
<p>
|
||||
<button @ontouchstart=@OnTouch
|
||||
@ontouchcancel=@OnTouch
|
||||
@ontouchenter=@OnTouch
|
||||
@ontouchleave=@OnTouch
|
||||
@ontouchend=@OnTouch
|
||||
@ontouchmove=@OnTouch>
|
||||
<button @ontouchstart=OnTouch
|
||||
@ontouchcancel=OnTouch
|
||||
@ontouchenter=OnTouch
|
||||
@ontouchleave=OnTouch
|
||||
@ontouchend=OnTouch
|
||||
@ontouchmove=OnTouch>
|
||||
TOUCH ME
|
||||
</button>
|
||||
</p>
|
||||
<p>
|
||||
<button @onclick="@Clear">Clear</button>
|
||||
<button @onclick="Clear">Clear</button>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<p>Current count: @currentCount</p>
|
||||
|
||||
<button class="btn btn-primary" @onclick="@IncrementCount" id="thecounter">Click me</button>
|
||||
<button class="btn btn-primary" @onclick="IncrementCount" id="thecounter">Click me</button>
|
||||
|
||||
@code {
|
||||
int currentCount = 0;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
<button id="cause-error" @onclick="@CauseError">Cause error</button>
|
||||
<button id="cause-error" @onclick="CauseError">Cause error</button>
|
||||
}
|
||||
@code {
|
||||
public bool ShouldCauseError { get; set; }
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<div class="top-row pl-4 navbar navbar-dark">
|
||||
<a class="navbar-brand" href="">Razor Components</a>
|
||||
<button class="navbar-toggler" @onclick=@ToggleNavMenu>
|
||||
<button class="navbar-toggler" @onclick=ToggleNavMenu>
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class=@(collapseNavMenu ? "collapse" : null) @onclick=@ToggleNavMenu>
|
||||
<div class=@(collapseNavMenu ? "collapse" : null) @onclick=ToggleNavMenu>
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="" Match=NavLinkMatch.All>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<div class="special-style">
|
||||
This component, including the CSS and image required to produce its
|
||||
elegant styling, is in an external NuGet package.
|
||||
<button @onclick="@ChangeLabel">@buttonLabel </button>
|
||||
<button @onclick="ChangeLabel">@buttonLabel </button>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
|
|
|
|||
Loading…
Reference in New Issue