mirror of https://github.com/jeecgboot/jeecg-boot
【issues/8680】editComponentProps 可接受一个函数传入record
parent
1de07ff3ff
commit
e002cd3bf3
|
@ -100,7 +100,14 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
const getComponentProps = computed(() => {
|
const getComponentProps = computed(() => {
|
||||||
const compProps = props.column?.editComponentProps ?? {};
|
let compProps;
|
||||||
|
// update-begin--author:liaozhiyang---date:20250818---for:【issues/8680】editComponentProps可接受一个函数传入record
|
||||||
|
if (isFunction(props.column?.editComponentProps)) {
|
||||||
|
compProps = props.column?.editComponentProps(props.record);
|
||||||
|
} else {
|
||||||
|
compProps = props.column?.editComponentProps ?? {};
|
||||||
|
}
|
||||||
|
// update-end--author:liaozhiyang---date:20250818---for:【issues/8680】editComponentProps可接受一个函数传入record
|
||||||
const component = unref(getComponent);
|
const component = unref(getComponent);
|
||||||
const apiSelectProps: Recordable = {};
|
const apiSelectProps: Recordable = {};
|
||||||
if (component === 'ApiSelect') {
|
if (component === 'ApiSelect') {
|
||||||
|
|
|
@ -459,7 +459,9 @@ export interface BasicColumn extends ColumnProps<Recordable> {
|
||||||
editRow?: boolean;
|
editRow?: boolean;
|
||||||
editable?: boolean;
|
editable?: boolean;
|
||||||
editComponent?: ComponentType;
|
editComponent?: ComponentType;
|
||||||
editComponentProps?: Recordable;
|
// update-begin--author:liaozhiyang---date:20250818---for:【issues/8680】editComponentProps可接受一个函数传入record
|
||||||
|
editComponentProps?: Recordable | ((record: Recordable) => Recordable);
|
||||||
|
// update-end--author:liaozhiyang---date:20250818---for:【issues/8680】editComponentProps可接受一个函数传入record
|
||||||
editRule?: boolean | ((text: string, record: Recordable) => Promise<string>);
|
editRule?: boolean | ((text: string, record: Recordable) => Promise<string>);
|
||||||
editValueMap?: (value: any) => string;
|
editValueMap?: (value: any) => string;
|
||||||
onEditRow?: () => void;
|
onEditRow?: () => void;
|
||||||
|
|
Loading…
Reference in New Issue