Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
3588dec6
D
Docs
项目概览
OpenHarmony
/
Docs
大约 2 年 前同步成功
通知
161
Star
293
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
3588dec6
编写于
6月 26, 2023
作者:
O
openharmony_ci
提交者:
Gitee
6月 26, 2023
浏览文件
操作
浏览文件
下载
差异文件
!19850 List Grid文档代码修改
Merge pull request !19850 from yeyinglong/scroll
上级
df051978
7856d47e
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
8 addition
and
51 deletion
+8
-51
zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_1501929990650.jpg
.../reference/arkui-ts/figures/zh-cn_image_1501929990650.jpg
+0
-0
zh-cn/application-dev/reference/arkui-ts/ts-container-grid.md
...n/application-dev/reference/arkui-ts/ts-container-grid.md
+1
-0
zh-cn/application-dev/reference/arkui-ts/ts-container-list.md
...n/application-dev/reference/arkui-ts/ts-container-list.md
+5
-2
zh-cn/application-dev/reference/arkui-ts/ts-container-listitem.md
...plication-dev/reference/arkui-ts/ts-container-listitem.md
+1
-48
zh-cn/application-dev/reference/arkui-ts/ts-container-listitemgroup.md
...tion-dev/reference/arkui-ts/ts-container-listitemgroup.md
+1
-1
未找到文件。
zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_1501929990650.jpg
已删除
100644 → 0
浏览文件 @
df051978
22.4 KB
zh-cn/application-dev/reference/arkui-ts/ts-container-grid.md
浏览文件 @
3588dec6
...
@@ -200,6 +200,7 @@ struct GridExample {
...
@@ -200,6 +200,7 @@ struct GridExample {
.
width
(
'
90%
'
)
.
width
(
'
90%
'
)
.
backgroundColor
(
0xFAEEE0
)
.
backgroundColor
(
0xFAEEE0
)
.
height
(
300
)
.
height
(
300
)
.
scrollBar
(
BarState
.
Off
)
Button
(
'
next page
'
)
Button
(
'
next page
'
)
.
onClick
(()
=>
{
// 点击后滑到下一页
.
onClick
(()
=>
{
// 点击后滑到下一页
this
.
scroller
.
scrollPage
({
next
:
true
})
this
.
scroller
.
scrollPage
({
next
:
true
})
...
...
zh-cn/application-dev/reference/arkui-ts/ts-container-list.md
浏览文件 @
3588dec6
...
@@ -41,8 +41,8 @@ List(value?:{space?: number | string, initialIndex?: number, scroller?
...
@@ -41,8 +41,8 @@ List(value?:{space?: number | string, initialIndex?: number, scroller?
| 参数名 | 参数类型 | 必填 | 参数描述 |
| 参数名 | 参数类型 | 必填 | 参数描述 |
| ------------ | ---------------------------------------- | ---- | ---------------------------------------- |
| ------------ | ---------------------------------------- | ---- | ---------------------------------------- |
| space | number
\|
string | 否 | 子组件主轴方向的间隔。
<br/>
默认值:0
<br/>
**说明:**
<br/>
设置为
除-1外其他负数或百分比
时,按默认值显示。
<br/>
space参数值小于List分割线宽度时,子组件主轴方向的间隔取分割线宽度。 |
| space | number
\|
string | 否 | 子组件主轴方向的间隔。
<br/>
默认值:0
<br/>
**说明:**
<br/>
设置为
负数
时,按默认值显示。
<br/>
space参数值小于List分割线宽度时,子组件主轴方向的间隔取分割线宽度。 |
| initialIndex | number | 否 | 设置当前List初次加载时视口起始位置显示的item的索引值。
<br/>
默认值:0
<br/>
**说明:**
<br/>
设置为
除-1外其他
负数或超过了当前List最后一个item的索引值时视为无效取值,无效取值按默认值显示。 |
| initialIndex | number | 否 | 设置当前List初次加载时视口起始位置显示的item的索引值。
<br/>
默认值:0
<br/>
**说明:**
<br/>
设置为负数或超过了当前List最后一个item的索引值时视为无效取值,无效取值按默认值显示。 |
| scroller |
[
Scroller
](
ts-container-scroll.md#scroller
)
| 否 | 可滚动组件的控制器。用于与可滚动组件进行绑定。
<br/>
**说明:**
<br/>
不允许和其他滚动类组件绑定同一个滚动控制对象。 |
| scroller |
[
Scroller
](
ts-container-scroll.md#scroller
)
| 否 | 可滚动组件的控制器。用于与可滚动组件进行绑定。
<br/>
**说明:**
<br/>
不允许和其他滚动类组件绑定同一个滚动控制对象。 |
## 属性
## 属性
...
@@ -181,6 +181,7 @@ struct ListExample {
...
@@ -181,6 +181,7 @@ struct ListExample {
},
item
=>
item
)
},
item
=>
item
)
}
}
.
listDirection
(
Axis
.
Vertical
)
// 排列方向
.
listDirection
(
Axis
.
Vertical
)
// 排列方向
.
scrollBar
(
BarState
.
Off
)
.
divider
({
strokeWidth
:
2
,
color
:
0xFFFFFF
,
startMargin
:
20
,
endMargin
:
20
})
// 每行之间的分界线
.
divider
({
strokeWidth
:
2
,
color
:
0xFFFFFF
,
startMargin
:
20
,
endMargin
:
20
})
// 每行之间的分界线
.
edgeEffect
(
EdgeEffect
.
Spring
)
// 滑动到边缘无效果
.
edgeEffect
(
EdgeEffect
.
Spring
)
// 滑动到边缘无效果
.
onScrollIndex
((
firstIndex
:
number
,
lastIndex
:
number
)
=>
{
.
onScrollIndex
((
firstIndex
:
number
,
lastIndex
:
number
)
=>
{
...
@@ -231,6 +232,7 @@ struct ListLanesExample {
...
@@ -231,6 +232,7 @@ struct ListLanesExample {
.
border
({
width
:
3
,
color
:
Color
.
Red
})
.
border
({
width
:
3
,
color
:
Color
.
Red
})
.
lanes
({
minLength
:
40
,
maxLength
:
40
})
.
lanes
({
minLength
:
40
,
maxLength
:
40
})
.
alignListItem
(
this
.
alignListItem
)
.
alignListItem
(
this
.
alignListItem
)
.
scrollBar
(
BarState
.
Off
)
Button
(
"
点击更改alignListItem:
"
+
this
.
alignListItem
).
onClick
(()
=>
{
Button
(
"
点击更改alignListItem:
"
+
this
.
alignListItem
).
onClick
(()
=>
{
if
(
this
.
alignListItem
==
ListItemAlign
.
Start
)
{
if
(
this
.
alignListItem
==
ListItemAlign
.
Start
)
{
...
@@ -289,6 +291,7 @@ struct ListExample{
...
@@ -289,6 +291,7 @@ struct ListExample{
}
}
},
item
=>
item
)
},
item
=>
item
)
}.
width
(
'
90%
'
)
}.
width
(
'
90%
'
)
.
scrollBar
(
BarState
.
Off
)
}.
width
(
'
100%
'
)
}.
width
(
'
100%
'
)
Button
(
'
edit list
'
)
Button
(
'
edit list
'
)
...
...
zh-cn/application-dev/reference/arkui-ts/ts-container-listitem.md
浏览文件 @
3588dec6
...
@@ -118,6 +118,7 @@ struct ListItemExample {
...
@@ -118,6 +118,7 @@ struct ListItemExample {
}
}
},
item
=>
item
)
},
item
=>
item
)
}.
width
(
'
90%
'
)
}.
width
(
'
90%
'
)
.
scrollBar
(
BarState
.
Off
)
}.
width
(
'
100%
'
).
height
(
'
100%
'
).
backgroundColor
(
0xDCDCDC
).
padding
({
top
:
5
})
}.
width
(
'
100%
'
).
height
(
'
100%
'
).
backgroundColor
(
0xDCDCDC
).
padding
({
top
:
5
})
}
}
}
}
...
@@ -125,54 +126,6 @@ struct ListItemExample {
...
@@ -125,54 +126,6 @@ struct ListItemExample {


```
ts
// xxx.ets
@
Entry
@
Component
struct
ListItemExample2
{
@
State
message
:
string
=
'
Hello World
'
@
Builder
itemEnd
()
{
Row
()
{
Button
(
"
Del
"
).
margin
(
"
4vp
"
)
Button
(
"
Set
"
).
margin
(
"
4vp
"
)
}.
padding
(
"
4vp
"
).
justifyContent
(
FlexAlign
.
SpaceEvenly
)
}
build
()
{
Column
()
{
List
({
space
:
10
})
{
ListItem
()
{
Text
(
this
.
message
)
.
width
(
'
100%
'
)
.
height
(
100
)
.
fontSize
(
16
)
.
textAlign
(
TextAlign
.
Center
)
.
borderRadius
(
10
)
.
backgroundColor
(
0xFFFFFF
)
}
.
swipeAction
({
end
:
this
.
itemEnd
})
ListItem
()
{
Text
(
this
.
message
)
.
width
(
'
100%
'
)
.
height
(
100
)
.
fontSize
(
16
)
.
textAlign
(
TextAlign
.
Center
)
.
borderRadius
(
10
)
.
backgroundColor
(
0xFFFFFF
)
}
.
swipeAction
({
start
:
this
.
itemEnd
})
}
}
.
padding
(
10
)
.
backgroundColor
(
0xDCDCDC
)
.
width
(
'
100%
'
)
.
height
(
'
100%
'
)
}
}
```

```
ts
```
ts
// xxx.ets
// xxx.ets
...
...
zh-cn/application-dev/reference/arkui-ts/ts-container-listitemgroup.md
浏览文件 @
3588dec6
...
@@ -107,12 +107,12 @@ struct ListItemGroupExample {
...
@@ -107,12 +107,12 @@ struct ListItemGroupExample {
}
}
},
item
=>
item
)
},
item
=>
item
)
}
}
.
borderRadius
(
20
)
.
divider
({
strokeWidth
:
1
,
color
:
Color
.
Blue
})
// 每行之间的分界线
.
divider
({
strokeWidth
:
1
,
color
:
Color
.
Blue
})
// 每行之间的分界线
})
})
}
}
.
width
(
'
90%
'
)
.
width
(
'
90%
'
)
.
sticky
(
StickyStyle
.
Header
|
StickyStyle
.
Footer
)
.
sticky
(
StickyStyle
.
Header
|
StickyStyle
.
Footer
)
.
scrollBar
(
BarState
.
Off
)
}.
width
(
'
100%
'
).
height
(
'
100%
'
).
backgroundColor
(
0xDCDCDC
).
padding
({
top
:
5
})
}.
width
(
'
100%
'
).
height
(
'
100%
'
).
backgroundColor
(
0xDCDCDC
).
padding
({
top
:
5
})
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录