From b908a7c95f5c7319036bf11eb6a03becea28b261 Mon Sep 17 00:00:00 2001 From: liukaii Date: Mon, 4 Jul 2022 17:21:14 +0800 Subject: [PATCH] Modify file name. Signed-off-by: liukaii --- runtime/main/extend/systemplugin/napi/index.js | 4 ++-- .../{ohos_uiappearance.js => ohos_uiAppearance.js} | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) rename runtime/main/extend/systemplugin/napi/{ohos_uiappearance.js => ohos_uiAppearance.js} (88%) diff --git a/runtime/main/extend/systemplugin/napi/index.js b/runtime/main/extend/systemplugin/napi/index.js index fdab14e9..205259ad 100644 --- a/runtime/main/extend/systemplugin/napi/index.js +++ b/runtime/main/extend/systemplugin/napi/index.js @@ -161,13 +161,13 @@ import { mockDefaultAppManager } from './ohos_bundle_defaultAppManager' import { mockKeyEvent } from './ohos_multimodalInput_keyEvent' import { mockMouseEvent } from './ohos_multimodalInput_mouseEvent' import { mockTouchEvent } from './ohos_multimodalInput_touchEvent' -import { mockUiAppearance } from './ohos_uiappearance' +import { mockUiAppearance } from './ohos_uiAppearance' export function mockRequireNapiFun() { global.requireNapi = function (...args) { switch (args[0]) { case "file": return mockFile(); - case "uiappearance": + case "uiAppearance": return mockUiAppearance(); case "resourceManager": return mockResourceManager(); diff --git a/runtime/main/extend/systemplugin/napi/ohos_uiappearance.js b/runtime/main/extend/systemplugin/napi/ohos_uiAppearance.js similarity index 88% rename from runtime/main/extend/systemplugin/napi/ohos_uiappearance.js rename to runtime/main/extend/systemplugin/napi/ohos_uiAppearance.js index ab8a8602..69302595 100644 --- a/runtime/main/extend/systemplugin/napi/ohos_uiappearance.js +++ b/runtime/main/extend/systemplugin/napi/ohos_uiAppearance.js @@ -19,11 +19,11 @@ export function mockUiAppearance() { const DarkMode = { ALWAYS_DARK: 0, ALWAYS_LIGHT: 1 - }; - const uiappearance = { + } + const uiAppearance = { DarkMode, setDarkMode: function (...args) { - console.warn("uiappearance.setDarkMode interface mocked in the Previewer." + + console.warn("uiAppearance.setDarkMode interface mocked in the Previewer." + " How this interface works on the Previewer may be different from that on a real device.") const len = args.length; if (len > 0 && typeof args[len - 1] === 'function') { @@ -35,10 +35,10 @@ export function mockUiAppearance() { } }, getDarkMode: function () { - console.warn("uiappearance.getDarkMode interface mocked in the Previewer." + + console.warn("uiAppearance.getDarkMode interface mocked in the Previewer." + " How this interface works on the Previewer may be different from that on a real device.") return DarkMode; } } - return uiappearance; + return uiAppearance; }