fix(table): 表格编辑支持AutoComplete

This commit is contained in:
zuihou 2022-03-28 00:41:59 +08:00
parent a343b49014
commit eb231120e1
3 changed files with 4 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import {
Switch, Switch,
DatePicker, DatePicker,
TimePicker, TimePicker,
AutoComplete,
} from 'ant-design-vue'; } from 'ant-design-vue';
import type { ComponentType } from './types/componentType'; import type { ComponentType } from './types/componentType';
import { ApiSelect, ApiTreeSelect } from '/@/components/Form'; import { ApiSelect, ApiTreeSelect } from '/@/components/Form';
@ -17,6 +18,7 @@ componentMap.set('Input', Input);
componentMap.set('InputNumber', InputNumber); componentMap.set('InputNumber', InputNumber);
componentMap.set('Select', Select); componentMap.set('Select', Select);
componentMap.set('ApiSelect', ApiSelect); componentMap.set('ApiSelect', ApiSelect);
componentMap.set('AutoComplete', AutoComplete);
componentMap.set('ApiTreeSelect', ApiTreeSelect); componentMap.set('ApiTreeSelect', ApiTreeSelect);
componentMap.set('Switch', Switch); componentMap.set('Switch', Switch);
componentMap.set('Checkbox', Checkbox); componentMap.set('Checkbox', Checkbox);

View File

@ -7,7 +7,7 @@ const { t } = useI18n();
* @description: placeholder * @description: placeholder
*/ */
export function createPlaceholderMessage(component: ComponentType) { export function createPlaceholderMessage(component: ComponentType) {
if (component.includes('Input')) { if (component.includes('Input') || component.includes('AutoComplete')) {
return t('common.inputText'); return t('common.inputText');
} }
if (component.includes('Picker')) { if (component.includes('Picker')) {

View File

@ -3,6 +3,7 @@ export type ComponentType =
| 'InputNumber' | 'InputNumber'
| 'Select' | 'Select'
| 'ApiSelect' | 'ApiSelect'
| 'AutoComplete'
| 'ApiTreeSelect' | 'ApiTreeSelect'
| 'Checkbox' | 'Checkbox'
| 'Switch' | 'Switch'