safearea.js 879 B

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