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: IxAutoComplete] add IxAutoComplete component #680

Closed
1 task done
brenner8023 opened this issue Dec 28, 2021 · 3 comments
Closed
1 task done

[comp: IxAutoComplete] add IxAutoComplete component #680

brenner8023 opened this issue Dec 28, 2021 · 3 comments
Assignees

Comments

@brenner8023
Copy link
Member

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

What problem does this feature solve?

新增自动完成组件

What does the proposed API look like?

API

IxAutoComplete

AutoCompleteProps

名称 说明 类型 默认值 全局配置 备注
value 输入框输入的数据 string - - -
placeholder 输入框提示 string - -
disabled 是否禁用 boolean false - -
defaultValue 指定默认选中的条目 string - - -
dataSource 数据源 string[] | AutoCompleteOption[] | #dataSource - - -
clearable 是否显示清除图标 boolean false -
size 输入框尺寸大小 'sm' | 'md' | 'lg' sm -
prefix 设置前缀图标 string | #prefix - - -
suffix 设置后缀图标 string | #suffix - - -
onBlur 失焦时触发的回调函数 () => void - - -
onFocus 获得焦点时触发的回调函数 () => void - - -
onSelect 选中候选项时触发的回调函数 (value: string) => void - - -
onChange 输入框输入变化时触发的回调函数 (value: string) => void - - -
export interface AutoCompleteOption {
  key: string;
  label: string;
  disabled: boolean;
}
@idux-bot
Copy link

idux-bot bot commented Dec 28, 2021

Translation of this issue:

[comp: ixautocomplete] add ixautocomplete component

  • i Have Searched The [https://github.com/iduxfe/idux/issues) of this repository and believe That this is not a duplicate.

What proBLEES THIS Feature SOLVE?

New automatic completion component

What does The proposed API Look Like?

API

ixautocomplete

AutoCompleteProps

Name Description Type Default Global Configuration Remarks
Value Input Box Entering Data String - - -
PlaceHolder Enter box Tips String - -
Disabled Is disabled bolean false -
DefaultValue Specify the entry for the defaults String - - -
Datasource Data Source ` String [] \ AutoCompleteOption [] \ # Datasource` -
Clearable Whether to display the clear icon Boolean false
Size Enter frame size ` 'sm' \ 'md' \ 'lg'` sm
prefix Setup icon ` String \ # prefix` - -
suffix Set the suffix icon ` string \ # suffix` - -
Onblur Touch function triggered during the focus () => void - -
onfocus Toned when getting focus () => void - - -
Onselect Select the callback function triggered when you are selected (value: string) => void - -
onchange Enter the callback function triggered when entering the change (value: string) => void - -
export interface AutoCompleteOption {
  key: string;
  label: string;
  disabled: boolean;
}

@danranVm
Copy link
Member

danranVm commented Dec 31, 2021

  • value 支持 v-model

  • 新增 controll, 所有表单组件都要实现这个 props

  • 新增 open,支持 v-model

  • 新增 target 和 overlayClassName

  • dataSource,应该对应 defualt 插槽

  • defualtValue 移除吧。

  • placeholder 不用支持全局配置吧,如果要给默认值,也应该是 i18n 去搞。

  • size 的默认值应该是 md ?

  • AutoCompleteOption 新增 value 属性

@danranVm
Copy link
Member

这个组件 可以使用 <IxSelect allowInput /> 来代替,所以不再单独实现 IxAutoComplete 组件

@danranVm danranVm mentioned this issue Jan 18, 2022
95 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants