icssoa hai 7 meses
pai
achega
efadda53d9

+ 6 - 2
uni_modules/cool-ui/components/cl-form-item/cl-form-item.uvue

@@ -50,6 +50,10 @@ defineOptions({
 	name: "cl-form-item"
 });
 
+defineSlots<{
+	error(props: { error: string }): any;
+}>();
+
 // 组件属性定义
 const props = defineProps({
 	// 透传样式
@@ -172,9 +176,9 @@ onMounted(() => {
 
 			return value;
 		}),
-		(val: any, val2: any) => {
+		(a: any, b: any) => {
 			if (props.required) {
-				if (!isEqual(val, val2)) {
+				if (!isEqual(a, b)) {
 					validateField(props.prop);
 				}
 			}

+ 0 - 1
uni_modules/cool-ui/types/component.d.ts

@@ -172,7 +172,6 @@ declare type ClFormComponentPublicInstance = {
 	addField: (prop: string) => void;
 	removeField: (prop: string) => void;
 	getValue: (prop: string) => any | null;
-	setData: (data: UTSJSONObject) => void;
 	setError: (prop: string, error: string) => void;
 	getError: (prop: string) => string;
 	removeError: (prop: string) => void;