mirror of
https://gitee.com/ant-design-blazor/ant-design-blazor.git
synced 2024-12-05 21:47:38 +08:00
11bfaef22e
* feat(module: upload): support drag * fix button text * add tests * delete useless field
26 lines
848 B
C#
26 lines
848 B
C#
@namespace AntDesign.Internal
|
|
@inherits AntDomComponentBase
|
|
|
|
<div class="@ClassMapper.Class" style="@(!ShowButton?"display:none;":"")">
|
|
<div tabindex="0" class="ant-upload" style="position:relative;" @ref="_btn" data-fileid="@_fileId" role="button">
|
|
<input type="file"
|
|
webkitdirectory="@Directory"
|
|
multiple="@(Multiple || Directory)"
|
|
@ref="_file"
|
|
@onchange="FileNameChanged"
|
|
accept="@Accept"
|
|
style="@(Upload?.Drag==true?"position: absolute;width: 100%;height: 100%;opacity: 0;top: 0;left: 0;z-index:2;":"display:none;")"
|
|
id="@_fileId" />
|
|
|
|
@if (Upload?.Drag == true)
|
|
{
|
|
<div class="ant-upload-drag-container">
|
|
@ChildContent
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
@ChildContent
|
|
}
|
|
</div>
|
|
</div> |