mirror of
https://github.com/vbenjs/gf-vben-admin.git
synced 2025-01-24 04:10:20 +08:00
fix(table): editComponentProps support onChange
修复editComponentProps不支持onChange的问题
This commit is contained in:
parent
3dbbde2662
commit
829b366cb2
@ -44,7 +44,7 @@
|
||||
import { propTypes } from '/@/utils/propTypes';
|
||||
import { isString, isBoolean, isFunction, isNumber, isArray } from '/@/utils/is';
|
||||
import { createPlaceholderMessage } from './helper';
|
||||
import { set } from 'lodash-es';
|
||||
import { set, omit } from 'lodash-es';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'EditableCell',
|
||||
@ -108,7 +108,7 @@
|
||||
return {
|
||||
placeholder: createPlaceholderMessage(unref(getComponent)),
|
||||
...apiSelectProps,
|
||||
...compProps,
|
||||
...omit(compProps, 'onChange'),
|
||||
[valueField]: value,
|
||||
};
|
||||
});
|
||||
@ -184,6 +184,8 @@
|
||||
} else if (isString(e) || isBoolean(e) || isNumber(e)) {
|
||||
currentValueRef.value = e;
|
||||
}
|
||||
const onChange = props.column?.editComponentProps?.onChange;
|
||||
if (onChange && isFunction(onChange)) onChange(...arguments);
|
||||
|
||||
table.emit?.('edit-change', {
|
||||
column: props.column,
|
||||
|
Loading…
Reference in New Issue
Block a user