未验证 提交 00c093be 编写于 作者: O openharmony_ci 提交者: Gitee

!1959 自动化测试问题修改

Merge pull request !1959 from LiAn/master
......@@ -48,8 +48,10 @@ PageA跳转到PageB,跳转的共享元素为image, shareid为“shareImage
<div>
<list>
<list-item type="description">
<image src="item.jpg" shareid="shareImage" onclick="jump" class="shared-transition-style"></image>
<text onclick="jump">Click on picture to Jump to ths details</text>
<div>
<image src="item.jpg" shareid="shareImage" onclick="jump" class="shared-transition-style"></image>
<text onclick="jump">Click on picture to Jump to ths details</text>
</div>
</list-item>
</list>
</div>
......
......@@ -97,7 +97,6 @@
- [Swiper](ts-container-swiper.md)
- [Tabs](ts-container-tabs.md)
- [TabContent](ts-container-tabcontent.md)
- [SideBarContainer](ts-container-sidebarcontainer.md)
- [Refresh](ts-container-refresh.md)
- 媒体组件
- [Video](ts-media-components-video.md)
......
......@@ -42,7 +42,7 @@ Checkbox( name?: string, group?: string )
## 示例
```
@Entry
@Entry
@Component
struct CheckboxExample {
......
......@@ -53,17 +53,16 @@ RichText\(content:string\)
@Entry
@Component
struct RichTextExample {
@State data: string = '<h1 style='text-align: center;'>h1标题</h1>
<h1 style='text-align: center;'><i>h1斜体</i></h1>
<h1 style='text-align: center;'><u>h1下划线</u></h1>
<h2 style='text-align: center;'>h2标题</h2>
<h3 style='text-align: center;'>h3标题</h3>
<p style='text-align: center;'>p常规</p><hr/>
<div style='width: 500px;height: 500px;border: 1px solid;margin: 0auto;'>
<p style='font-size: 35px;text-align: center;font-weight: bold; color: rgb(24,78,228)'>字体大小35px,行高45px</p>
<p style='background-color: #e5e5e5;line-height: 45px;font-size: 35px;text-indent: 2em;'>
这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字
这是一段文字</p></div>'
@State data: string = "<h1 style='text-align: center;'>h1标题</h1>" +
"<h1 style='text-align: center;'><i>h1斜体</i></h1>" +
"<h1 style='text-align: center;'><u>h1下划线</u></h1>" +
"<h2 style='text-align: center;'>h2标题</h2>" +
"<h3 style='text-align: center;'>h3标题</h3>" +
"<p style='text-align: center;'>p常规</p><hr/>" +
"<div style='width: 500px;height: 500px;border: 1px solid;margin: 0auto;'>" +
"<p style='font-size: 35px;text-align: center;font-weight: bold; color: rgb(24,78,228)'>字体大小35px,行高45px</p>" +
"<p style='background-color: #e5e5e5;line-height: 45px;font-size: 35px;text-indent: 2em;'>" +
"<p>这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字这是一段文字</p>"
build() {
Flex({direction: FlexDirection.Column,alignItems: ItemAlign.Center,
......
......@@ -34,7 +34,7 @@
@Component
struct ImageEffectsExample {
build() {
Column({space10}) {
Column({space: 10}) {
// 对字体进行模糊
Text('font blur').fontSize(15).fontColor(0xCCCCCC).width('90%')
Text('text').blur(3).width('90%').height(40)
......
......@@ -19,7 +19,7 @@
| size | {<br/>width?:&nbsp;Length,<br/>height?:&nbsp;Length<br/>} | - | 设置高宽尺寸。 |
| padding | {<br/>top?:&nbsp;Length,<br/>right?:&nbsp;Length,<br/>bottom?:&nbsp;Length,<br/>left?:&nbsp;Length<br/>}&nbsp;\|&nbsp;Length | 0 | 设置内边距属性。<br/>参数为Length类型时,四个方向内边距同时生效。 |
| margin | {<br/>top?:&nbsp;Length,<br/>right?:&nbsp;Length,<br/>bottom?:&nbsp;Length,<br/>left?:&nbsp;Length<br/>}<br/>\|&nbsp;Length | 0 | 设置外边距属性。<br/>参数为Length类型时,四个方向外边距同时生效。 |
| constraintSize | {<br/>minWidth?:&nbsp;Length,<br/>maxWidth?:&nbsp;Length,<br/>minHeight?:&nbsp;Length,<br/>maxHeight?:&nbsp;Lenght<br/>} | {<br/>minWidth:&nbsp;0,<br/>maxWidth:&nbsp;Infinity,<br/>minHeight:&nbsp;0,<br/>maxHeight:&nbsp;Infinity<br/>} | 设置约束尺寸,组件布局时,进行尺寸范围限制。 |
| constraintSize | {<br/>minWidth?:&nbsp;Length,<br/>maxWidth?:&nbsp;Length,<br/>minHeight?:&nbsp;Length,<br/>maxHeight?:&nbsp;Length<br/>} | {<br/>minWidth:&nbsp;0,<br/>maxWidth:&nbsp;Infinity,<br/>minHeight:&nbsp;0,<br/>maxHeight:&nbsp;Infinity<br/>} | 设置约束尺寸,组件布局时,进行尺寸范围限制。 |
| layoutWeight | number | 0 | 容器尺寸确定时,元素与兄弟节点主轴布局尺寸按照权重进行分配,忽略本身尺寸设置。<br/>>&nbsp;![icon-note.gif](public_sys-resources/icon-note.gif)&nbsp;**说明:**<br/>>&nbsp;仅在Row/Column/Flex布局中生效。 |
......@@ -29,7 +29,6 @@
@Entry
@Component
struct SizeExample {
@StateitemWidth : number = 0 @StateitemHeight : number = 0
build() {
Column({ space: 10 }) {
Text('margin and padding:').fontSize(12).fontColor(0xCCCCCC).width('90%')
......@@ -55,10 +54,8 @@ struct SizeExample {
Text('no layoutWeight')
.size({ width: '30%', height: 110 }).backgroundColor(0xD2B48C).textAlign(TextAlign.Center)
}.size({ width: '90%', height: 140 }).backgroundColor(0xAFEEEE)
List() { ListItem() { Image('/resources/rawfile/seaman.png') .alt('/resources/rawfile/seaman2.png') .objectFit(ImageFit.Fill) .padding('100vp') .margin('40vp') .opacity(0.5) .measure('image_1') // 获取id=image_1的Image组件尺寸信息 } .onMeasure((Array<MeasureRuler> ruler) => { // 在布局之前回调,返回已测量的子组件尺寸信息 console.log(ruler[0].id, ruler[0].screenX, ruler[0].screenY, ruler[0].offsetX, ruler[0].offsetY, ruler[0].width, ruler[0].height) this.itemWidth = ruler[0].width this.itemHeight = ruler[0].height }) .width(this.itemWidth) .height(this.itemHeight) }
}.width('100%').margin({ top: 5 })
}
}
}}
```
![zh-cn_image_0000001174264384](figures/zh-cn_image_0000001174264384.gif)
......@@ -25,12 +25,12 @@
| target<sup>8+</sup> | EventTarget | 被点击元素对象。 |
| timestamp | number | 事件时间戳。 |
- EventTarget对象说明<sup>8+</sup>
- EventTarget<sup>8+</sup>对象说明
| 名称 | 参数类型 | 描述 |
| -------- | -------- | -------- |
| area | Area | 目标元素的区域信息。 |
- Area对象说明<sup>8+</sup>
- Area<sup>8+</sup>对象说明
| 属性名称 | 类型 | 描述 |
| -------- | -------- | -------- |
| width | number | 目标元素的宽度,单位为vp。 |
......@@ -38,7 +38,7 @@
| pos | Position | 目标元素左上角相对父元素左上角的位置。 |
| globalPos | Position | 目标元素左上角相对页面左上角的位置。 |
- Position对象说明<sup>8+</sup>
- Position<sup>8+</sup>对象说明
| 属性名称 | 参数类型 | 描述 |
| -------- | -------- | -------- |
| x | number | x轴坐标,单位为vp。 |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册