diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-datepicker.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-datepicker.md
index c6405174c194a2e4f0fd89b68ce5a75d6b8b5cae..332676543c8b0a85d795a6ecee41230e44bfa9f3 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-datepicker.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-datepicker.md
@@ -30,12 +30,12 @@ DatePicker(options?: {start?: Date, end?: Date, selected?: Date})
除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性:
-| 名称 | 参数类型 | 描述 |
-| -------------------------------- | ---------------------------------------- | ---------------------------------------- |
-| lunar | boolean | 日期是否显示农历。
- true:展示农历。
- false:不展示农历。
默认值:false |
-| disappearTextStyle10+ | [PickerTextStyle](#pickertextstyle10类型说明) | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。 |
-| textStyle10+ | [PickerTextStyle](#pickertextstyle10类型说明) | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。 |
-| selectedTextStyle10+ | [PickerTextStyle](#pickertextstyle10类型说明) | 设置选中项的文本颜色、字号、字体粗细。 |
+| 名称 | 参数类型 | 描述 |
+| -------------------------------- | --------------------------------------------- | ------------------------------------------------------------ |
+| lunar | boolean | 日期是否显示农历。
- true:展示农历。
- false:不展示农历。
默认值:false |
+| disappearTextStyle10+ | [PickerTextStyle](#pickertextstyle10类型说明) | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} |
+| textStyle10+ | [PickerTextStyle](#pickertextstyle10类型说明) | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} |
+| selectedTextStyle10+ | [PickerTextStyle](#pickertextstyle10类型说明) | 设置选中项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
}
} |
## PickerTextStyle10+类型说明
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-rating.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-rating.md
index 089c0d5798917c17966d61da4487da1cd2bb6a7d..b13dc7ce3ed655f800f5a2443ddca15a1a19b1f4 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-rating.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-rating.md
@@ -28,10 +28,10 @@ Rating(options?: { rating: number, indicator?: boolean })
## 属性
-| 名称 | 参数类型 | 描述 |
-| --------- | ---------------------------------------- | ---------------------------------------- |
-| stars | number | 设置评分总数。
默认值:5
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
设置为小于0的值时,按默认值显示。 |
-| stepSize | number | 操作评级的步长。
默认值:0.5
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
设置为小于0的值时,按默认值显示。
取值范围为[0.1, stars]。 |
+| 名称 | 参数类型 | 描述 |
+| --------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
+| stars | number | 设置评分总数。
默认值:5
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
设置为小于等于0的值时,按默认值显示。 |
+| stepSize | number | 操作评级的步长。
默认值:0.5
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
设置为小于0的值时,按默认值显示。
取值范围为[0.1, stars]。 |
| starStyle | {
backgroundUri: string,
foregroundUri: string,
secondaryUri?: string
} | backgroundUri:未选中的星级的图片链接,可由用户自定义或使用系统默认图片。
foregroundUri:选中的星级的图片路径,可由用户自定义或使用系统默认图片。
secondaryUir:部分选中的星级的图片路径,可由用户自定义或使用系统默认图片。
从API version 9开始,该接口支持在ArkTS卡片中使用。
**说明:**
startStyle属性所支持的图片类型能力参考[Image](ts-basic-components-image.md)组件。
支持加载本地图片和网络图片,暂不支持PixelMap类型和Resource资源。
默认图片加载方式为异步,暂不支持同步加载。
设置值为undefined或者空字符串时,rating会选择加载系统默认星型图源。 |
> **说明:**
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textpicker.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textpicker.md
index 715cce8ba604110c0f608ccb8be9027d4061fb3a..b2241ecddf639514b036bc790945c0a6d90520e5 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textpicker.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textpicker.md
@@ -40,9 +40,9 @@ TextPicker(options?: {range: string[]|Resource|TextPickerRangeContent[], selecte
| 名称 | 参数类型 | 描述 |
| -------- | -------- | -------- |
| defaultPickerItemHeight | number \| string | 设置Picker各选择项的高度。 |
-| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。 |
-| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。 |
-| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置选中项的文本颜色、字号、字体粗细。 |
+| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} |
+| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} |
+| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置选中项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
}
} |
## 事件
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-timepicker.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-timepicker.md
index d472725ac4eaedb592d8fa813d5715b884b1b87a..654535bb907e002000994e20f40550abca2593ba 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-timepicker.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-timepicker.md
@@ -28,12 +28,12 @@ TimePicker(options?: {selected?: Date})
除支持[通用属性](ts-universal-attributes-size.md)外,还支持以下属性:
-| 名称 | 参数类型 | 描述 |
-| -------------------------------- | ---------------------------------------- | ----------------------------------- |
-| useMilitaryTime | boolean | 展示时间是否为24小时制,不支持动态修改。
默认值:false |
-| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。 |
-| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。 |
-| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置选中项的文本颜色、字号、字体粗细。 |
+| 名称 | 参数类型 | 描述 |
+| -------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
+| useMilitaryTime | boolean | 展示时间是否为24小时制。
默认值:false |
+| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} |
+| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} |
+| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 设置选中项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
}
} |
## 事件
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-methods-datepicker-dialog.md b/zh-cn/application-dev/reference/arkui-ts/ts-methods-datepicker-dialog.md
index a66fde6f61c006b1d79be16288cc95a20a6f8b53..8ca789e9fe32e96d252cc97a63afdbd0d44035ff 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-methods-datepicker-dialog.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-methods-datepicker-dialog.md
@@ -15,20 +15,20 @@ show(options?: DatePickerDialogOptions)
**DatePickerDialogOptions参数:**
-| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
-| -------- | -------- | -------- | -------- | -------- |
-| start | Date | 否 | Date('1970-1-1') | 设置选择器的起始日期。 |
-| end | Date | 否 | Date('2100-12-31') | 设置选择器的结束日期。 |
-| selected | Date | 否 | 当前系统日期 | 设置当前选中的日期。 |
-| lunar | boolean | 否 | false | 日期是否显示为农历。 |
-| showTime10+ | boolean | 否 | false | 是否展示时间项。 |
-| useMilitaryTime10+ | boolean | 否 | false | 展示时间是否为24小时制。 |
-| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | - | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。 |
-| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | - | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。 |
-| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | - | 设置选中项的文本颜色、字号、字体粗细。 |
-| onAccept | (value: [DatePickerResult](ts-basic-components-datepicker.md#DatePickerResult对象说明)) => void | 否 | - | 点击弹窗中的“确定”按钮时触发该回调。 |
-| onCancel | () => void | 否 | - | 点击弹窗中的“取消”按钮时触发该回调。 |
-| onChange | (value: [DatePickerResult](ts-basic-components-datepicker.md#DatePickerResult对象说明)) => void | 否 | - | 滑动弹窗中的滑动选择器使当前选中项改变时触发该回调。 |
+| 参数名 | 参数类型 | 必填 | 参数描述 |
+| -------- | -------- | -------- | -------- |
+| start | Date | 否 | 设置选择器的起始日期。
默认值:Date('1970-1-1') |
+| end | Date | 否 | 设置选择器的结束日期。
默认值:Date('2100-12-31') |
+| selected | Date | 否 | 设置当前选中的日期。
默认值:当前系统日期 |
+| lunar | boolean | 否 | 日期是否显示为农历。
默认值:false |
+| showTime10+ | boolean | 否 | 是否展示时间项。
默认值:false |
+| useMilitaryTime10+ | boolean | 否 | 展示时间是否为24小时制。
默认值:false |
+| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} |
+| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} |
+| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置选中项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
}
} |
+| onAccept | (value: [DatePickerResult](ts-basic-components-datepicker.md#DatePickerResult对象说明)) => void | 否 | 点击弹窗中的“确定”按钮时触发该回调。 |
+| onCancel | () => void | 否 | 点击弹窗中的“取消”按钮时触发该回调。 |
+| onChange | (value: [DatePickerResult](ts-basic-components-datepicker.md#DatePickerResult对象说明)) => void | 否 | 滑动弹窗中的滑动选择器使当前选中项改变时触发该回调。 |
## 示例
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-methods-textpicker-dialog.md b/zh-cn/application-dev/reference/arkui-ts/ts-methods-textpicker-dialog.md
index ca3c603f5d97d095c9d13f2970065f26e9698148..80fd20ab7be1278a0a798568d5c6594e0fb75fc4 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-methods-textpicker-dialog.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-methods-textpicker-dialog.md
@@ -21,9 +21,9 @@ show(options?: TextPickerDialogOptions)
| selected | number | 否 | 设置选中项的索引值。
默认值:0 |
| value | string | 否 | 设置选中项的文本内容。当设置了selected参数时,该参数不生效。如果设置的value值不在range范围内,则默认取range第一个元素。|
| defaultPickerItemHeight | number \| string | 否 | 设置选择器中选项的高度。 |
-| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。 |
-| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。 |
-| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置选中项的文本颜色、字号、字体粗细。 |
+| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} |
+| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} |
+| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置选中项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
}
} |
| onAccept | (value: [TextPickerResult](#textpickerresult对象说明)) => void | 否 | 点击弹窗中的“确定”按钮时触发该回调。 |
| onCancel | () => void | 否 | 点击弹窗中的“取消”按钮时触发该回调。 |
| onChange | (value: [TextPickerResult](#textpickerresult对象说明)) => void | 否 | 滑动弹窗中的选择器使当前选中项改变时触发该回调。 |
@@ -42,7 +42,7 @@ show(options?: TextPickerDialogOptions)
@Entry
@Component
struct TextPickerDialogExample {
- @State select: number[] = [2]
+ @State select: number = 2
private fruits: string[] = ['apple1', 'orange2', 'peach3', 'grape4', 'banana5']
build() {
@@ -53,10 +53,10 @@ struct TextPickerDialogExample {
.onClick(() => {
TextPickerDialog.show({
range: this.fruits,
- selected: this.select[0],
+ selected: this.select,
onAccept: (value: TextPickerResult) => {
// 设置select为按下确定按钮时候的选中项index,这样当弹窗再次弹出时显示选中的是上一次确定的选项
- this.select[0] = value.index
+ this.select = value.index
console.info("TextPickerDialog:onAccept()" + JSON.stringify(value))
},
onCancel: () => {
diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-methods-timepicker-dialog.md b/zh-cn/application-dev/reference/arkui-ts/ts-methods-timepicker-dialog.md
index 628115d10e8adb9b778534a029e329b43f8272b9..5c4fede524c07beaa9ca3d558ad1f58398a1a25e 100644
--- a/zh-cn/application-dev/reference/arkui-ts/ts-methods-timepicker-dialog.md
+++ b/zh-cn/application-dev/reference/arkui-ts/ts-methods-timepicker-dialog.md
@@ -19,9 +19,9 @@ show(options?: TimePickerDialogOptions)
| -------- | -------- | -------- | -------- |
| selected | Date | 否 | 设置当前选中的时间。
默认值:当前系统时间 |
| useMilitaryTime | boolean | 否 | 展示时间是否为24小时制,默认为12小时制。
默认值:false |
-| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。 |
-| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。 |
-| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置选中项的文本颜色、字号、字体粗细。 |
+| disappearTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中最上和最下两个选项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} |
+| textStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置所有选项中除了最上、最下及选中项以外的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} |
+| selectedTextStyle10+ | [PickerTextStyle](ts-basic-components-datepicker.md#pickertextstyle10类型说明) | 否 | 设置选中项的文本颜色、字号、字体粗细。
默认值:
{
corlor: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
}
} |
| onAccept | (value: [TimePickerResult](ts-basic-components-timepicker.md#TimePickerResult对象说明)) => void | 否 | 点击弹窗中的“确定”按钮时触发该回调。 |
| onCancel | () => void | 否 | 点击弹窗中的“取消”按钮时触发该回调。 |
| onChange | (value: [TimePickerResult](ts-basic-components-timepicker.md#TimePickerResult对象说明)) => void | 否 | 滑动弹窗中的选择器使当前选中时间改变时触发该回调。 |
@@ -78,4 +78,4 @@ struct TimePickerDialogExample {
}
```
-
\ No newline at end of file
+