import type { IModelFieldOption } from '@oinone/kunlun-meta'; import type { DslDefinition } from '@oinone/kunlun-dsl'; import type { ActiveRecord, RuntimeModelField } from '@oinone/kunlun-engine'; import { OioFormProps } from '@oinone/kunlun-vue-ui-antd'; import type { PropType } from 'vue'; import type { UserSearchPrefer } from '../../typing'; export const CATE_ALL_NAME = '$ALL'; export const CATE_ALL_OPTION = { value: CATE_ALL_NAME, name: CATE_ALL_NAME, displayName: '全部' } as IModelFieldOption; export const DefaultSearchProps = { ...OioFormProps, template: { type: Object as PropType }, invisible: { type: Boolean }, invisibleSearch: { type: Boolean, default: true }, disabledExpand: { type: Boolean }, foldSize: { type: Number, default: 3 }, formData: { type: Object, default: () => {} }, isExpand: { type: Boolean, default: false }, inline: { type: Boolean, default: false }, onExpand: { type: Function as PropType<(expand: boolean) => void> }, onSearch: { type: Function as PropType<() => void> }, onReset: { type: Function as PropType<() => void> }, translate: { type: Function as PropType<(key: string) => string> }, showSearchPrefer: { type: Boolean, default: false }, searchPreferOptions: { type: Array as PropType }, selectedPrefer: { type: Object as PropType }, onLoadSearchPreferOptions: { type: Function }, onCreateSearchPrefer: { type: Function }, onUpdateSearchPrefer: { type: Function }, onRemoveSearchPrefer: { type: Function }, onSelectSearchPrefer: { type: Function }, onUnselectSearchPrefer: { type: Function }, topCateModelField: { type: Object as PropType }, secondCateModelField: { type: Object as PropType }, topCateFieldOptions: { type: Array as PropType, default: () => [] }, secondCateFieldOptions: { type: Array as PropType, default: () => [] }, showTopCateAll: { type: Boolean }, showSecondCateAll: { type: Boolean }, topCateJustify: { type: String }, cateFields: { type: Array as PropType }, onCateSearch: { type: Function } };