diff --git a/src/BootstrapBlazor.Server/Components/Samples/PopoverConfirms.razor b/src/BootstrapBlazor.Server/Components/Samples/PopoverConfirms.razor index edcbbb6f9d7..6a02f4afb87 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/PopoverConfirms.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/PopoverConfirms.razor @@ -166,6 +166,23 @@ private Func<Task>? OnConfirmAsync { get; set; } + + + +
+ Label: Just a demo +
+
+
+
+ diff --git a/src/BootstrapBlazor.Server/Components/Samples/PopoverConfirms.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/PopoverConfirms.razor.cs index 455b754c0f9..0fc4a7bacc7 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/PopoverConfirms.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/PopoverConfirms.razor.cs @@ -166,6 +166,30 @@ private static AttributeItem[] GetAttributes() => Type = "string", ValueList = "", DefaultValue = " " + }, + new() + { + Name = nameof(PopConfirmButton.Trigger), + Description = "How pop confirm is triggered", + Type = "string", + ValueList = "click|hover|focus", + DefaultValue = "click" + }, + new() + { + Name = nameof(PopConfirmButton.ShowCloseButton), + Description = "Whether to display the close button", + Type = "string", + ValueList = "true/false", + DefaultValue = "true" + }, + new() + { + Name = nameof(PopConfirmButton.ShowConfirmButton), + Description = "Whether to display the confirm button", + Type = "string", + ValueList = "true/false", + DefaultValue = "true" } ]; diff --git a/src/BootstrapBlazor.Server/Locales/en-US.json b/src/BootstrapBlazor.Server/Locales/en-US.json index 664730ddd15..964045f12a9 100644 --- a/src/BootstrapBlazor.Server/Locales/en-US.json +++ b/src/BootstrapBlazor.Server/Locales/en-US.json @@ -320,7 +320,9 @@ "PopoverConfirmsShowButtonsTitle": "Custom Component", "PopoverConfirmsShowButtonsIntro": "By setting ShowCloseButton=\"false\" ShowConfirmButton=\"false\", you don't display the built-in function buttons, and customize an Approve button in the custom component.", "PopoverConfirmsShowButtonsButtonText": "Custom Component", - "PopoverConfirmsShowButtonsDesc": "In a custom component, you can call the Close or Confirm method inside the component through cascading parameters" + "PopoverConfirmsShowButtonsDesc": "In a custom component, you can call the Close or Confirm method inside the component through cascading parameters", + "PopoverConfirmsTriggerTitle": "Trigger", + "PopoverConfirmsTriggerIntro": "By setting the Trigger parameter, you can set the way the component pops up the confirmation box. The default value is click. You can also set hover focus to use in combination." }, "BootstrapBlazor.Server.Components.Components.CustomPopConfirmContent": { "CustomPopConfirmContentText": "Custom content", diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json index 2b11d8fb889..d6f7fda0002 100644 --- a/src/BootstrapBlazor.Server/Locales/zh-CN.json +++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json @@ -320,7 +320,9 @@ "PopoverConfirmsShowButtonsTitle": "自定义组件", "PopoverConfirmsShowButtonsIntro": "通过设置 ShowCloseButton=\"false\" ShowConfirmButton=\"false\" 不显示内置功能按钮,在自定义组件中自定义一个 审批 按钮", "PopoverConfirmsShowButtonsButtonText": "自定义组件", - "PopoverConfirmsShowButtonsDesc": "自定义组件内可通过级联参数调用组件内部的 Close 或者 Confirm 方法" + "PopoverConfirmsShowButtonsDesc": "自定义组件内可通过级联参数调用组件内部的 Close 或者 Confirm 方法", + "PopoverConfirmsTriggerTitle": "触发方式", + "PopoverConfirmsTriggerIntro": "通过设置 Trigger 参数来设置组件弹出确认框的方式,默认值为 click 还可以设置 hover focus 可组合使用" }, "BootstrapBlazor.Server.Components.Components.CustomPopConfirmContent": { "CustomPopConfirmContentText": "自定义弹窗内容", diff --git a/src/BootstrapBlazor/Components/Button/PopConfirmButtonBase.cs b/src/BootstrapBlazor/Components/Button/PopConfirmButtonBase.cs index 2359f96c6b6..2df52c159fc 100644 --- a/src/BootstrapBlazor/Components/Button/PopConfirmButtonBase.cs +++ b/src/BootstrapBlazor/Components/Button/PopConfirmButtonBase.cs @@ -35,7 +35,7 @@ public abstract class PopConfirmButtonBase : ButtonBase public Placement Placement { get; set; } /// - /// 获得/设置 弹窗触发方式 默认 click + /// 获得/设置 弹窗触发方式 默认 click 可设置 hover focus /// [Parameter] public string? Trigger { get; set; }