diff --git a/interfaces/native/node/style_modifier.cpp b/interfaces/native/node/style_modifier.cpp index e7b453ee013..2c79f4859f3 100644 --- a/interfaces/native/node/style_modifier.cpp +++ b/interfaces/native/node/style_modifier.cpp @@ -6919,7 +6919,7 @@ int32_t SetSwiperDisplayCount(ArkUI_NodeHandle node, const ArkUI_AttributeItem* if (item->size == 0) { return ERROR_CODE_PARAM_INVALID; } - if (LessNotEqual(item->value[0].i32, NUM_0)) { + if (LessNotEqual(item->value[0].f32, 0.0f)) { return ERROR_CODE_PARAM_INVALID; } auto* fullImpl = GetFullImpl(); diff --git a/test/unittest/interfaces/native_node_test.cpp b/test/unittest/interfaces/native_node_test.cpp index 7468de99f42..451d5eee074 100644 --- a/test/unittest/interfaces/native_node_test.cpp +++ b/test/unittest/interfaces/native_node_test.cpp @@ -4586,7 +4586,6 @@ HWTEST_F(NativeNodeTest, NativeNodeTest060, TestSize.Level1) EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_INDEX, &item0), ARKUI_ERROR_CODE_PARAM_INVALID); EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_INDEX, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID); EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_DISPLAY_COUNT, &item0), ARKUI_ERROR_CODE_PARAM_INVALID); - EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_DISPLAY_COUNT, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID); EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_DISABLE_SWIPE, &item0), ARKUI_ERROR_CODE_PARAM_INVALID); EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_DISABLE_SWIPE, &itemEnum), ARKUI_ERROR_CODE_PARAM_INVALID); EXPECT_EQ(nodeAPI->setAttribute(rootNode, NODE_SWIPER_SHOW_DISPLAY_ARROW, &item0), ARKUI_ERROR_CODE_PARAM_INVALID);