• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import {
2  memo,
3  __memo_context_type,
4__memo_id_type,
5  State,
6  StateDecoratedVariable,
7  MutableState,
8  stateOf,
9  observableProxy
10} from '@ohos.arkui.stateManagement' // should be insert by ui-plugins
11
12import {
13  $r,
14  Entry,
15  Text,
16  TextAttribute,
17  ResourceColor,
18  Color,
19  Column,
20  Component,
21  Button,
22  ButtonAttribute,
23  ClickEvent,
24  UserView,
25  Font,
26  Progress,
27  ProgressAttribute,
28  ProgressType,
29  ProgressOptions,
30  ProgressStatus,
31  RingStyleOptions,
32  LinearStyleOptions,
33  ProgressStyleOptions,
34  CapsuleStyleOptions,
35  ScaleRingStyleOptions,
36  ScanEffectOptions,
37  QRCode,
38  QRCodeAttribute,
39  LoadingProgress,
40  LoadingProgressAttribute,
41  PatternLock,
42  PatternLockAttribute,
43  Badge,
44  BadgeAttribute,
45  BadgeStyle,
46  BadgeParam,
47  BadgeParamWithNumber,
48  BadgeParamWithString,
49  DataPanel,
50  DataPanelAttribute,
51  DataPanelType,
52  DataPanelOptions,
53  Gauge,
54  GaugeAttribute,
55  GaugeOptions,
56  ColorStop,
57  LinearGradient,
58  TextTimer,
59  TextTimerController,
60  TextTimerOptions,
61  TextTimerAttribute,
62  TextClock,
63  TextClockAttribute,
64  Image,
65  ImageAttribute,
66  Flex,
67  FlexAttribute,
68  Row,
69  RowAttribute,
70  Alignment,
71  PixelMap,
72  ResizableOptions,
73  EdgeWidths,
74  NavDestination,
75  NavPathStack,
76  NavDestinationContext,
77  Callback
78} from '@ohos.arkui.component'
79
80import hilog from '@ohos.hilog'
81import image from '@ohos.multimedia.image'
82
83@Component
84export struct Image002Test {
85  @State pixelmap: PixelMap | string = ''
86
87  aboutToAppear() {
88    // 从配置文件或数据库中读取图片地址
89    this.pixelmap = this.getConfiguredImageUrl();
90  }
91
92  getConfiguredImageUrl(): string {
93    return ''
94  }
95
96  build() {
97    NavDestination() {
98
99    }
100    .title('Image支持网络图片图片')
101  }
102}