fix border color

Signed-off-by: yangziyong <nsyangziyong@huawei.com>
This commit is contained in:
yangziyong 2024-04-29 20:04:52 +08:00
parent 8d5d8af624
commit f700597abb
2 changed files with 5 additions and 2 deletions

View File

@ -9519,7 +9519,8 @@ void JSViewAbstract::SetDialogProperties(const JSRef<JSObject>& obj, DialogPrope
if (ParseBorderColorProps(colorValue, borderColor)) {
properties.borderColor = borderColor;
} else {
NG::BorderColorProperty({ Color::BLACK, Color::BLACK, Color::BLACK, Color::BLACK });
borderColor.SetColor(Color::BLACK);
properties.borderColor = borderColor;
}
// Parse border style
auto styleValue = obj->GetProperty("borderStyle");

View File

@ -1563,7 +1563,9 @@ void ParseBorderColorAndStyle(napi_env env, const std::shared_ptr<PromptAsyncCon
if (borderWidthProps.has_value()) {
borderColorProps = GetBorderColorProps(env, asyncContext);
if (!borderColorProps.has_value()) {
borderColorProps = NG::BorderColorProperty({ Color::BLACK, Color::BLACK, Color::BLACK, Color::BLACK });
NG::BorderColorProperty borderColor;
borderColor.SetColor(Color::BLACK);
borderColorProps = borderColor;
}
borderStyleProps = GetBorderStyleProps(env, asyncContext);
if (!borderStyleProps.has_value()) {