import type { ActiveRecord, RuntimeM2OField, RuntimeO2OField } from '@oinone/kunlun-engine'; import { Condition } from '@oinone/kunlun-request'; import { Widget } from '@oinone/kunlun-vue-widget'; import type { RefreshProcessFunction } from '../../types'; import { type FormComplexFieldProps, FormComplexFieldWidget } from './FormComplexFieldWidget'; export abstract class FormComplexObjectFieldWidget< Field extends RuntimeO2OField | RuntimeM2OField = RuntimeO2OField | RuntimeM2OField, Props extends FormComplexFieldProps = FormComplexFieldProps > extends FormComplexFieldWidget { @Widget.Method() @Widget.Inject('refreshProcess') protected parentRefreshProcess: RefreshProcessFunction | undefined; @Widget.Method() @Widget.Provide() protected async refreshProcess(condition?: Condition) { // do nothing. } protected mountedProcess() { const { value } = this; this.setCurrentDataSource(value == null ? [] : [value]); } }