fix(module: icon): click issue caused by StopPropagation (#274)

This commit is contained in:
James Yeung 2020-06-29 13:30:44 +08:00 committed by GitHub
parent 2a64503399
commit afe8689084
4 changed files with 6 additions and 3 deletions

View File

@ -11,7 +11,7 @@
}
else
{
<Icon Type="close-circle" Class="ant-cascader-picker-clear" OnClick="ClearSelected" />
<Icon Type="close-circle" Class="ant-cascader-picker-clear" OnClick="ClearSelected" StopPropagation />
}
</span>

View File

@ -1,7 +1,7 @@
@namespace AntDesign
@inherits AntDomComponentBase
<span role="img" class="@ClassMapper.Class" style="@Style" id="@Id" @onclick="HandleOnClick" @onclick:stopPropagation="true" tabindex="@TabIndex">
<span role="img" class="@ClassMapper.Class" style="@Style" id="@Id" @onclick="HandleOnClick" @onclick:stopPropagation="StopPropagation" tabindex="@TabIndex">
@if (Component == null)
{
@((MarkupString) _svgImg)

View File

@ -39,6 +39,9 @@ namespace AntDesign
[Parameter]
public string TabIndex { get; set; }
[Parameter]
public bool StopPropagation { get; set; }
[CascadingParameter]
public Button Button { get; set; }

View File

@ -7,7 +7,7 @@
</RadioGroup>
<Button Type="primary" @onclick="_ => open()">Open</Button>
<Drawer Closable="true" Visible="@visible" Placement="@placement" Title='("Drawer in different Placement")' OnClose="_ => close()">
<Drawer Visible="@visible" Placement="@placement" Title='("Basic Drawer")' OnClose="_ => close()">
<p>Some contents...</p>
<p>Some contents...</p>
<p>Some contents...</p>