Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[comp:cascader] we need cascader component #797

Closed
1 task done
imguolao opened this issue Mar 11, 2022 · 1 comment · Fixed by #857
Closed
1 task done

[comp:cascader] we need cascader component #797

imguolao opened this issue Mar 11, 2022 · 1 comment · Fixed by #857
Assignees
Labels
Comp:Cascader enhancement New feature or request

Comments

@imguolao
Copy link
Contributor

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

We need this component for our website development, thks.

What does the proposed API look like?

like this.

https://www.naiveui.com/zh-CN/os-theme/components/cascader

@danranVm danranVm added the enhancement New feature or request label Mar 12, 2022
@danranVm
Copy link
Member

IxCascader

CascaderProps

名称 说明 类型 默认值 全局配置 备注
control 控件控制器 string | number | AbstractControl - - 配合 @idux/cdk/forms 使用, 参考 Form
v-model:value 当前选中的 的值 any | any[] - - multiple=true 时,value 为数组,使用 control 时,此配置无效
v-model:open 下拉菜单是否展开 boolean - - -
autofocus 默认获取焦点 boolean false - -
borderless 是否无边框 boolean false -
cascade 是否开启级联功能 boolean false -
checkStrategy 勾选策略 'all' | 'parent' | 'child' 'all' all: 显示全部选中节点, parent: 只显示父节点(仅多选模式下生效), child: 只显示子节点
clearable 是否显示清除图标 boolean false -
clearIcon 设置清除图标 string | #clearIcon 'close-circle' -
dataSource 选项数据源 CascaderData[] - - -
disabled 是否禁用状态 boolean false - 使用 control 时,此配置无效
empty 自定义当下拉列表为空时显示的内容 string | EmptyProps | #empty - - -
expandIcon 自定义展开图标 string | #expandIcon right -
expandTrigger 子选项展开触发方式 click | hover click -
getKey 选项的 key string | (data: CascaderData) => VKey key -
loadChildren 加载子节点数据 (node: CascaderData) => Promise<CascaderData[]> - - -
maxLabel 最多显示多少个标签 number | 'responsive' - - -
multiple 多选模式 boolean false - -
multipleLimit 最多选中多少项 number - - -
overlayClassName 下拉菜单的 class string - - -
overlayContainer 自定义浮层容器节点 string | HTMLElement | () => string | HTMLElement - -
overlayRender 自定义下拉菜单内容的渲染 (children:VNode[]) => VNodeChild - - -
placeholder 选择框默认文本 string | #placeholder - - -
readonly 只读模式 boolean - - -
searchable 是否可搜索 boolean | 'overlay' false - 当为 true 时搜索功能集成在选择器上,当为 overlay 时,搜索功能集成在悬浮层上
searchFn 根据搜索的文本进行筛选 boolean | CascaderSearchFn true - true 时使用默认的搜索规则, 如果使用远程搜索,应该设置为 false
size 设置选择器大小 'sm' | 'md' | 'lg' md -
suffix 设置后缀图标 string | #suffix down -
virtual 是否开启虚拟滚动 boolean false - -
onChange 选中值发生改变后的回调 (value: any, oldValue: any) => void - - -
onClear 清除图标被点击后的回调 (evt: MouseEvent) => void - - -
onSearch 开启搜索功能后,输入后的回调 (searchValue: string) => void - - 通常用于服务端搜索

danranVm added a commit to danranVm/idux that referenced this issue Apr 24, 2022
danranVm added a commit to danranVm/idux that referenced this issue Apr 24, 2022
danranVm added a commit to danranVm/idux that referenced this issue Apr 24, 2022
danranVm added a commit to danranVm/idux that referenced this issue Apr 25, 2022
danranVm added a commit to danranVm/idux that referenced this issue Apr 25, 2022
@danranVm danranVm mentioned this issue May 26, 2022
95 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Comp:Cascader enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants