36 lines
787 B
Plaintext
36 lines
787 B
Plaintext
@using MagMan.UI.Components
|
|
@using System.Security.Claims
|
|
@using Microsoft.AspNetCore.Components.Authorization
|
|
@using Microsoft.Extensions.Configuration
|
|
@using Microsoft.JSInterop
|
|
|
|
@inject IJSRuntime JSRuntime
|
|
|
|
<div id="qrCodeImg" style="width: @Width; height:@Height;"></div>
|
|
|
|
@code {
|
|
|
|
[Parameter]
|
|
public string rawCode { get; set; } = "EmptyQr";
|
|
|
|
[Parameter]
|
|
public int Height { get; set; } = 200;
|
|
|
|
[Parameter]
|
|
public int Width { get; set; } = 200;
|
|
|
|
[Parameter]
|
|
public string ImgFormat { get; set; } = "";
|
|
|
|
protected override async Task OnAfterRenderAsync(bool firstRender)
|
|
{
|
|
await InitDefault();
|
|
}
|
|
|
|
protected async Task InitDefault()
|
|
{
|
|
await JSRuntime.InvokeVoidAsync("displayQr", "qrCodeImg", rawCode);
|
|
}
|
|
|
|
}
|