diff --git a/components/cascader/Cascader.razor b/components/cascader/Cascader.razor index 0f7192b8..19d5c6d9 100644 --- a/components/cascader/Cascader.razor +++ b/components/cascader/Cascader.razor @@ -7,6 +7,7 @@ OnMaskClick="CascaderOnBlur" Trigger="new Trigger[] { }" BoundaryAdjustMode="@BoundaryAdjustMode" + Placement="@Placement" PopupContainerSelector="@PopupContainerSelector" OverlayEnterCls="ant-slide-up-enter ant-slide-up-enter-active ant-slide-up" OverlayLeaveCls="ant-slide-up-leave ant-slide-up-leave-active ant-slide-up"> diff --git a/components/cascader/Cascader.razor.cs b/components/cascader/Cascader.razor.cs index 1ceba522..4cbbca63 100644 --- a/components/cascader/Cascader.razor.cs +++ b/components/cascader/Cascader.razor.cs @@ -62,6 +62,9 @@ namespace AntDesign } } + [Parameter] + public Placement Placement { get; set; } + private List _nodelist = new List(); private List _selectedNodes = new List(); private List _hoverSelectedNodes = new List(); diff --git a/site/AntDesign.Docs/Demos/Components/Cascader/doc/index.en-US.md b/site/AntDesign.Docs/Demos/Components/Cascader/doc/index.en-US.md index bf90ef97..7a9e5aa4 100644 --- a/site/AntDesign.Docs/Demos/Components/Cascader/doc/index.en-US.md +++ b/site/AntDesign.Docs/Demos/Components/Cascader/doc/index.en-US.md @@ -21,13 +21,14 @@ Cascader | 参数 | 说明 | 类型 | 默认值 | | -------------------- | ---------------------------------------------------- | --------------------- | --------- | | AllowClear | whether allow clear | bool | true | -| BoundaryAdjustMode | `Dropdown` adjustment strategy (when for example browser resize is happening) | TriggerBoundaryAdjustMode | TriggerBoundaryAdjustMode.InView | +| BoundaryAdjustMode | `Dropdown` adjustment strategy (when for example browser resize is happening) | TriggerBoundaryAdjustMode | TriggerBoundaryAdjustMode.InView | | ChangeOnSelect | change value on each selection if set to true, see above demo for details | bool | false | | Style | additional css class | string | - | | DefaultValue | initial selected value | string | - | | ExpandTrigger | expand current item when click or hover, one of 'click' 'hover' | string | 'click' | | Options | data options of cascade | IList | - | | Placeholder | input placeholder | string | 'Please Select' | +| Placement | Use preset popup align config from builtinPlacements. | `BottomLeft` \| `BottomRight` \| `TopLeft` \| `TopRight` | - | | Size | input size, one of 'large','middle' 'small' | string | 无 | | OnChange | callback when finishing cascader select (List, string, string) => void | - | - | diff --git a/site/AntDesign.Docs/Demos/Components/Cascader/doc/index.zh-CN.md b/site/AntDesign.Docs/Demos/Components/Cascader/doc/index.zh-CN.md index 0c438cf0..ee883cbc 100644 --- a/site/AntDesign.Docs/Demos/Components/Cascader/doc/index.zh-CN.md +++ b/site/AntDesign.Docs/Demos/Components/Cascader/doc/index.zh-CN.md @@ -22,13 +22,14 @@ Cascader | 参数 | 说明 | 类型 | 默认值 | | -------------------- | ---------------------------------------------------- | --------------------- | --------- | | AllowClear | 是否支持清除 | bool | true | -| BoundaryAdjustMode | `Dropdown` adjustment strategy (when for example browser resize is happening) | TriggerBoundaryAdjustMode | TriggerBoundaryAdjustMode.InView | +| BoundaryAdjustMode | 边界自动调整的模式,默认在可视范围调整 | TriggerBoundaryAdjustMode | TriggerBoundaryAdjustMode.InView | | ChangeOnSelect | 当此项为 true 时,点选每级菜单选项值都会发生变化 | bool | false | | Style | 自定义类名 | string | - | | DefaultValue | 默认的选中项 | string | - | | ExpandTrigger | 次级菜单的展开方式,可选 'click' 和 'hover' | string | 'click' | | Options | 可选项数据源 | IList | - | | Placeholder | 输入框占位文本 | string | '请选择' | +| Placement | 浮层预设位置 | `BottomLeft` \| `BottomRight` \| `TopLeft` \| `TopRight` | - | | Size | 输入框大小,可选 'large','middle' 'small' | string | 无 | | OnChange | 选择完成后的回调 (List, string, string) => void | - | - |