!49238 回退修改!48941

Merge pull request !49238 from wjn/code_rollback_48941
This commit is contained in:
openharmony_ci 2024-11-22 09:40:57 +00:00 committed by Gitee
commit d055c6c9ca
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 3 additions and 1 deletions

View File

@ -461,6 +461,7 @@ ArkUINativeModuleValue TextAreaBridge::SetShowCounter(ArkUIRuntimeCallInfo *runt
thresholdValue = thresholdArg->Int32Value(vm);
if (thresholdValue < MINI_VALID_VALUE || thresholdValue > MAX_VALID_VALUE) {
thresholdValue = static_cast<int32_t>(ILLEGAL_VALUE);
showCounter = false;
}
}
GetArkUINodeModifiers()->getTextAreaModifier()->setTextAreaShowCounterOptions(

View File

@ -1497,6 +1497,7 @@ ArkUINativeModuleValue TextInputBridge::SetShowCounter(ArkUIRuntimeCallInfo* run
thresholdValue = thresholdArg->Int32Value(vm);
if (thresholdValue < MINI_VALID_VALUE || thresholdValue > MAX_VALID_VALUE) {
thresholdValue = ILLEGAL_VALUE;
showCounter = false;
}
}
GetArkUINodeModifiers()->getTextInputModifier()->setTextInputShowCounter(

View File

@ -1394,7 +1394,7 @@ void JSTextField::SetShowCounter(const JSCallbackInfo& info)
static_cast<uint32_t>(inputNumber) > MAX_VAILD_VALUE) {
LOGI("The info is wrong, it is supposed to be a right number");
TextFieldModel::GetInstance()->SetCounterType(ILLEGAL_VALUE);
TextFieldModel::GetInstance()->SetShowCounter(jsValue->ToBoolean());
TextFieldModel::GetInstance()->SetShowCounter(false);
return;
}
TextFieldModel::GetInstance()->SetShowCounter(jsValue->ToBoolean());