• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import {
2  memo,
3  __memo_context_type,
4  __memo_id_type,
5  State,
6  MutableState,
7  stateOf,
8  observableProxy
9} from '@ohos.arkui.stateManagement' // should be insert by ui-plugins
10
11import {
12  Text,
13  TextAttribute,
14  Column,
15  ColumnAttribute,
16  Component,
17  Button,
18  ButtonAttribute,
19  ClickEvent,
20  UserView,
21  FlexAlign,
22  Row ,
23  RowAttribute,
24  Divider,
25  List,
26  ListItem,
27  TextAlign,
28  DividerAttribute,
29  ListItemAttribute,
30  Padding,
31  Margin,
32  Color,
33  CommonMethod,
34  Flex,
35  FlexAttribute,
36  FlexWrap,
37  FlexDirection,
38  Stack,
39  StackAttribute,
40  Alignment,
41  HorizontalAlign,
42  Flex,
43  FlexAttribute,
44  FlexDirection,
45  ItemAlign,
46  LengthMetrics,
47  FlexSpaceOptions,
48  VerticalAlign,
49  GridCol,
50  GridRow,
51  GridColAttribute,
52  GridRowAttribute,
53  BorderOptions,
54  LengthMetrics,
55  LocalizedPadding,
56  LocalizedMargin,
57  $r,
58  PixelRoundPolicy,
59  PixelRoundCalcPolicy,
60  Position,
61  Blank,
62  EdgeStyles,
63  BorderStyle,
64  EdgeWidths,
65  BorderRadiuses,
66  EdgeColors,
67  LocalizedEdgeColors,
68  LocalizedEdgeWidths,
69  LocalizedBorderRadiuses,
70  Entry,
71  NavDestination,
72  NavPathStack,
73  NavDestinationContext,
74  Callback
75} from '@ohos.arkui.component'  // TextAttribute should be insert by ui-plugins
76
77import hilog from '@ohos.hilog'
78
79@Entry
80@Component
81export struct Layout001Test {
82
83  build() {
84    NavDestination() {
85      Column(undefined) {
86      Flex({ justifyContent: FlexAlign.SpaceAround, alignItems: ItemAlign.Center }) {
87        // 线段
88        Text('dashed')
89          .borderStyle(BorderStyle.Dashed).borderWidth(5).borderColor(0xAFEEEE).borderRadius(10)
90          .width(70).height(70).textAlign(TextAlign.Center).fontSize(16)
91        //实线1
92        Text('Solid')
93          .borderStyle(BorderStyle.Solid).borderColor(Color.Pink)
94          .borderRadius(2)
95          .borderWidth(2)
96          .width(70).height(70).textAlign(TextAlign.Center).fontSize(16)
97        //点线1
98        Text('dotted1')
99          .borderStyle(BorderStyle.Dotted).borderWidth(5).borderColor('#ff000000').borderRadius(10)
100          .width(70).height(70).textAlign(TextAlign.Center).fontSize(16)
101      }.width('100%').height(150)
102
103      Text('.border')
104        .fontSize(50)
105        .width(300)
106        .height(300)
107        .borderWidth({ left: 3, right: 6, top: 10, bottom: 15 } as EdgeWidths )
108        .borderColor($r('app.color.background'))
109        .borderRadius({ topLeft: 10, topRight: 20, bottomLeft: 40, bottomRight: 80 } as BorderRadiuses )
110        .textAlign(TextAlign.Center)
111
112    }
113    }
114    .title('布局基础功能测试用例001')
115  }
116}