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

View File

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

View File

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