diff --git a/ArkUIKit/LayoutSample/README_zh.md b/ArkUIKit/LayoutSample/README_zh.md
new file mode 100644
index 0000000000000000000000000000000000000000..e61888b7239f0ffff3f1fc8bf3d1dbdae0831735
--- /dev/null
+++ b/ArkUIKit/LayoutSample/README_zh.md
@@ -0,0 +1,266 @@
+# ArkUI Layout Sample
+
+## 项目简介
+
+本项目基于HarmonyOS ArkUI框架,展示了ArkUI中多种布局组件布局约束的使用方法。项目包括了Native C++实现和ArkTS实现两种方式,为开发者提供了多种布局学习资源。
+
+## 效果预览
+
+
+## 项目结构
+LayoutSample/
+├── AppScope/ # 应用全局配置
+│ ├── app.json5 # 应用配置文件
+│ └── resources/ # 全局资源文件
+├── entry/ # 主模块
+│ ├── src/main/
+│ │ ├── cpp/ # Native C++代码
+│ │ │ ├── examples/ # 布局示例实现
+│ │ │ │ ├── alignRuleOptionExample.h # 对齐规则示例
+│ │ │ │ ├── barrierOptionExample.h # 障碍物布局示例
+│ │ │ │ ├── columnExample.h # 列布局示例
+│ │ │ │ ├── flexExample.h # Flex布局示例
+│ │ │ │ ├── guidelineOptionExample.h # 引导线示例
+│ │ │ │ ├── itemAlignmentExample.h # 项目对齐示例
+│ │ │ │ ├── layoutConstraintExample.h # 布局约束示例
+│ │ │ │ ├── layoutPolicyExample.h # 布局策略示例
+│ │ │ │ ├── layoutPositionExample.h # 布局位置示例
+│ │ │ │ ├── listChildrenMainSizeExample.h # 列表子元素主尺寸示例
+│ │ │ │ ├── pixelRoundExample.h # 像素舍入示例
+│ │ │ │ ├── positionEdgesExample.h # 位置边缘示例
+│ │ │ │ ├── refreshOffsetChangeExample.h # 刷新偏移事件示例
+│ │ │ │ ├── relativeLayoutChainExample.h # 相对布局链示例
+│ │ │ │ ├── rowExample.h # 行布局示例
+│ │ │ │ ├── safeAreaExample.h # 安全区域示例
+│ │ │ │ ├── stackExample.h # 堆叠布局示例
+│ │ │ │ └── LayoutConstants.h # 布局常量定义
+│ │ │ ├── nodes/ # ArkUI节点封装
+│ │ │ │ └── ArkUIBaseNode.h # 基础节点类
+│ │ │ ├── NativeEntry.h # Native入口头文件
+│ │ │ ├── NativeEntry.cpp # Native入口实现
+│ │ │ └── napi_init.cpp # NAPI初始化
+│ │ ├── ets/ # ArkTS代码
+│ │ │ ├── entryability/ # 应用入口
+│ │ │ │ └── EntryAbility.ets # 主Ability
+│ │ │ ├── models/ # 数据模型
+│ │ │ │ └── NavigationItem.ts # 导航项模型
+│ │ │ └── pages/ # 页面文件
+│ │ │ ├── Index.ets # 主页面
+│ │ │ ├── native.ets # Native测试页面
+│ │ │ ├── node.ets # Node测试页面
+│ │ │ ├── nativeTest/ # Native测试示例页面
+│ │ │ └── nodeTest/ # Node测试示例页面
+│ │ ├── resources/ # 资源文件
+│ │ └── module.json5 # 模块配置文件
+│ ├── build-profile.json5 # 构建配置
+│ └── oh-package.json5 # 包配置文件
+├── build-profile.json5 # 项目构建配置
+├── oh-package.json5 # 项目包配置
+└── README.md # 项目说明文档
+
+## 功能特性
+
+### 1. 布局组件示例
+- **Flex布局**: 弹性盒子布局,支持主轴和交叉轴对齐
+- **Stack布局**: 堆叠布局,子组件按层级叠放
+- **Row布局**: 水平线性布局
+- **Column布局**: 垂直线性布局
+- **RelativeContainer**: 相对布局容器
+
+### 2. 布局约束和规则
+- **LayoutConstraint**: 布局约束设置和获取
+- **AlignRuleOption**: 相对布局对齐规则配置
+- **GuidelineOption**: 引导线配置,辅助布局对齐
+- **BarrierOption**: 障碍物配置,创建虚拟边界
+- **RelativeLayoutChain**: 相对布局链,实现组件间的链式约束
+
+### 3. 布局属性和策略
+- **LayoutPosition**: 布局位置设置和获取
+- **LayoutPolicy**: 布局策略(WrapContent、FixAtIdealSize等)
+- **PositionEdges**: 位置边缘设置
+- **PixelRound**: 像素取整处理
+- **SafeArea**: 安全区域处理
+
+### 4. 高级功能
+- **ListChildrenMainSize**: 列表子元素主尺寸控制
+- **ItemAlignment**: 项目对齐方式设置
+- **RefreshOffsetEvent**: 刷新偏移事件处理
+
+## 技术架构
+
+### 1. 混合开发架构
+- **ArkTS层**: 提供UI界面和用户交互
+- **Native C++层**: 实现核心布局逻辑和性能优化
+- **NAPI桥接**: 连接ArkTS和C++层,实现数据传递
+
+### 2. 核心组件
+- **NativeEntry**: Native层入口管理类,负责组件生命周期
+- **ArkUIBaseNode**: 基础节点类,封装ArkUI原生节点操作
+- **NodeContent**: 内容容器,用于承载Native组件
+
+### 3. 设计模式
+- **工厂模式**: 用于创建不同类型的布局示例
+- **单例模式**: NativeEntry采用单例模式管理全局状态
+- **模板方法模式**: 统一的创建和销毁流程
+
+## 开发环境要求
+
+- **HarmonyOS SDK**: 6.0.0(49) 或更高版本
+- **DevEco Studio**: 最新版本
+- **编译器**: BiSheng (用于Native编译)
+- **目标设备**: 支持HarmonyOS的移动设备
+
+## 构建和运行
+
+### 1. 环境准备
+```bash
+# 确保已安装DevEco Studio和HarmonyOS开发工具包
+# 配置好开发环境和设备连接
+```
+
+### 2. 项目构建
+```bash
+# 连接HarmonyOS设备或启动模拟器
+# 点击构建按钮进行构建
+```
+
+### 3. 安装运行
+```bash
+# 连接HarmonyOS设备或启动模拟器
+# 点击运行按钮安装并运行应用
+```
+
+## 使用说明
+
+### 1. 应用导航
+- 启动应用后,主页面显示两个主要入口:
+ - **NativeType测试**: 展示Native C++实现的布局示例
+ - **Node测试**: 展示ArkTS Node API实现的布局示例
+
+### 2. Native测试示例
+包含以下测试页面:
+- `layoutConstraintTest`: 布局约束测试
+- `alignRuleOptionExample`: 对齐规则示例
+- `guidelineOptionExample`: 引导线示例
+- `barrierOptionExample`: 障碍物示例
+- `listChildrenMainSizeExample`: 列表子元素主尺寸示例
+- `itemAlignmentExample`: 项目对齐示例
+- `relativeLayoutChainExample`: 相对布局链示例
+- `positionEdgesExample`: 位置边缘示例
+- `pixelRoundExample`: 像素舍入示例
+
+### 3. Node测试示例
+包含以下测试页面:
+- `flex测试`: Flex布局测试
+- `stack测试`: Stack布局测试
+- `row测试`: Row布局测试
+- `column测试`: Column布局测试
+- `layoutPosition测试`: 布局位置测试
+- `safeArea测试`: 安全区域测试
+- `refreshOffsetEvent测试`: 刷新偏移事件测试
+- `layoutPolicy测试`: 布局策略测试
+
+## 代码示例
+
+### 1. Native C++布局示例
+```cpp
+// 创建布局约束示例
+std::shared_ptr CreateLayoutConstraintExample()
+{
+ auto column = std::make_shared();
+ auto child = std::make_shared();
+ child->SetWidth(Sizes::EXTRA_LARGE);
+ child->SetHeight(Sizes::EXTRA_LARGE);
+
+ // 应用布局约束
+ auto values = column->layoutConstraintExample(child);
+ auto constraint = values.first;
+ auto size = values.second;
+
+ // 显示约束信息
+ auto sizeText = std::make_shared();
+ sizeText->SetTextContent("Width : " + std::to_string(size.width) +
+ " Height : " + std::to_string(size.height));
+
+ column->AddChild(sizeText);
+ child->SetBackgroundColor(Colors::LIGHT_BLUE);
+ return column;
+}
+```
+
+### 2. ArkTS页面示例
+```typescript
+@Entry
+@Component
+struct layoutConstraintTest {
+ private rootSlot = new NodeContent();
+
+ aboutToAppear(): void {
+ // 创建Native组件
+ nativeNode.CreateLayoutConstraintNativeRoot(this.rootSlot)
+ }
+
+ aboutToDisappear(): void {
+ // 销毁Native组件
+ nativeNode.DestroyLayoutConstraintNativeRoot()
+ }
+
+ build() {
+ Column() {
+ Row() {
+ // 绑定Native内容
+ ContentSlot(this.rootSlot)
+ }.layoutWeight(1)
+ }
+ .width('100%')
+ .height('100%')
+ }
+}
+```
+
+## 学习要点
+
+### 1. 布局基础概念
+- **约束系统**: 了解HarmonyOS的布局约束机制
+- **测量和布局**: 掌握组件的测量和布局流程
+- **坐标系统**: 了解屏幕坐标和组件坐标的关系
+
+### 2. 性能优化
+- **Native实现**: 关键布局逻辑使用C++实现,提升性能
+- **内存管理**: 合理的组件生命周期管理
+- **渲染优化**: 减少不必要的重绘和重排
+
+### 3. 开发实践
+- **混合开发**: ArkTS + Native C++的开发模式
+- **组件封装**: 可复用的布局组件设计
+- **调试技巧**: 布局问题的调试和定位方法
+
+## 常见问题
+
+### 1. 编译问题
+- 确保Native编译环境配置正确
+- 检查CMakeLists.txt配置是否正确
+- 验证SDK版本兼容性
+
+### 2. 运行问题
+- 检查设备连接和权限设置
+- 确认应用签名配置
+- 查看日志输出定位问题
+
+### 3. 布局问题
+- 理解不同布局组件的特性和限制
+- 注意约束冲突和优先级
+- 合理使用布局策略
+
+## 扩展开发
+
+### 1. 添加新的布局示例
+1. 在`cpp/examples/`目录下创建新的示例头文件
+2. 实现布局逻辑和UI展示
+3. 在`NativeEntry.cpp`中注册新的NAPI接口
+4. 创建对应的ArkTS测试页面
+
+### 2. 自定义布局组件
+1. 继承`ArkUIBaseNode`创建自定义节点类
+2. 实现特定的布局算法
+3. 封装为可复用的组件
\ No newline at end of file
diff --git a/ArkUIKit/LayoutSample/build-profile.json5 b/ArkUIKit/LayoutSample/build-profile.json5
index d7eca852872416dc5b03d25954e81a38473bdecf..6f8f88a9a7b9e2c761e5f9c4c58353d0106f00fa 100755
--- a/ArkUIKit/LayoutSample/build-profile.json5
+++ b/ArkUIKit/LayoutSample/build-profile.json5
@@ -1,3 +1,18 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
{
"app": {
"products": [
diff --git a/ArkUIKit/LayoutSample/code-linter.json5 b/ArkUIKit/LayoutSample/code-linter.json5
index 6cb87c1af6693671ede1a49f7f674815355ff099..4c531be90a6c875995767bd87f2de3cbd6b55160 100755
--- a/ArkUIKit/LayoutSample/code-linter.json5
+++ b/ArkUIKit/LayoutSample/code-linter.json5
@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
{
"files": [
"**/*.ets"
diff --git a/ArkUIKit/LayoutSample/entry/hvigorfile.ts b/ArkUIKit/LayoutSample/entry/hvigorfile.ts
index f168f309120366e771b9336f45412b412b0d5128..7e3b4f27be7209b9df7b706deadc14cee3675796 100755
--- a/ArkUIKit/LayoutSample/entry/hvigorfile.ts
+++ b/ArkUIKit/LayoutSample/entry/hvigorfile.ts
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-import { hapTasks } from '@ohos/hvigor-ohos-plugin';
+import { hapTasks } from '@ohos/hvigor-ohos-plugin'
export default {
system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
diff --git a/ArkUIKit/LayoutSample/entry/obfuscation-rules.txt b/ArkUIKit/LayoutSample/entry/obfuscation-rules.txt
index 9c2fcfe03c4ee1424902700719fef21d3ebec507..272efb6ca3f240859091bbbfc7c5802d52793b0b 100755
--- a/ArkUIKit/LayoutSample/entry/obfuscation-rules.txt
+++ b/ArkUIKit/LayoutSample/entry/obfuscation-rules.txt
@@ -1,18 +1,3 @@
-/*
- * Copyright (c) 2025 Huawei Device Co., Ltd.
- * Licensed under the Apache License, Version 2.0 (the "License")
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
# Define project specific obfuscation rules here.
# You can include the obfuscation configuration files in the current module's build-profile.json5.
#
diff --git a/ArkUIKit/LayoutSample/entry/oh-package-lock.json5 b/ArkUIKit/LayoutSample/entry/oh-package-lock.json5
index e508e911b7821d5fdac19958967a4424087e0392..e7c2cfa42de333c3b84b949d7022ed1276f39929 100755
--- a/ArkUIKit/LayoutSample/entry/oh-package-lock.json5
+++ b/ArkUIKit/LayoutSample/entry/oh-package-lock.json5
@@ -12,6 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
{
"meta": {
"stableOrder": true,
diff --git a/ArkUIKit/LayoutSample/entry/src/main/cpp/NativeEntry.cpp b/ArkUIKit/LayoutSample/entry/src/main/cpp/NativeEntry.cpp
index ae656f8232a25302e8566901993f53db41f7b4d8..b13479609c766a75a9bf81d6a6dda4013cf1182a 100755
--- a/ArkUIKit/LayoutSample/entry/src/main/cpp/NativeEntry.cpp
+++ b/ArkUIKit/LayoutSample/entry/src/main/cpp/NativeEntry.cpp
@@ -50,19 +50,25 @@ napi_value CreateNativeRootImpl(napi_env env, napi_callback_info info, CreateFun
if (OH_ArkUI_GetNodeContentFromNapiValue(env, args[0], &contentHandle) != 0) {
return nullptr;
}
- /* 设置内容句柄 */
- NativeEntry::GetInstance()->SetContentHandle(contentHandle);
/* 创建指定模块的Native组件 */
auto node = createFunc();
/* 设置根节点 */
- NativeEntry::GetInstance()->SetRootNode(node);
+ NativeEntry::GetInstance()->SetRootNode(contentHandle ,node);
return nullptr;
}
napi_value DestroyNativeRootImpl(napi_env env, napi_callback_info info)
{
- /* 销毁根节点 */
- NativeEntry::GetInstance()->DisposeRootNode();
+ size_t argc = 1;
+ napi_value args[1] = {nullptr};
+ if (napi_get_cb_info(env, info, &argc, args, nullptr, nullptr) != napi_ok) {
+ return nullptr;
+ }
+ ArkUI_NodeContentHandle contentHandle;
+ if (OH_ArkUI_GetNodeContentFromNapiValue(env, args[0], &contentHandle) != 0) {
+ return nullptr;
+ }
+ NativeEntry::GetInstance()->DisposeRootNode(contentHandle);
return nullptr;
}
diff --git a/ArkUIKit/LayoutSample/entry/src/main/cpp/NativeEntry.h b/ArkUIKit/LayoutSample/entry/src/main/cpp/NativeEntry.h
index d6035dd94be5b18def04424b38127de4af888b9c..8b19796274103f68460a05da7bac546af2572b96 100755
--- a/ArkUIKit/LayoutSample/entry/src/main/cpp/NativeEntry.h
+++ b/ArkUIKit/LayoutSample/entry/src/main/cpp/NativeEntry.h
@@ -19,6 +19,7 @@
#include
#include
#include
+#include
namespace NativeModule {
@@ -98,25 +99,24 @@ public:
return &nativeEntry;
}
- void SetContentHandle(ArkUI_NodeContentHandle handle) { handle_ = handle; }
-
- void SetRootNode(const std::shared_ptr &baseNode)
+ // 使用 contentHandle 作为 key,支持多个页面
+ void SetRootNode(ArkUI_NodeContentHandle contentHandle, const std::shared_ptr& node)
{
- root_ = baseNode;
- // 添加Native组件到NodeContent上用于挂载显示
- OH_ArkUI_NodeContent_AddNode(handle_, root_->GetHandle());
+ roots_[contentHandle] = node;
+ OH_ArkUI_NodeContent_AddNode(contentHandle, node->GetHandle());
}
-
- void DisposeRootNode()
+
+ void DisposeRootNode(ArkUI_NodeContentHandle contentHandle)
{
- // 从NodeContent上卸载组件并销毁Native组件
- OH_ArkUI_NodeContent_RemoveNode(handle_, root_->GetHandle());
- root_.reset();
+ auto it = roots_.find(contentHandle);
+ if (it != roots_.end()) {
+ OH_ArkUI_NodeContent_RemoveNode(contentHandle, it->second->GetHandle());
+ roots_.erase(it);
+ }
}
private:
- std::shared_ptr root_; // 根节点智能指针
- ArkUI_NodeContentHandle handle_; // NodeContent句柄
+ std::unordered_map> roots_;
};
} // namespace NativeModule
diff --git a/ArkUIKit/LayoutSample/entry/src/main/cpp/nodes/ArkUIBaseNode.h b/ArkUIKit/LayoutSample/entry/src/main/cpp/nodes/ArkUIBaseNode.h
index b72336c8f183126b4e08cf281093a545c3c4a6a3..16076ab0fe47960bcf627a7ff64140fce168367d 100755
--- a/ArkUIKit/LayoutSample/entry/src/main/cpp/nodes/ArkUIBaseNode.h
+++ b/ArkUIKit/LayoutSample/entry/src/main/cpp/nodes/ArkUIBaseNode.h
@@ -21,7 +21,11 @@
#include
#include "NativeModule.h"
-
+#include
+#undef LOG_DOMAIN
+#undef LOG_TAG
+#define LOG_DOMAIN 0x3200 // 全局domain宏,标识业务领域
+#define LOG_TAG "NativeModule" // 全局tag宏,标识模块日志tag
namespace NativeModule {
class ArkUIBaseNode {
@@ -78,7 +82,14 @@ public:
return -1; // 如果没找到,返回-1
}
- ArkUI_NodeHandle GetHandle() const { return handle_; }
+ ArkUI_NodeHandle GetHandle() const
+ {
+ if (!this || !handle_) {
+ OH_LOG_INFO(LOG_APP, "GetHandle nullptr");
+ return nullptr;
+ }
+ return handle_;
+ }
protected:
virtual void OnAddChild(const std::shared_ptr &child) {}
diff --git a/ArkUIKit/LayoutSample/entry/src/mock/Libentry.mock.ets b/ArkUIKit/LayoutSample/entry/src/mock/Libentry.mock.ets
index aec91cff29d00f54980973bcfc9c198d5ea20151..ac383da8f14c1a78e075d81d4ad8a2a3fb939c94 100755
--- a/ArkUIKit/LayoutSample/entry/src/mock/Libentry.mock.ets
+++ b/ArkUIKit/LayoutSample/entry/src/mock/Libentry.mock.ets
@@ -17,6 +17,6 @@ const NativeMock: Record = {
'add': (a: number, b: number) => {
return a + b;
},
-};
+}
export default NativeMock;
\ No newline at end of file
diff --git a/ArkUIKit/LayoutSample/entry/src/ohosTest/ets/test/Ability.test.ets b/ArkUIKit/LayoutSample/entry/src/ohosTest/ets/test/Ability.test.ets
index 3c81579a25ae2430d5c8050c62a1fc14a7b0cf62..542d2f077f3c5096fdf445c10e8339de17915346 100755
--- a/ArkUIKit/LayoutSample/entry/src/ohosTest/ets/test/Ability.test.ets
+++ b/ArkUIKit/LayoutSample/entry/src/ohosTest/ets/test/Ability.test.ets
@@ -13,8 +13,8 @@
* limitations under the License.
*/
-import { hilog } from '@kit.PerformanceAnalysisKit';
-import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
+import { hilog } from '@kit.PerformanceAnalysisKit'
+import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
export default function abilityTest() {
describe('ActsAbilityTest', () => {
diff --git a/ArkUIKit/LayoutSample/entry/src/ohosTest/ets/test/List.test.ets b/ArkUIKit/LayoutSample/entry/src/ohosTest/ets/test/List.test.ets
index cefb5e406030b28a58d7835468d0fe131e352cc0..1de54bc7c34955b2d4f4c982a1b944d839ba8ca6 100755
--- a/ArkUIKit/LayoutSample/entry/src/ohosTest/ets/test/List.test.ets
+++ b/ArkUIKit/LayoutSample/entry/src/ohosTest/ets/test/List.test.ets
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-import abilityTest from './Ability.test';
+import abilityTest from './Ability.test'
export default function testsuite() {
abilityTest();
diff --git a/ArkUIKit/LayoutSample/entry/src/test/List.test.ets b/ArkUIKit/LayoutSample/entry/src/test/List.test.ets
index 74ba3a099410b447742c4a6ecac5c511bb63e5e7..ce0d3ce32800206d8d888972b948978201183d34 100755
--- a/ArkUIKit/LayoutSample/entry/src/test/List.test.ets
+++ b/ArkUIKit/LayoutSample/entry/src/test/List.test.ets
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-import localUnitTest from './LocalUnit.test';
+import localUnitTest from './LocalUnit.test'
export default function testsuite() {
localUnitTest();
diff --git a/ArkUIKit/LayoutSample/entry/src/test/LocalUnit.test.ets b/ArkUIKit/LayoutSample/entry/src/test/LocalUnit.test.ets
index b367c75db8ae9ad0864a7c14f9bf2ce8c2b5e021..b6ff6505a111b5ee9cf3a3446edc8a534cf6cf26 100755
--- a/ArkUIKit/LayoutSample/entry/src/test/LocalUnit.test.ets
+++ b/ArkUIKit/LayoutSample/entry/src/test/LocalUnit.test.ets
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium';
+import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
export default function localUnitTest() {
describe('localUnitTest', () => {
diff --git a/ArkUIKit/LayoutSample/hvigorfile.ts b/ArkUIKit/LayoutSample/hvigorfile.ts
new file mode 100755
index 0000000000000000000000000000000000000000..3fb9e5ffe0cc272b2b8e073c748a28f728bba037
--- /dev/null
+++ b/ArkUIKit/LayoutSample/hvigorfile.ts
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import { appTasks } from '@ohos/hvigor-ohos-plugin'
+
+export default {
+ system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
+ plugins: [] /* Custom plugin to extend the functionality of Hvigor. */
+}
\ No newline at end of file
diff --git a/ArkUIKit/LayoutSample/oh-package-lock.json5 b/ArkUIKit/LayoutSample/oh-package-lock.json5
new file mode 100755
index 0000000000000000000000000000000000000000..1e92831eccf9bcd11179abea401473b35e64a9f8
--- /dev/null
+++ b/ArkUIKit/LayoutSample/oh-package-lock.json5
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2025 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+{
+ "meta": {
+ "stableOrder": true,
+ "enableUnifiedLockfile": false
+ },
+ "lockfileVersion": 3,
+ "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
+ "specifiers": {
+ "@ohos/hamock@1.0.0": "@ohos/hamock@1.0.0",
+ "@ohos/hypium@1.0.24": "@ohos/hypium@1.0.24"
+ },
+ "packages": {
+ "@ohos/hamock@1.0.0": {
+ "name": "",
+ "version": "1.0.0",
+ "integrity": "sha512-K6lDPYc6VkKe6ZBNQa9aoG+ZZMiwqfcR/7yAVFSUGIuOAhPvCJAo9+t1fZnpe0dBRBPxj2bxPPbKh69VuyAtDg==",
+ "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hamock/-/hamock-1.0.0.har",
+ "registryType": "ohpm"
+ },
+ "@ohos/hypium@1.0.24": {
+ "name": "",
+ "version": "1.0.24",
+ "integrity": "sha512-3dCqc+BAR5LqEGG2Vtzi8O3r7ci/3fYU+FWjwvUobbfko7DUnXGOccaror0yYuUhJfXzFK0aZNMGSnXaTwEnbw==",
+ "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.24.har",
+ "registryType": "ohpm"
+ }
+ }
+}
\ No newline at end of file