diff --git a/frameworks/core/components_ng/pattern/loading_progress/loading_progress_model_ng.cpp b/frameworks/core/components_ng/pattern/loading_progress/loading_progress_model_ng.cpp index 576ea27200fe0eeb958e82a652abf5b3113a22e6..9268b918543652b60c7563b3f15bbd0f491ca629 100644 --- a/frameworks/core/components_ng/pattern/loading_progress/loading_progress_model_ng.cpp +++ b/frameworks/core/components_ng/pattern/loading_progress/loading_progress_model_ng.cpp @@ -53,7 +53,7 @@ void LoadingProgressModelNG::SetEnableLoading(bool enable) uint32_t LoadingProgressModelNG::GetColor(FrameNode* frameNode) { Color value; - ACE_GET_NODE_PAINT_PROPERTY(LoadingProgressPaintProperty, Color, value, frameNode); + ACE_GET_NODE_PAINT_PROPERTY_WITH_DEFAULT_VALUE(LoadingProgressPaintProperty, Color, value, frameNode, value); return value.GetValue(); } diff --git a/frameworks/core/components_ng/pattern/progress/progress_model_ng.cpp b/frameworks/core/components_ng/pattern/progress/progress_model_ng.cpp index baa0934262d37ffaabb118adb731b6652cd34492..1ac95b7c1abde921e1e99480812c77e846681c93 100644 --- a/frameworks/core/components_ng/pattern/progress/progress_model_ng.cpp +++ b/frameworks/core/components_ng/pattern/progress/progress_model_ng.cpp @@ -553,7 +553,7 @@ double ProgressModelNG::GetValue(FrameNode* frameNode) Color ProgressModelNG::GetColor(FrameNode* frameNode) { Color value; - ACE_GET_NODE_PAINT_PROPERTY(ProgressPaintProperty, Color, value, frameNode); + ACE_GET_NODE_PAINT_PROPERTY_WITH_DEFAULT_VALUE(ProgressPaintProperty, Color, value, frameNode, value); return value; } diff --git a/interfaces/native/node/node_model.cpp b/interfaces/native/node/node_model.cpp index debdb97ee6952fcaa6f433d4ec163a813e571a64..ba40873b7a6e0c86205a1c85641a8a782325a318 100644 --- a/interfaces/native/node/node_model.cpp +++ b/interfaces/native/node/node_model.cpp @@ -135,10 +135,7 @@ ArkUI_NodeHandle CreateNode(ArkUI_NodeType type) return nullptr; } - ArkUI_Int32 id = -1; - if (nodeType == ARKUI_NODE_LOADING_PROGRESS || nodeType == ARKUI_NODE_TEXT || nodeType == ARKUI_NODE_TEXT_INPUT) { - id = ARKUI_AUTO_GENERATE_NODE_ID; - } + ArkUI_Int32 id = ARKUI_AUTO_GENERATE_NODE_ID; auto* uiNode = impl->getBasicAPI()->createNode(nodes[nodeType - 1], id, 0); if (!uiNode) { TAG_LOGE(AceLogTag::ACE_NATIVE_NODE, "node type: %{public}d can not find in full impl", type);