修改错误格式

Signed-off-by: l-l <liuxiaobofight@163.com>
This commit is contained in:
l-l 2024-11-19 09:38:15 +08:00
parent 6e1482020d
commit 9479293030
5 changed files with 37 additions and 5 deletions

View File

@ -1,3 +1,18 @@
/*
* Copyright (C) 2023-2024 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": {
"signingConfigs": [],

View File

@ -63,7 +63,7 @@ export default struct AddFormByMenu {
.fontSize(30)
.margin({ bottom: 20 })
}
.backgroundImage($r("app.media.CardEvent"))
.backgroundImage($r('app.media.CardEvent'))
.backgroundImageSize(ImageSize.Cover)
.id(this.compId)
.width(200)

View File

@ -63,7 +63,7 @@ export default struct AddFormByMenu {
.fontSize(30)
.margin({ bottom: 20 })
}
.backgroundImage($r("app.media.CardEvent"))
.backgroundImage($r('app.media.CardEvent'))
.backgroundImageSize(ImageSize.Cover)
.id(this.compId)
.width(200)

View File

@ -56,12 +56,13 @@ export default class OpenHarmonyTestRunner implements TestRunner {
}
}
async function checkMock(abilityDelegator: abilityDelegatorRegistry.AbilityDelegator, resourceManager: resourceManager.ResourceManager) {
async function checkMock(abilityDelegator: abilityDelegatorRegistry.AbilityDelegator,
resourceManager: resourceManager.ResourceManager) {
let rawFile: Uint8Array;
try {
rawFile = resourceManager.getRawFileContentSync(jsonPath);
hilog.info(0x0000, tag, 'MockList file exists');
let mockStr: string = util.TextDecoder.create("utf-8", { ignoreBOM: true }).decodeWithStream(rawFile);
let mockStr: string = util.TextDecoder.create('utf-8', { ignoreBOM: true }).decodeWithStream(rawFile);
let mockMap: Record<string, string> = getMockList(mockStr);
try {
abilityDelegator.setMockList(mockMap)
@ -73,7 +74,8 @@ async function checkMock(abilityDelegator: abilityDelegatorRegistry.AbilityDeleg
} catch (error) {
let code = (error as BusinessError).code;
let message = (error as BusinessError).message;
hilog.error(0x0000, tag, `ResourceManager:callback getRawFileContent failed, error code: ${code}, message: ${message}.`);
hilog.error(0x0000, tag,
`ResourceManager:callback getRawFileContent failed, error code: ${code}, message: ${message}.`);
}
}

View File

@ -1,3 +1,18 @@
/*
* Copyright (C) 2023-2024 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.
*/
{
"modelVersion": "5.0.0",
"name": "formSample",