适配api12

Signed-off-by: fanhaichao <fan3318172@qq.com>
This commit is contained in:
fanhaichao
2025-01-08 17:01:14 +08:00
parent 393bbc86f3
commit dab2a65d76
5 changed files with 15 additions and 11 deletions
+2 -2
View File
@@ -4,8 +4,8 @@
{
"name": "default",
"signingConfig": "default",
"compileSdkVersion": 10,
"compatibleSdkVersion": 10
"compileSdkVersion": 12,
"compatibleSdkVersion": 12
}
],
"signingConfigs": [
+2 -2
View File
@@ -47,12 +47,12 @@ export class MenuInfo {
/**
* shortcut icon Id
*/
shortcutIconId = CommonConstants.INVALID_VALUE;
shortcutIconId: number | undefined = CommonConstants.INVALID_VALUE;
/**
* shortcut label Id
*/
shortcutLabelId = CommonConstants.INVALID_VALUE;
shortcutLabelId: number | undefined = CommonConstants.INVALID_VALUE;
/**
* bundleName
@@ -106,9 +106,13 @@ export struct AppGridLayout {
menu.bundleName = value.bundleName;
menu.moduleName = value.moduleName;
menu.onMenuClick = () => {
this.mAppGridViewModel.jumpTo(
value.wants[0].targetAbility, value.wants[0].targetBundle, value.wants[0].targetModule
);
if (value.wants) {
this.mAppGridViewModel.jumpTo(
value.wants[0].targetAbility, value.wants[0].targetBundle, value.wants[0].targetModule
);
} else {
Log.showError(TAG, 'value.wants is undefined or empty');
}
};
value.bundleName == appInfo.bundleName && value.moduleName == appInfo.moduleName && menuInfoList.push(menu);
});
+1 -2
View File
@@ -1,6 +1,5 @@
{
"hvigorVersion": "3.0.9",
"modelVersion": "5.0.1",
"dependencies": {
"@ohos/hvigor-ohos-plugin": "3.0.9"
}
}
+3 -2
View File
@@ -1,9 +1,10 @@
{
"modelVersion": "5.0.1",
"devDependencies": {
"@ohos/hypium": "1.0.6"
},
"name": "launcher",
"description": "",
"version": "1.0.0",
"dependencies": {}
}
"dependencies": {},
}