ImageRef.SwitchTo(ImageRef.CurrentIndex+1)" @onclick:stopPropagation>
-
+ @if (ImageRef.ImageCount > 1)
+ {
+
ImageRef.SwitchTo(ImageRef.CurrentIndex-1)" @onclick:stopPropagation>
+
+
+
ImageRef.SwitchTo(ImageRef.CurrentIndex+1)" @onclick:stopPropagation>
+
+
+ }
+
+
+
+
+ @if (ImageRef.ImageCount > 1)
+ {
+ - @(ImageRef.CurrentIndex+1) / @ImageRef.ImageCount
+ }
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
- }
+
\ No newline at end of file
diff --git a/components/input/Input.cs b/components/input/Input.cs
index a99a3d35f9..8ee026b6af 100644
--- a/components/input/Input.cs
+++ b/components/input/Input.cs
@@ -89,7 +89,7 @@ public bool AutoFocus
///
/// Delays the processing of the KeyUp event until the user has stopped
- /// typing for a predetermined amount of time
+ /// typing for a predetermined amount of time. Default is 250 ms.
///
[Parameter]
public int DebounceMilliseconds
diff --git a/components/input/TextArea.razor b/components/input/TextArea.razor
index 015bcea8ab..fb0e0a1533 100644
--- a/components/input/TextArea.razor
+++ b/components/input/TextArea.razor
@@ -39,29 +39,34 @@
}
}
-
- @if (Suffix != null || AllowClear || FormItem?.FeedbackIcon != null)
- {
-
-
-
- @if (AllowClear)
- {
- @ClearIcon
- }
- @if (Suffix != null)
- {
- @Suffix
- }
- @if (FormItem?.FeedbackIcon != null)
- {
- @FormItem.FeedbackIcon
- }
-
+
+@if (Suffix != null || AllowClear || FormItem?.FeedbackIcon != null)
+{
+
+
+
+ @if (AllowClear)
+ {
+ @ClearIcon
+ }
+ @if (Suffix != null)
+ {
+ @Suffix
+ }
+ @if (FormItem?.FeedbackIcon != null)
+ {
+ @FormItem.FeedbackIcon
+ }
- }
- else
- {
-
- }
-
\ No newline at end of file
+
+}
+else if (ShowCount)
+{
+
+
+
+}
+else
+{
+
+}
diff --git a/components/input/TextArea.razor.cs b/components/input/TextArea.razor.cs
index 489cd48c0a..9b55c813b2 100644
--- a/components/input/TextArea.razor.cs
+++ b/components/input/TextArea.razor.cs
@@ -215,7 +215,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
}
else if (_afterFirstRender)
{
- await JsInvokeAsync(JSInteropConstants.InputComponentHelper.ResizeTextArea, _textareaRef, InnerMinRows, MaxRows);
+ await JsInvokeAsync(JSInteropConstants.InputComponentHelper.ResizeTextArea, Ref, InnerMinRows, MaxRows);
}
}
if (_styleHasChanged)
@@ -223,7 +223,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
_styleHasChanged = false;
if (AutoSize && !string.IsNullOrWhiteSpace(Style) && _afterFirstRender)
{
- await JsInvokeAsync(JSInteropConstants.StyleHelper.SetStyle, _textareaRef, Style);
+ await JsInvokeAsync(JSInteropConstants.StyleHelper.SetStyle, Ref, Style);
}
}
}
@@ -266,7 +266,7 @@ protected override void Dispose(bool disposing)
_ = InvokeAsync(async () =>
{
- await JsInvokeAsync(JSInteropConstants.DisposeResizeTextArea, _textareaRef);
+ await JsInvokeAsync(JSInteropConstants.DisposeResizeTextArea, Ref);
});
}
@@ -285,8 +285,6 @@ protected override void Dispose(bool disposing)
private bool _styleHasChanged;
private string _heightStyle;
- private ElementReference _textareaRef;
-
private void Reloading(JsonElement jsonElement) => _isReloading = true;
[JSInvokable]
@@ -306,12 +304,12 @@ private async Task RegisterResizeEvents()
if (AutoSize)
{
await JsInvokeAsync
(
- JSInteropConstants.InputComponentHelper.RegisterResizeTextArea, _textareaRef, InnerMinRows, MaxRows, _reference);
+ JSInteropConstants.InputComponentHelper.RegisterResizeTextArea, Ref, InnerMinRows, MaxRows, _reference);
}
else
{
var textAreaInfo = await JsInvokeAsync(
- JSInteropConstants.InputComponentHelper.GetTextAreaInfo, _textareaRef);
+ JSInteropConstants.InputComponentHelper.GetTextAreaInfo, Ref);
var rowHeight = textAreaInfo.LineHeight;
var offsetHeight = textAreaInfo.PaddingTop + textAreaInfo.PaddingBottom
diff --git a/components/mentions/Mentions.razor b/components/mentions/Mentions.razor
index fb96575870..020b38651a 100644
--- a/components/mentions/Mentions.razor
+++ b/components/mentions/Mentions.razor
@@ -27,15 +27,29 @@
- @*!!!!!!!!!!!这里不能缩进换行代码!!!!!!!!!!!!!!!*@
-
+ rows="@Rows" />
+ }
+ else
+ {
+ @TextareaTemplate(new MentionsTextareaTemplateOptions{
+ Value = Value,
+ OnInput = OnInput,
+ OnKeyDown = OnKeyDown,
+ RefBack = context
+ });
+ }
+
diff --git a/components/mentions/Mentions.razor.cs b/components/mentions/Mentions.razor.cs
index 400a7cffec..7dde23c4af 100644
--- a/components/mentions/Mentions.razor.cs
+++ b/components/mentions/Mentions.razor.cs
@@ -1,20 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Runtime.Serialization;
-using System.Security.Cryptography;
-using System.Text;
-using System.Threading;
using System.Threading.Tasks;
-using System.Xml.Linq;
using AntDesign.Internal;
-using AntDesign.JsInterop;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
-using Microsoft.Extensions.Options;
using Microsoft.JSInterop;
-using OneOf;
namespace AntDesign
{
@@ -22,17 +13,19 @@ public partial class Mentions
{
[Parameter] public RenderFragment ChildContent { get; set; }
[Parameter] public bool Disable { get; set; }
- [Parameter] public int Rows { get; set; } = 3;
+ [Parameter] public uint Rows { get; set; } = 3;
[Parameter] public bool Focused { get; set; }
[Parameter] public bool Readonly { get; set; }
[Parameter] public bool Loading { get; set; }
-
[Parameter] public Dictionary