Commit eb231120e17f376f36f323da043be5757cc9255c

Authored by zuihou
1 parent a343b490

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

src/components/Table/src/componentMap.ts
... ... @@ -7,6 +7,7 @@ import {
7 7 Switch,
8 8 DatePicker,
9 9 TimePicker,
  10 + AutoComplete,
10 11 } from 'ant-design-vue';
11 12 import type { ComponentType } from './types/componentType';
12 13 import { ApiSelect, ApiTreeSelect } from '/@/components/Form';
... ... @@ -17,6 +18,7 @@ componentMap.set('Input', Input);
17 18 componentMap.set('InputNumber', InputNumber);
18 19 componentMap.set('Select', Select);
19 20 componentMap.set('ApiSelect', ApiSelect);
  21 +componentMap.set('AutoComplete', AutoComplete);
20 22 componentMap.set('ApiTreeSelect', ApiTreeSelect);
21 23 componentMap.set('Switch', Switch);
22 24 componentMap.set('Checkbox', Checkbox);
... ...
src/components/Table/src/components/editable/helper.ts
... ... @@ -7,7 +7,7 @@ const { t } = useI18n();
7 7 * @description: 生成placeholder
8 8 */
9 9 export function createPlaceholderMessage(component: ComponentType) {
10   - if (component.includes('Input')) {
  10 + if (component.includes('Input') || component.includes('AutoComplete')) {
11 11 return t('common.inputText');
12 12 }
13 13 if (component.includes('Picker')) {
... ...
src/components/Table/src/types/componentType.ts
... ... @@ -3,6 +3,7 @@ export type ComponentType =
3 3 | 'InputNumber'
4 4 | 'Select'
5 5 | 'ApiSelect'
  6 + | 'AutoComplete'
6 7 | 'ApiTreeSelect'
7 8 | 'Checkbox'
8 9 | 'Switch'
... ...