|
@@ -2,7 +2,7 @@
|
|
|
import type { PropType, Ref } from 'vue';
|
|
|
import { computed, defineComponent, toRefs, unref } from 'vue';
|
|
|
import type { FormActionType, FormProps, FormSchema } from '../types/form';
|
|
|
- import type { ValidationRule } from 'ant-design-vue/lib/form/Form';
|
|
|
+ import type { Rule } from 'ant-design-vue/lib/form';
|
|
|
import type { TableActionType } from '/@/components/Table';
|
|
|
import { Col, Divider, Form } from 'ant-design-vue';
|
|
|
import { componentMap } from '../componentMap';
|
|
@@ -138,7 +138,7 @@
|
|
|
return { isShow, isIfShow };
|
|
|
}
|
|
|
|
|
|
- function handleRules(): ValidationRule[] {
|
|
|
+ function handleRules(): Rule[] {
|
|
|
const {
|
|
|
rules: defRules = [],
|
|
|
component,
|
|
@@ -149,10 +149,10 @@
|
|
|
} = props.schema;
|
|
|
|
|
|
if (isFunction(dynamicRules)) {
|
|
|
- return dynamicRules(unref(getValues)) as ValidationRule[];
|
|
|
+ return dynamicRules(unref(getValues)) as Rule[];
|
|
|
}
|
|
|
|
|
|
- let rules: ValidationRule[] = cloneDeep(defRules) as ValidationRule[];
|
|
|
+ let rules: Rule[] = cloneDeep(defRules) as Rule[];
|
|
|
const { rulesMessageJoinLabel: globalRulesMessageJoinLabel } = props.formProps;
|
|
|
|
|
|
const joinLabel = Reflect.has(props.schema, 'rulesMessageJoinLabel')
|