fix: InputText组件autoComplete标签显示错误问题 (#7869)

This commit is contained in:
RUNZE LU 2023-08-17 20:19:05 +08:00 committed by GitHub
parent 64f982d2be
commit d9b750516a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 1 deletions

View File

@ -386,6 +386,25 @@ order: 56
} }
``` ```
## 自动补全
```schema: scope="body"
{
"type": "form",
"debug": true,
"body": [
{
"name": "name",
"type": "input-text",
"label": "自动补全",
"autoComplete": "/api/mock2/options/autoComplete?term=$term",
"placeholder": "请输入",
"multiple": true
}
]
}
```
## 属性表 ## 属性表
当做选择器表单项使用时,除了支持 [普通表单项属性表](./formitem#%E5%B1%9E%E6%80%A7%E8%A1%A8) 中的配置以外,还支持下面一些配置 当做选择器表单项使用时,除了支持 [普通表单项属性表](./formitem#%E5%B1%9E%E6%80%A7%E8%A1%A8) 中的配置以外,还支持下面一些配置

View File

@ -701,7 +701,7 @@ export const FormItemStore = StoreNode.named('FormItemStore')
options = normalizeOptions(options as any, undefined, self.valueField); options = normalizeOptions(options as any, undefined, self.valueField);
if (config?.extendsOptions && self.selectedOptions.length > 0) { if (config?.extendsOptions && self.selectedOptions.length > 0) {
self.selectedOptions.forEach((item: any) => { self.filteredOptions.forEach((item: any) => {
const exited = findTree( const exited = findTree(
options as any, options as any,
optionValueCompare(item, self.valueField || 'value'), optionValueCompare(item, self.valueField || 'value'),