您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

26 行
570 B

  1. <button type="button" class="btn @CustomStyleClass" data-bs-toggle="modal" data-bs-target="@DialogId" @onclick="OnclickFunc">
  2. @ButtonName
  3. </button>
  4. @code
  5. {
  6. [Parameter]
  7. public EventCallback OnclickFunc { get; set; }
  8. [Parameter]
  9. public string ButtonName { get; set; }
  10. [Parameter]
  11. public string CustomStyleClass { get; set; } = "btn-primary";
  12. [Parameter]
  13. public string DialogId { get; set; } = "#exampleModal";
  14. protected override void OnInitialized()
  15. {
  16. if (DialogId[0] != '#')
  17. DialogId = $"#{DialogId}";
  18. base.OnInitialized();
  19. }
  20. }