jialh
2025-01-06 4d6d772771d2da54a4887d60f3b2ea21a72b3d7d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.initSafearea = void 0;
function initSafearea(manifestJson, pagesJson) {
    var _a, _b;
    if ((_b = (_a = pagesJson.tabBar) === null || _a === void 0 ? void 0 : _a.list) === null || _b === void 0 ? void 0 : _b.length) {
        // 安全区配置 仅包含 tabBar 的时候才配置
        if (!manifestJson.plus.safearea) {
            manifestJson.plus.safearea = {
                background: pagesJson.tabBar.backgroundColor || '#FFFFFF',
                bottom: {
                    offset: 'auto',
                },
            };
        }
    }
    else {
        if (!manifestJson.plus.launchwebview) {
            manifestJson.plus.launchwebview = {
                render: 'always',
            };
        }
        else if (!manifestJson.plus.launchwebview.render) {
            manifestJson.plus.launchwebview.render = 'always';
        }
    }
}
exports.initSafearea = initSafearea;