Преглед на файлове

修复 clear 在 IOS 端失效问题

icssoa преди 4 месеца
родител
ревизия
e646f4544f
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      uni_modules/cool-ui/components/cl-input/cl-input.uvue

+ 3 - 3
uni_modules/cool-ui/components/cl-input/cl-input.uvue

@@ -8,7 +8,7 @@
 				'cl-input--border': border,
 				'cl-input--focus': isFocus,
 				'cl-input--disabled': isDisabled,
-				'cl-input--error': isError,
+				'cl-input--error': isError
 			}
 		]"
 		@tap="onTap"
@@ -63,7 +63,7 @@
 			></cl-icon>
 		</view>
 
-		<view class="cl-input__icon" @tap="clear" v-if="showClear">
+		<view class="cl-input__icon" @tap.stop="clear" v-if="showClear">
 			<cl-icon
 				name="close-circle-fill"
 				:size="32"
@@ -257,7 +257,7 @@ const isFocus = ref<boolean>(props.autofocus);
 
 // 是否显示清除按钮
 const showClear = computed(() => {
-	return isFocus.value && props.clearable && value.value != "";
+	return props.clearable && value.value != "";
 });
 
 // 是否显示密码