添加输入组件测试
This commit is contained in:
@@ -24,6 +24,12 @@ struct Index {
|
||||
{ name: "TcpSocket", page: 'pages/net/TcpSocketPage'}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'Component',
|
||||
items: [
|
||||
{name: 'InputPage', page: 'pages/component/InputPage'}
|
||||
]
|
||||
},
|
||||
// 布局
|
||||
{
|
||||
name: 'Layout',
|
||||
@@ -126,7 +132,7 @@ struct Index {
|
||||
Column() {
|
||||
Row() {
|
||||
Text(item.name);
|
||||
Image(CommonRes.getImageRes(CommonRes.IC_CHEVRON_RIGHT)).width(32).height(32);
|
||||
Image(CommonRes.getImage(CommonRes.IC_CHEVRON_RIGHT)).width(32).height(32);
|
||||
}.width('100%').height(48).justifyContent(FlexAlign.SpaceBetween).alignItems(VerticalAlign.Center)
|
||||
.padding({left: 16, right: 16})
|
||||
Divider().margin({ top: 2 });
|
||||
|
35
app/src/main/ets/pages/component/InputPage.ets
Normal file
35
app/src/main/ets/pages/component/InputPage.ets
Normal file
@@ -0,0 +1,35 @@
|
||||
import { CommonRes, PhoneInput } from '@devwiki/common_ui/Index';
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct InputPage {
|
||||
|
||||
@Builder settingItem() {
|
||||
Button() {
|
||||
Flex({
|
||||
justifyContent: FlexAlign.SpaceBetween,
|
||||
alignItems: ItemAlign.Center
|
||||
}) {
|
||||
Text("AppAbility_label").fontSize(14)
|
||||
|
||||
Row() {
|
||||
Text("hint").margin({right: CommonRes.getFloat('size_4vp')})
|
||||
.fontSize(14)
|
||||
|
||||
Image(CommonRes.getImage('ic_chevron_left')).height(24).width(24);
|
||||
}
|
||||
}.width('100%')
|
||||
.padding({
|
||||
top: 16,
|
||||
bottom: 16
|
||||
})
|
||||
}.type(ButtonType.Normal).width('100%').backgroundColor(Color.Red)
|
||||
}
|
||||
|
||||
build() {
|
||||
Column(){
|
||||
this.settingItem()
|
||||
Text("123")
|
||||
}.width('100%').height('100%')
|
||||
}
|
||||
}
|
16
app/src/main/ets/pages/component/SVGPage.ets
Normal file
16
app/src/main/ets/pages/component/SVGPage.ets
Normal file
@@ -0,0 +1,16 @@
|
||||
import { CommonRes } from '@devwiki/common_ui/Index'
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
export struct SVGPage {
|
||||
build() {
|
||||
Column() {
|
||||
Text().width(96).height(96).backgroundColor($r('app.media.ic_eye_off'))
|
||||
.linearGradient({
|
||||
angle: 90,
|
||||
colors: [[0xff0000, 0.0], [0x0000ff, 0.3], [0xffff00, 1.0]],
|
||||
repeating: true
|
||||
})
|
||||
}.height('100%').justifyContent(FlexAlign.Center)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user