• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2024 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 */
15import router from '@ohos.router';
16import Logger from '../util/Logger';
17
18@Component
19export struct WebUninitialized {
20  build() {
21    Row() {
22      Column({ space: 20 }) {
23        // 点击按钮跳转未优化的Web组件页
24        Button($r('app.string.web_entry_button'))
25          .onClick(() => {
26            AppStorage.setOrCreate('webPage', 'UninitializedWeb');
27            Logger.info("WebPerformance uninitializedWeb");
28            router.pushUrl({ url: 'pages/webPerformance/WebBrowserPage', params: 'UninitializedWeb' });
29          })
30          .width($r('app.string.web_button_width'))
31          .height($r('app.string.web_button_height'))
32        Button($r('app.string.web_page_back'))
33          .onClick(() => {
34            router.back();
35          })
36          .width($r('app.string.web_button_width'))
37          .height($r('app.string.web_button_height'))
38          .margin({ top: $r('app.string.web_button_margin') })
39      }
40      .width('100%')
41    }
42    .height('100%')
43  }
44}