From 8b34c90e7226d9993ddeb9cbaf06e7b0f151052f Mon Sep 17 00:00:00 2001 From: huangjie Date: Tue, 12 Jul 2022 10:33:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E7=90=83=E5=8C=96=E8=A1=A5=E5=85=85AP?= =?UTF-8?q?I=20mock?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huangjie --- .../systemplugin/napi/global/resource.js | 20 +++++++++++++++++++ .../systemplugin/napi/ohos_resourceManager.js | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 runtime/main/extend/systemplugin/napi/global/resource.js diff --git a/runtime/main/extend/systemplugin/napi/global/resource.js b/runtime/main/extend/systemplugin/napi/global/resource.js new file mode 100644 index 00000000..8d2d8906 --- /dev/null +++ b/runtime/main/extend/systemplugin/napi/global/resource.js @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2022 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. + */ + +export const Resource = { + bundleName : '[PC Preview] unknow string', + moduleName : '[PC Preview] unknow string', + id : '[PC Preview] unknow number' +} \ No newline at end of file diff --git a/runtime/main/extend/systemplugin/napi/ohos_resourceManager.js b/runtime/main/extend/systemplugin/napi/ohos_resourceManager.js index 5d5b5283..d6bb618e 100644 --- a/runtime/main/extend/systemplugin/napi/ohos_resourceManager.js +++ b/runtime/main/extend/systemplugin/napi/ohos_resourceManager.js @@ -36,7 +36,8 @@ export function mockResourceManager() { SCREEN_MDPI : 160, SCREEN_LDPI : 240, SCREEN_XLDPI : 320, - SCREEN_XXLDPI : 480 + SCREEN_XXLDPI : 480, + SCREEN_XXXLDPI : 640 } const DeviceType = {