init commit over here
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<button type="button" class="collapsible" @onclick=OpenCollapseable>@Title</button>
|
||||
|
||||
<ul class="dropdown-content" style="display : @collapseStyle;">
|
||||
@if (Children != null){
|
||||
@foreach(var Cur in Children){
|
||||
<li>
|
||||
@if(Cur.Type == FileType.Directory) {
|
||||
<ExplorerChild Title=@Cur.Path Children=Cur.Children PartialPath=@(PartialPath+Cur.Path) ></ExplorerChild>
|
||||
} else {
|
||||
<button type="button" @onclick=@((e)=>{ Download(Cur.Path); })>@Cur.Path</button>
|
||||
}
|
||||
</li>
|
||||
}
|
||||
}
|
||||
</ul>
|
||||
|
||||
@code{
|
||||
[Parameter]
|
||||
public string Title{ get; set; } = "";
|
||||
[Parameter]
|
||||
public DirObj[]? Children{ get; set; }
|
||||
[Parameter]
|
||||
public string PartialPath{ get; set; } = "";
|
||||
|
||||
public string collapseStyle = "none";
|
||||
|
||||
void OpenCollapseable() {
|
||||
if (collapseStyle == "block") {
|
||||
collapseStyle = "none";
|
||||
} else {
|
||||
collapseStyle = "block";
|
||||
}
|
||||
}
|
||||
|
||||
void Download(string Path) {
|
||||
Nav.NavigateTo( "api/product/download?Product=" + PartialPath + Path, true );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user