删除无用id 部分页面样式调整

Signed-off-by: dongwei <dongwei@kaihong.com>
This commit is contained in:
dongwei 2023-09-14 11:15:55 +08:00
parent b1bd7ab951
commit e7b5a330a9
13 changed files with 50 additions and 57 deletions

View File

@ -583,7 +583,7 @@ struct ResponseRegionPage001 {
right:{anchor: "__container__", align: HorizontalAlign.Center},
bottom:{anchor: "__container__", align: VerticalAlign.Center},
})
.id("row001")
}
.commonStyle()
} else if (this.targetView == 'Row') {

View File

@ -583,7 +583,7 @@ struct ResponseRegionPage002 {
right:{anchor: "__container__", align: HorizontalAlign.Center},
bottom:{anchor: "__container__", align: VerticalAlign.Center},
})
.id("row001")
}
.commonStyle()
} else if (this.targetView == 'Row') {

View File

@ -583,7 +583,7 @@ struct ResponseRegionPage003 {
right:{anchor: "__container__", align: HorizontalAlign.Center},
bottom:{anchor: "__container__", align: VerticalAlign.Center},
})
.id("row001")
}
.commonStyle()
} else if (this.targetView == 'Row') {

View File

@ -583,7 +583,7 @@ struct ResponseRegionPage004 {
right:{anchor: "__container__", align: HorizontalAlign.Center},
bottom:{anchor: "__container__", align: VerticalAlign.Center},
})
.id("row001")
}
.commonStyle()
} else if (this.targetView == 'Row') {

View File

@ -583,7 +583,7 @@ struct ResponseRegionPage005 {
right:{anchor: "__container__", align: HorizontalAlign.Center},
bottom:{anchor: "__container__", align: VerticalAlign.Center},
})
.id("row001")
}
.commonStyle()
} else if (this.targetView == 'Row') {

View File

@ -583,7 +583,7 @@ struct ResponseRegionPage006 {
right:{anchor: "__container__", align: HorizontalAlign.Center},
bottom:{anchor: "__container__", align: VerticalAlign.Center},
})
.id("row001")
}
.commonStyle()
} else if (this.targetView == 'Row') {

View File

@ -623,7 +623,7 @@ struct ResponseRegionPage007 {
right: { anchor: "__container__", align: HorizontalAlign.Center },
bottom: { anchor: "__container__", align: VerticalAlign.Center },
})
.id("row001")
}
.commonStyle1()
} else if (this.targetView == 'Row') {
@ -1304,7 +1304,7 @@ struct ResponseRegionPage007 {
right: { anchor: "__container__", align: HorizontalAlign.Center },
bottom: { anchor: "__container__", align: VerticalAlign.Center },
})
.id("row001")
}
.commonStyle2()
} else if (this.targetView == 'Row') {

View File

@ -623,7 +623,7 @@ struct ResponseRegionPage008 {
right: { anchor: "__container__", align: HorizontalAlign.Center },
bottom: { anchor: "__container__", align: VerticalAlign.Center },
})
.id("row001")
}
.commonStyle1()
} else if (this.targetView == 'Row') {
@ -1304,7 +1304,7 @@ struct ResponseRegionPage008 {
right: { anchor: "__container__", align: HorizontalAlign.Center },
bottom: { anchor: "__container__", align: VerticalAlign.Center },
})
.id("row001")
}
.commonStyle2()
} else if (this.targetView == 'Row') {

View File

@ -145,7 +145,6 @@ struct HeightPage001 {
}
@Styles commonStyleEasy(){
// .margin({top:260})
.border({width:2})
.key(this.componentKey)
@ -201,12 +200,12 @@ struct HeightPage001 {
Checkbox({name: 'checkbox1', group: 'checkboxGroup'})
.select(true)
.selectedColor(0xed6f21)
.height(150)
.width(150)
.commonStyleEasy()
} else if (this.targetView == 'CheckboxGroup') {
CheckboxGroup({ group: 'checkboxGroup' })
.selectedColor('#007DFF')
.height(150)
.width(150)
.commonStyleEasy()
} else if (this.targetView == 'DataPanel') {
DataPanel({ values: [50, 12, 8, 5] })
@ -279,6 +278,10 @@ struct HeightPage001 {
.commonStyle()
} else if (this.targetView == 'MenuItemGroup') {
MenuItemGroup({ header: "MenuItemGroup小标题" })
{
MenuItem({ content: "MenuItem1" })
.width(350)
}
.commonStyle()
} else if (this.targetView == 'Navigation') {
Navigation()
@ -544,10 +547,8 @@ struct HeightPage001 {
Text('ListItem')
}
.commonStyle()
.margin({top:0})
}
.width(350)
.height(260)
.border({width:2,color:Color.Yellow})
} else if (this.targetView == 'ListItemGroup') {
List() {
ListItemGroup() {
@ -559,9 +560,9 @@ struct HeightPage001 {
.commonStyle()
.margin({top:0})
}
.width(350)
.height(260)
.border({width:2})
.width(400)
.height(350)
.border({width:2,color:Color.Yellow})
} else if (this.targetView == 'Navigator') {
Navigator({ target: '/pages/BackgroundColorPage' }){
Text('Go to ' + '/pages/BackgroundColorPage')
@ -716,12 +717,12 @@ struct HeightPage001 {
Column().width('30%').height('30%')
}.tabBar(this.TabBuilder(0, 'green'))
.commonStyle()
.margin({top:0})
.border({width:2,color:Color.Green})
TabContent() {
Column().width('40%').height('40%')
}.tabBar(this.TabBuilder(1, 'blue'))
.commonStyle()
.margin({top:0})
.border({width:2,color:Color.Green})
}
.vertical(false)
.barMode(BarMode.Fixed)
@ -731,10 +732,7 @@ struct HeightPage001 {
.onChange((index: number) => {
this.currentIndex = index
})
.width(200)
.height(150)
.margin({ top: 260 })
.border({width:2})
.border({width:2,color:Color.Yellow})
}
else if (this.targetView == 'FlowItem') {
WaterFlow() {
@ -785,7 +783,7 @@ struct HeightPage001 {
.commonStyle()
} else if (this.targetView == 'Circle') {
Circle()
.height(40)
.width(120)
.commonStyleEasy()
} else if (this.targetView == 'Ellipse') {
Ellipse()
@ -828,10 +826,9 @@ struct HeightPage001 {
} else if (this.targetView == 'Rect') {
Rect()
.radius(20)
.height(40)
.width(120)
.stroke(Color.Transparent)
.commonStyleEasy()
.margin({top:50})
} else if (this.targetView == 'Shape') {
Shape() {
Rect().width('80%').height('70%')

View File

@ -546,8 +546,9 @@ struct HeightPage002 {
.commonStyle()
.margin({top:0})
}
.width(350)
.height(260)
.width(400)
.height(350)
.border({width:2,color:Color.Yellow})
} else if (this.targetView == 'ListItemGroup') {
List() {
ListItemGroup() {
@ -559,9 +560,9 @@ struct HeightPage002 {
.commonStyle()
.margin({top:0})
}
.width(350)
.height(260)
.border({width:2})
.width(400)
.height(350)
.border({width:2,color:Color.Yellow})
} else if (this.targetView == 'Navigator') {
Navigator({ target: '/pages/BackgroundColorPage' }){
Text('Go to ' + '/pages/BackgroundColorPage')
@ -717,11 +718,13 @@ struct HeightPage002 {
}.tabBar(this.TabBuilder(0, 'green'))
.commonStyle()
.margin({top:0})
.border({width:2,color:Color.Green})
TabContent() {
Column().width('40%').height('40%')
}.tabBar(this.TabBuilder(1, 'blue'))
.commonStyle()
.margin({top:0})
.border({width:2,color:Color.Green})
}
.vertical(false)
.barMode(BarMode.Fixed)
@ -731,10 +734,10 @@ struct HeightPage002 {
.onChange((index: number) => {
this.currentIndex = index
})
.width(200)
.height(150)
.width(400)
.height(300)
.margin({ top: 260 })
.border({width:2})
.border({width:2,color:Color.Yellow})
}
else if (this.targetView == 'FlowItem') {
WaterFlow() {
@ -785,7 +788,7 @@ struct HeightPage002 {
.commonStyle()
} else if (this.targetView == 'Circle') {
Circle()
.height(40)
.width(120)
.commonStyleEasy()
} else if (this.targetView == 'Ellipse') {
Ellipse()
@ -828,7 +831,7 @@ struct HeightPage002 {
} else if (this.targetView == 'Rect') {
Rect()
.radius(20)
.height(40)
.width(120)
.stroke(Color.Transparent)
.commonStyleEasy()
.margin({top:50})

View File

@ -136,7 +136,6 @@ struct WidthPage002 {
}
@Styles tabStyle(){
// .width(350)
.height(260)
.border({width:2})
@ -480,10 +479,8 @@ struct WidthPage002 {
}.borderWidth(2)
.commonStyle()
.margin({top:0})
}.width(300)
.height(200)
.borderWidth(2)
.margin({top:260})
}
.border({width:2,color:Color.Yellow})
} else if (this.targetView == 'GridRow') {
GridRow() {
GridCol({span:6}) {
@ -546,8 +543,7 @@ struct WidthPage002 {
.commonStyle()
.margin({top:0})
}
.width(350)
.height(260)
.border({width:2,color:Color.Yellow})
} else if (this.targetView == 'ListItemGroup') {
List() {
ListItemGroup() {
@ -559,9 +555,7 @@ struct WidthPage002 {
.commonStyle()
.margin({top:0})
}
.width(350)
.height(260)
.border({width:2})
.border({width:2,color:Color.Yellow})
} else if (this.targetView == 'Navigator') {
Navigator({ target: '/pages/BackgroundColorPage' }){
Text('Go to ' + '/pages/BackgroundColorPage')
@ -717,11 +711,13 @@ struct WidthPage002 {
}.tabBar(this.TabBuilder(0, 'green'))
.commonStyle()
.margin({top:0})
.border({width:2,color:Color.Green})
TabContent() {
Column().width('40%').height('40%')
}.tabBar(this.TabBuilder(1, 'blue'))
.commonStyle()
.margin({top:0})
.border({width:2,color:Color.Green})
}
.vertical(false)
.barMode(BarMode.Fixed)
@ -731,10 +727,7 @@ struct WidthPage002 {
.onChange((index: number) => {
this.currentIndex = index
})
.width(200)
.height(150)
.margin({ top: 260 })
.border({width:2})
.border({width:2,color:Color.Yellow})
}
else if (this.targetView == 'FlowItem') {
WaterFlow() {
@ -785,7 +778,7 @@ struct WidthPage002 {
.commonStyle()
} else if (this.targetView == 'Circle') {
Circle()
.height(40)
.height(120)
.commonStyleEasy()
} else if (this.targetView == 'Ellipse') {
Ellipse()
@ -828,7 +821,7 @@ struct WidthPage002 {
} else if (this.targetView == 'Rect') {
Rect()
.radius(20)
.height(40)
.height(120)
.stroke(Color.Transparent)
.commonStyleEasy()
.margin({top:50})

View File

@ -756,7 +756,7 @@ struct TouchEvent01 {
top: { anchor: "__container__", align: VerticalAlign.Top },
left: { anchor: "__container__", align: HorizontalAlign.Start }
})
.id("row001")
}
.commonStyle()
} else if (this.targetView == 'Row') {

View File

@ -126,8 +126,8 @@ struct VisibilityExample01 {
}
@Styles commonStyle(){
.width(350)
.height(260)
.width(230)
.height(160)
.border({width:2})
.visibility(this._generalAttr)
.key(this.componentKey)