• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/**
2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16import {
17  BaseModulePreLoader,
18  layoutConfigManager,
19  PageDesktopLayoutConfig,
20  PageDesktopModeConfig,
21  PageDesktopAppModeConfig
22} from '@ohos/common';
23import { PageDesktopGridStyleConfig } from './PageDesktopGridStyleConfig';
24
25/**
26 * public layer initialization loader
27 */
28class PageDesktopPreLoader extends BaseModulePreLoader {
29  protected loadConfig(): void {
30    layoutConfigManager.addConfigToManager(PageDesktopLayoutConfig.getInstance());
31    layoutConfigManager.addConfigToManager(PageDesktopModeConfig.getInstance());
32    layoutConfigManager.addConfigToManager(PageDesktopAppModeConfig.getInstance());
33    layoutConfigManager.addConfigToManager(PageDesktopGridStyleConfig.getInstance());
34  }
35
36  protected loadData(): void {
37  }
38
39  releaseConfigAndData(): void {
40    layoutConfigManager.removeConfigFromManager();
41  }
42}
43
44export const pageDesktopPreLoader: BaseModulePreLoader = new PageDesktopPreLoader();