Commit eb231120e17f376f36f323da043be5757cc9255c
1 parent
a343b490
fix(table): 表格编辑支持AutoComplete
Showing
3 changed files
with
4 additions
and
1 deletions
src/components/Table/src/componentMap.ts
@@ -7,6 +7,7 @@ import { | @@ -7,6 +7,7 @@ import { | ||
7 | Switch, | 7 | Switch, |
8 | DatePicker, | 8 | DatePicker, |
9 | TimePicker, | 9 | TimePicker, |
10 | + AutoComplete, | ||
10 | } from 'ant-design-vue'; | 11 | } from 'ant-design-vue'; |
11 | import type { ComponentType } from './types/componentType'; | 12 | import type { ComponentType } from './types/componentType'; |
12 | import { ApiSelect, ApiTreeSelect } from '/@/components/Form'; | 13 | import { ApiSelect, ApiTreeSelect } from '/@/components/Form'; |
@@ -17,6 +18,7 @@ componentMap.set('Input', Input); | @@ -17,6 +18,7 @@ componentMap.set('Input', Input); | ||
17 | componentMap.set('InputNumber', InputNumber); | 18 | componentMap.set('InputNumber', InputNumber); |
18 | componentMap.set('Select', Select); | 19 | componentMap.set('Select', Select); |
19 | componentMap.set('ApiSelect', ApiSelect); | 20 | componentMap.set('ApiSelect', ApiSelect); |
21 | +componentMap.set('AutoComplete', AutoComplete); | ||
20 | componentMap.set('ApiTreeSelect', ApiTreeSelect); | 22 | componentMap.set('ApiTreeSelect', ApiTreeSelect); |
21 | componentMap.set('Switch', Switch); | 23 | componentMap.set('Switch', Switch); |
22 | componentMap.set('Checkbox', Checkbox); | 24 | componentMap.set('Checkbox', Checkbox); |
src/components/Table/src/components/editable/helper.ts
@@ -7,7 +7,7 @@ const { t } = useI18n(); | @@ -7,7 +7,7 @@ const { t } = useI18n(); | ||
7 | * @description: 生成placeholder | 7 | * @description: 生成placeholder |
8 | */ | 8 | */ |
9 | export function createPlaceholderMessage(component: ComponentType) { | 9 | export function createPlaceholderMessage(component: ComponentType) { |
10 | - if (component.includes('Input')) { | 10 | + if (component.includes('Input') || component.includes('AutoComplete')) { |
11 | return t('common.inputText'); | 11 | return t('common.inputText'); |
12 | } | 12 | } |
13 | if (component.includes('Picker')) { | 13 | if (component.includes('Picker')) { |
src/components/Table/src/types/componentType.ts