diff --git a/zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_000000111864201.gif b/zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_000000111864201.gif new file mode 100644 index 0000000000000000000000000000000000000000..24702d37d233b9f10a83e4e36b8c8ff23393014f Binary files /dev/null and b/zh-cn/application-dev/reference/arkui-ts/figures/zh-cn_image_000000111864201.gif differ diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-loadingprogress.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-loadingprogress.md index c0b5ffe4c0de075b6c081c20d378a916a0c95c04..f19b51abb7c46a99556e712154823b4584553b2e 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-loadingprogress.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-loadingprogress.md @@ -47,4 +47,4 @@ struct LoadingProgressExample { } ``` -![zh-cn_image_0000001198839004](figures/loadingProgress.png) +![zh-cn_image_000000111864201](figures/zh-cn_image_000000111864201.gif) diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-marquee.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-marquee.md index 4ca2c0fcc88d75cc1dc6b40d6bc3c2a5b2d4aef4..88fb2c94bdba399fc29831c0c363c319345a9336 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-marquee.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-marquee.md @@ -32,6 +32,12 @@ Marquee(value: { start: boolean, step?: number, loop?: number, fromStart?: boole | fromStart | boolean | 否 | true | 设置文本从头开始滚动或反向滚动。 | | src | string | 是 | - | 需要滚动的文本。 | +## 属性 + +| 名称 | 参数类型 | 默认值 | 描述 | +| ---------- | -------- | ------ | ------------------ | +| allowScale | boolean | false | 是否允许文本缩放。 | + ## 事件 | 名称 | 功能描述 | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-navigation.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-navigation.md index d2478d5c598daadc3cf85afd41a4c866d3698f9b..037c063d2da5df9fda5aa055909b8236f3d58c87 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-navigation.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-navigation.md @@ -32,7 +32,7 @@ Navigation() | subtitle | string | - | 页面副标题。 | | menus | Array8+ | - | 页面右上角菜单。 | | titleMode | NavigationTitleMode | NavigationTitleMode.Free | 页面标题栏显示模式。 | -| toolBar | {
items:Array<Object> }
\| [CustomBuilder](ts-types.md#custombuilder8)8+ | - | 设置工具栏内容。
items: 工具栏所有项。 | +| toolBar | object \| [CustomBuilder](ts-types.md#custombuilder8)8+ | - | 设置工具栏内容。
items: 工具栏所有项。 | | hideToolBar | boolean | false | 设置隐藏/显示工具栏:
true: 隐藏工具栏。
false: 显示工具栏。 | | hideTitleBar | boolean | false | 隐藏标题栏。 | | hideBackButton | boolean | false | 隐藏返回键。 | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-progress.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-progress.md index c0947c870208178884c7e23bef3d211119ed457c..8fde4a5bdc1a42f1015107d45f470cfa9cf028a5 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-progress.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-progress.md @@ -19,17 +19,18 @@ ## 接口 -Progress(options: {value: number, total?: number, type?: ProgressType}) +Progress(options: {value: number, total?: number, style?: ProgressStyle, type?: ProgressType}) 创建进度组件,用于显示内容加载或操作处理进度。 **参数:** -| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | -| ----- | ------------ | ---- | ------------------- | -------- | -| value | number | 是 | - | 指定当前进度值。 | -| total | number | 否 | 100 | 指定进度总长。 | -| type | ProgressType | 否 | ProgressType.Linear | 指定进度条样式。 | +| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | +| -------------------------- | ------------- | ---- | -------------------- | --------------------------------------------------- | +| value | number | 是 | - | 指定当前进度值。 | +| total | number | 否 | 100 | 指定进度总长。 | +| type8+ | ProgressType | 否 | ProgressType.Linear | 指定进度条类型。 | +| styledeprecated | ProgressStyle | 否 | ProgressStyle.Linear | 指定进度条样式。
该参数从API Version8开始废弃。 | ## ProgressType枚举说明 @@ -47,7 +48,7 @@ Progress(options: {value: number, total?: number, type?: ProgressType}) | ------------------ | ------------------------------------------------------------ | ------ | ------------------------------------------------------------ | | value | number | - | 设置当前进度值。 | | color | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置进度条前景色。 | -| style8+ | {
strokeWidth?: Length,
scaleCount?: number,
scaleWidth?: Length
} | - | 定义组件的样式。
strokeWidth: 设置进度条宽度。
scaleCount: 设置环形进度条总刻度数。
scaleWidth: 设置环形进度条刻度粗细。
刻度粗细大于进度条宽度时,刻度粗细为系统默认粗细。 | +| style8+ | {
strokeWidth?: [Length](ts-types.md#length),
scaleCount?: number,
scaleWidth?: [Length](ts-types.md#length)
} | - | 定义组件的样式。
strokeWidth: 设置进度条宽度。
scaleCount: 设置环形进度条总刻度数。
scaleWidth: 设置环形进度条刻度粗细。
刻度粗细大于进度条宽度时,刻度粗细为系统默认粗细。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-qrcode.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-qrcode.md index 7671f705990e8e9473be32b141bb07beb8c040e0..51121a42b6b6f79268bdd3829617c73d85637a64 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-qrcode.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-qrcode.md @@ -29,9 +29,10 @@ QRCode(value: string) ## 属性 -| 名称 | 参数类型 | 默认值 | 描述 | -| ----- | ----- | ----- | -------- | -| color | [ResourceColor](ts-types.md#resourcecolor8) | Black | 设置二维码颜色。 | +| 名称 | 参数类型 | 默认值 | 描述 | +| --------------- | ------------------------------------------- | ------ | ---------------------- | +| color | [ResourceColor](ts-types.md#resourcecolor8) | Black | 设置二维码颜色。 | +| backgroundColor | [ResourceColor](ts-types.md#resourcecolor8) | White | 设置二维码的背景颜色。 | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-slider.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-slider.md index ffc60da4276ad5f7686d0175ebf69934cdbcb0cb..7bc7c8ed33ffcb4dc33fdef88455af625dfb33c6 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-slider.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-slider.md @@ -19,7 +19,7 @@ ## 接口 -Slider(options:{value?: number, min?: number, max?: number, step?: number, style?: SliderStyle, direction?: Axis, reverse?: boolean}) +Slider(options?:{value?: number, min?: number, max?: number, step?: number, style?: SliderStyle, direction?: Axis, reverse?: boolean}) **参数:** @@ -52,6 +52,8 @@ Slider(options:{value?: number, min?: number, max?: number, step?: number, style | showSteps | boolean | false | 设置当前是否显示步长刻度值。 | | showTips | boolean | false | 设置滑动时是否显示气泡提示百分比。 | | trackThickness | [Length](ts-types.md#length) | - | 设置滑轨的粗细。 | +| maxLabel | string | - | 设置最大标号时使用。 | +| minLabel | string | - | 设置最小标号时使用。 | ## 事件 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md index e9622fb146a2479e8bcf225fd394d55d9fac2827..07f253b0b2fb15b3b8f53d5d868ec7b0efc9be28 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-span.md @@ -19,13 +19,13 @@ ## 接口 -Span(content: ResourceStr) +Span(value: string | Resource) **参数:** -| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | -| ------- | ------ | ---- | ---- | ----- | -| content | [ResourceStr](ts-types.md#resourcestr8) | 是 | - | 文本内容。 | +| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | +| ------- | ------------------ | ---- | ------ | ---------- | +| content | string \| Resource | 是 | - | 文本内容。 | ## 属性 @@ -34,7 +34,7 @@ Span(content: ResourceStr) | 名称 | 参数类型 | 默认值 | 描述 | | ---------- | ---------------------------------------- | ---------------------------------------- | -------------- | | decoration | {
type: [TextDecorationType](ts-appendix-enums.md#textdecorationtype枚举说明),
color?: [ResourceColor](ts-types.md#resourcecolor8)
} | {
type: TextDecorationType.None
color:Color.Black
} | 设置文本装饰线样式及其颜色。 | -| letterSpacing | [Length](ts-types.md#length) | - | 设置文本字符间距。 | +| letterSpacing | number \| string | - | 设置文本字符间距。 | | textCase | [TextCase](ts-appendix-enums.md#textcase枚举说明) | Normal | 设置文本大小写。 | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md index dd5a76bfaec12a36d0008512432ba5bd132be6d7..f8dc80acbd6ee51f41dd24653c1beeeb1aaaa07d 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-text.md @@ -19,13 +19,13 @@ ## 接口 -Text(content?: ResourceStr) +Text(content?: string | Resource) **参数:** -| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | -| ------- | ------ | ---- | ---- | ---------------------------------------- | -| content | [ResourceStr](ts-types.md#resourcestr8) | 否 | '' | 文本内容。包含子组件Span时不生效,显示Span内容,并且此时text组件的样式不生效。 | +| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | +| ------- | ------------------ | ---- | ------ | ------------------------------------------------------------ | +| content | string \| Resource | 否 | '' | 文本内容。包含子组件Span时不生效,显示Span内容,并且此时text组件的样式不生效。 | ## 属性 @@ -36,8 +36,8 @@ Text(content?: ResourceStr) | maxLines | number | Infinity | 设置文本的最大行数。 | | lineHeight | string \| number \| [Resource](ts-types.md#resource) | - | 设置文本的文本行高,设置值不大于0时,不限制文本行高,自适应字体大小,Length为number类型时单位为fp。 | | decoration | {
type: [TextDecorationType](ts-appendix-enums.md#textdecorationtype),
color?: [ResourceColor](ts-types.md#resourcecolor8)
} | {
type: TextDecorationType.None,
color:Color.Black
} | 设置文本装饰线样式及其颜色。 | -| baselineOffset | [Length](ts-types.md#length) | - | 设置文本基线的偏移量。 | -| letterSpacing | [Length](ts-types.md#length) | - | 设置文本字符间距。 | +| baselineOffset | number \| string | - | 设置文本基线的偏移量。 | +| letterSpacing | number \| string | - | 设置文本字符间距。 | | minFontSize | number \| string \| [Resource](ts-types.md#resource) | - | 设置文本最小显示字号。 | | maxFontSize | number \| string \| [Resource](ts-types.md#resource) | - | 设置文本最大显示字号。 | | textCase | [TextCase](ts-appendix-enums.md#textcase) | TextCase.Normal | 设置文本大小写。 | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md index 3d592169c74fbe68436a04923d6740c9b4163190..6e3b78cf19a4dc2883bba20da0b8d152eb37b370 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textarea.md @@ -36,7 +36,7 @@ TextArea(value?:{placeholder?: ResourceStr, text?: ResourceStr, controller?: Tex | 名称 | 参数类型 | 默认值 | 描述 | | ------------------------ | ------------------------------------------------------------ | ------ | ------------------------------------------------------------ | | placeholderColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置placeholder文本颜色。 | -| placeholderFont | {
size?: number,
weight?:number \| [FontWeight](ts-universal-attributes-text-style.md),
family?: string,
style?: [FontStyle](ts-universal-attributes-text-style.md)
} | - | 设置placeholder文本样式:
- size: 设置文本尺寸,Length为number类型时,使用fp单位。
- weight: 设置文本的字体粗细,number类型取值[100, 900],取值间隔为100,默认为400,取值越大,字体越粗。
- family: 设置文本的字体列表。使用多个字体,使用','进行分割,优先级按顺序生效,例如:'Arial, sans-serif'。
- style: 设置文本的字体样式。 | +| placeholderFont | [Font](ts-types.md#font) | - | 设置placeholder文本样式:
- size: 设置文本尺寸,Length为number类型时,使用fp单位。
- weight: 设置文本的字体粗细,number类型取值[100, 900],取值间隔为100,默认为400,取值越大,字体越粗。
- family: 设置文本的字体列表。使用多个字体,使用','进行分割,优先级按顺序生效,例如:'Arial, sans-serif'。
- style: 设置文本的字体样式。 | | textAlign | [TextAlign](ts-appendix-enums.md#textalign) | Start | 设置文本水平对齐方式。 | | caretColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置输入框光标颜色。 | | inputFilter8+ | {
value: [ResourceStr](ts-types.md#resourcestr8)8+,
error?: (value: string) => void
} | - | 通过正则表达式设置输入过滤器。满足表达式的输入允许显示,不满足的输入被忽略。仅支持单个字符匹配,不支持字符串匹配。例如:^(?=.\*\d)(?=.\*[a-z])(?=.\*[A-Z]).{8,10}$,不支持过滤8到10位的强密码。
- value:设置正则表达式。
- error:正则匹配失败时,返回被忽略的内容。 | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textinput.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textinput.md index df999bed501868d5529e6e625be09bbbb173ba50..d94f69a697b4939ce4e1a466c2b5e7ded2df9fb8 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textinput.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-textinput.md @@ -19,7 +19,7 @@ ## 接口 -TextInput(value?:{placeholder?: ResourceStr, text?: ResourceStr, controller?: TextInputController}) +TextInput(value?:{placeholder?: [ResourceStr](ts-types.md#resourcestr8), text?: [ResourceStr](ts-types.md#resourcestr8), controller?: TextInputController}) **参数:** @@ -37,7 +37,7 @@ TextInput(value?:{placeholder?: ResourceStr, text?: ResourceStr, controller?: Te | ----------------------------- | ------------------------------------------------------------ | ----------------- | ------------------------------------------------------------ | | type | InputType | InputType.Normal | 设置输入框类型。 | | placeholderColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置placeholder颜色。 | -| placeholderFont | {
size?: Length,
weight?: number\|[FontWeight](ts-universal-attributes-text-style.md),
family?: string,
style?: [FontStyle](ts-universal-attributes-text-style.md)
} | - | 设置placeholder文本样式:
- size: 设置文本尺寸,Length为number类型时,使用fp单位。
- weight: 设置文本的字体粗细,number类型取值[100, 900],取值间隔为100,默认为400,取值越大,字体越粗。
- family: 设置文本的字体列表。使用多个字体,使用','进行分割,优先级按顺序生效。例如:'Arial, sans-serif'。
- style: 设置文本的字体样式。 | +| placeholderFont | [Font](ts-types.md#font) | - | 设置placeholder文本样式:
- size: 设置文本尺寸,Length为number类型时,使用fp单位。
- weight: 设置文本的字体粗细,number类型取值[100, 900],取值间隔为100,默认为400,取值越大,字体越粗。
- family: 设置文本的字体列表。使用多个字体,使用','进行分割,优先级按顺序生效。例如:'Arial, sans-serif'。
- style: 设置文本的字体样式。 | | enterKeyType | EnterKeyType | EnterKeyType.Done | 设置输入法回车键类型。 | | caretColor | [ResourceColor](ts-types.md#resourcecolor8) | - | 设置输入框光标颜色。 | | maxLength | number | - | 设置文本的最大输入字符数。 | 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 ec399310257262a73c410c14b91fb4248c09c472..1dcf6750980351550ba965e01d69f01588cced28 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 @@ -19,7 +19,7 @@ ## 接口 -TextPicker(options: {range: string[]|Resource, selected?: number, value?: string}) +TextPicker(options?: {range: string[] | [Resource](ts-types.md#resource), selected?: number, value?: string}) 根据range指定的选择范围创建文本选择器。 @@ -27,21 +27,21 @@ TextPicker(options: {range: string[]|Resource, selected?: number, value?: string | 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | | -------- | -------- | ---- | ----- | --------------- | -| range | string[] \| Resource | 是 | - | 选择器的数据选择范围。 | +| range | string[] \| [Resource](ts-types.md#resource) | 是 | - | 选择器的数据选择范围。 | | selected | number | 否 | 0 | 选中项在数组中的index值。 | | value | string | 否 | 第一个元素值 | 选中项的值,优先级低于selected。 | ## 属性 -| 名称 | 参数类型 | 默认值 | 描述 | -| ----------------------- | ------ | ---- | ---------------- | -| defaultPickerItemHeight | Length | - | 默认Picker内容项元素高度。 | +| 名称 | 参数类型 | 默认值 | 描述 | +| ----------------------- | ---------------- | ------ | -------------------------- | +| defaultPickerItemHeight | number \| string | - | 默认Picker内容项元素高度。 | ## 事件 -| 名称 | 描述 | -| ---------------------------------------- | ---------------------------------------- | +| 名称 | 描述 | +| ------------------------------------------------------------ | ------------------------------------------------------------ | | onChange(callback: (value: string, index: number) => void) | 滑动选中TextPicker文本内容后,触发该回调。
- value: 当前选中项的文本。
- index: 当前选中项的下标。 | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-texttimer.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-texttimer.md index df1a877c05ef010250e75a3f515af8a5233ccebf..ec595bb090c1343a22e045e805a8c7d3ff6b8800 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-texttimer.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-texttimer.md @@ -19,7 +19,7 @@ ## 接口 -TextTimer(options: { isCountDown?: boolean, count?: number, controller?: TextTimerController }) +TextTimer(options?: { isCountDown?: boolean, count?: number, controller?: TextTimerController }) **参数:** 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 634a563c092694e480cf5fe2cbd1bbe2ff391e8d..23b5b59ae196a9796270cf440a1aa2b898d6cd9a 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 @@ -19,7 +19,7 @@ ## 接口 -TimePicker(options?: TimePickerOptions) +TimePicker(options?: {selected?: Date}) 默认以00:00至23:59的时间区间创建滑动选择器。 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-refresh.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-refresh.md index a6c3be65ab1f90b10ab9551aef4ee93ce8691636..c6abd718b6ac60b948c47320bf58849d9a255476 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-container-refresh.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-refresh.md @@ -16,7 +16,7 @@ ## 接口 -Refresh\(value: \{refreshing: boolean, offset?: Length, friction?: number | string\}\) +Refresh\(value: \{refreshing: boolean, offset?: number | string, friction?: number | string\}\) **参数:** diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-row.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-row.md index 00ef7731919aaaaf254aa229fd66e02e38d0b32d..7f10e7980fc3da996395e6b8abf01145775258ee 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-container-row.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-row.md @@ -19,7 +19,7 @@ ## 接口 -Row(value?:{space?: Length}) +Row(value?:{space?: string | number}) **参数:** diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md index bd357c6d1ab9c9ad761639ec5fe64f43a3a267a3..3bc7c038e51279b044dedbb0482147e8c7ba4e65 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-scroll.md @@ -30,16 +30,17 @@ Scroll(scroller?: Scroller) | scrollable | ScrollDirection | ScrollDirection.Vertical | 设置滚动方法。 | | scrollBar | [BarState](ts-appendix-enums.md#barstate) | BarState.Off | 设置滚动条状态。 | | scrollBarColor | string \| number \| Color | - | 设置滚动条的颜色。 | -| scrollBarWidth | Length | - | 设置滚动条的宽度。 | +| scrollBarWidth | number \| string | - | 设置滚动条的宽度。 | | edgeEffect | EdgeEffect | EdgeEffect.Spring | 设置滑动效果,目前支持的滑动效果参见EdgeEffect的枚举说明。 | ## ScrollDirection枚举说明 -| 名称 | 描述 | -| ---------- | ---------- | -| Horizontal | 仅支持水平方向滚动。 | -| Vertical | 仅支持竖直方向滚动。 | -| None | 不可滚动。 | +| 名称 | 描述 | +| ---------- | ------------------------ | +| Horizontal | 仅支持水平方向滚动。 | +| Vertical | 仅支持竖直方向滚动。 | +| None | 不可滚动。 | +| Free | 支持竖直或水平方向滚动。 | ## EdgeEffect枚举说明 @@ -118,7 +119,7 @@ scrollPage(value: { next: boolean, direction?: Axis }): void ### currentOffset -currentOffset(): Object +currentOffset() 返回当前的滚动偏移量。 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-stack.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-stack.md index 7d60f89f0b98bb4052c38be1e17f6fe0494d6ef1..d3c40fc07cca595697d3d7d1c484421351c96957 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-container-stack.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-stack.md @@ -19,7 +19,7 @@ ## 接口 -Stack(value:{alignContent?: Alignment}) +Stack(value?: {alignContent?: Alignment}) **参数:** diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-swiper.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-swiper.md index f0bf6be55f343a0468bdd156de0669730a8e013d..c3a71457cc689bff1666303aad80609056f56af1 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-container-swiper.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-swiper.md @@ -18,7 +18,7 @@ ## 接口 -Swiper(value:{controller?: SwiperController}) +Swiper(value: (controller?: SwiperController)) **参数:** @@ -39,13 +39,13 @@ Swiper(value:{controller?: SwiperController}) | loop | boolean | true | 是否开启循环。
设置为true时表示开启循环,在LazyForEach懒循环加载模式下,加载的组件数量建议大于5个。 | | duration | number | 400 | 子组件切换的动画时长,单位为毫秒。 | | vertical | boolean | false | 是否为纵向滑动。 | -| itemSpace | Length | 0 | 设置子组件与子组件之间间隙。 | +| itemSpace | number \| string | 0 | 设置子组件与子组件之间间隙。 | | displayMode | SwiperDisplayMode | SwiperDisplayMode.Stretch | 设置子组件显示模式。 | | cachedCount8+ | number | 1 | 设置预加载子组件个数。 | | disableSwipe8+ | boolean | false | 禁用组件滑动切换功能。 | | displayCount8+ | number \| string | 1 | 设置一页中显示子组件的个数,设置为“auto”时等同于SwiperDisplayMode.AutoLinear的显示效果。 | | effectMode8+ | EdgeEffect | EdgeEffect.Spring | 设置滑动到边缘时的显示效果。 | -| curve8+ | [Curve](ts-appendix-enums.md#curve) \| Curves | Curve.Ease | 设置Swiper的动画曲线,默认为淡入淡出曲线,常用曲线参考[Curve枚举说明](ts-appendix-enums.md#curve),也可以通过插值计算模块提供的接口创建自定义的Curves([插值曲线对象](ts-interpolation-calculation.md))。 | +| curve8+ | [Curve](ts-appendix-enums.md#curve) \| string | Curve.Ease | 设置Swiper的动画曲线,默认为淡入淡出曲线,常用曲线参考[Curve枚举说明](ts-appendix-enums.md#curve),也可以通过插值计算模块提供的接口创建自定义的Curves([插值曲线对象](ts-interpolation-calculation.md))。 | | indicatorStyle8+ | {
left?: Length,
top?: Length,
right?: Length,
bottom?: Length,
size?: Length,
mask?: boolean,
color?: [ResourceColor](ts-types.md#resourcecolor8),
selectedColor?: [ResourceColor](ts-types.md#resourcecolor8)
} | - | 设置indicator样式:
- left: 设置导航点距离Swiper组件左边的距离。
- top: 设置导航点距离Swiper组件顶部的距离。
- right: 设置导航点距离Swiper组件右边的距离。
- bottom: 设置导航点距离Swiper组件底部的距离。
- size: 设置导航点的直径。
- mask: 设置是否显示导航点蒙层样式。
- color: 设置导航点的颜色。
- selectedColor: 设置选中的导航点的颜色。 | diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-tabs.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-tabs.md index 40cf0ea5d65f20b1bcfdb3a5c75aa4dd9beca029..3d57780417811d75a9bee3d98e1754ad6d8e763c 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-container-tabs.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-tabs.md @@ -45,8 +45,8 @@ Tabs(value: {barPosition?: BarPosition, index?: number, controller?: [TabsContro | vertical | boolean | false | 设置为false是为横向Tabs,设置为true时为纵向Tabs。 | | scrollable | boolean | true | 设置为true时可以通过滑动页面进行页面切换,为false时不可滑动切换页面。 | | barMode | BarMode | BarMode.Fixed | TabBar布局模式,具体描述见BarMode枚举说明。 | -| barWidth | number \| string8+ | - | TabBar的宽度值。 | -| barHeight | number \| string8+ | - | TabBar的高度值。 | +| barWidth | [Length](ts-types.md#length) | - | TabBar的宽度值。 | +| barHeight | [Length](ts-types.md#length) | - | TabBar的高度值。 | | animationDuration | number | 200 | TabContent滑动动画时长。 | ## BarMode枚举说明 @@ -58,9 +58,9 @@ Tabs(value: {barPosition?: BarPosition, index?: number, controller?: [TabsContro ## 事件 -| 名称 | 功能描述 | -| ---------------------------------------- | -------------- | -| onChange(callback: (index: number) => void) | Tab页签切换后触发的事件。 | +| 名称 | 功能描述 | +| ------------------------------------------------------------ | -------------------------------------------------------- | +| onChange(event: (index: number) => void) | Tab页签切换后触发的事件。
- index: tab标签的索引值。 | ## TabsController @@ -70,7 +70,6 @@ Tabs组件的控制器,用于控制Tabs组件进行页签切换。 ``` controller: TabsController = new TabsController() - ``` ### changeIndex @@ -81,9 +80,9 @@ changeIndex(value: number): void **参数:** -| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | -| ----- | ------ | ---- | ---- | --------------------- | -| value | number | 是 | - | 页签在Tabs里的索引值,索引值从0开始。 | +| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | +| ------ | -------- | ---- | ------ | ------------------------------------- | +| value | number | 是 | - | 页签在Tabs里的索引值,索引值从0开始。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-polygon.md b/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-polygon.md index 6e921a4dd227e8f539f6144e58e4da8e1bb3d1d1..d512f0ce97d6525305767f22f46dc8bb6187fa0d 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-polygon.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-polygon.md @@ -19,22 +19,22 @@ ## 接口 -Polygon(value:{options?: {width: Length, height: Length}}) +Polygon(value:{value?: {width?: number | string, height?: number | string}}) -**options参数说明:** +**参数说明:** -| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | -| ------ | ------ | ---- | ---- | ---- | -| width | Length | 是 | - | 宽度。 | -| height | Length | 是 | - | 高度。 | +| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | +| ------ | -------------------------- | ---- | ------ | -------- | +| width | number \| string | 是 | - | 宽度。 | +| height | number \| string | 是 | - | 高度。 | ## 属性 -| 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 | -| ------ | ------------------ | ---- | ---- | ----------- | -| width | Length | 0 | 否 | 多边形所在矩形的宽度。 | -| height | Length | 0 | 否 | 多边形所在矩形的高度。 | -| points | Array<Point> | - | 是 | 多边形的顶点坐标列表。 | +| 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 | +| -------- | ---------------- | ------ | ---- | ---------------------- | +| width | Length | 0 | 否 | 多边形所在矩形的宽度。 | +| height | Length | 0 | 否 | 多边形所在矩形的高度。 | +| points | Array<any> | - | 是 | 多边形的顶点坐标列表。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-polyline.md b/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-polyline.md index 37b72ec5200810550b290fd79ed67abf601b92ba..cd7e78f61fca6fc2bf15433cfbd2c34e4c9894bd 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-polyline.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-polyline.md @@ -20,22 +20,22 @@ ## 接口 -Polyline(options?: {width: Length, height: Length}) +Polyline(value?: {width?: string | number, height?: string | number}) -**options参数说明:** +**参数:** -| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | -| ------ | ------ | ---- | ---- | ---- | -| width | Length | 是 | - | 宽度。 | -| height | Length | 是 | - | 高度。 | +| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | +| ------ | -------------------------- | ---- | ------ | -------- | +| width | string \| number | 是 | - | 宽度。 | +| height | string \| number | 是 | - | 高度。 | ## 属性 -| 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 | -| ------ | ------------------ | ---- | ---- | ---------- | -| width | Length | 0 | 否 | 折线所在矩形的宽度。 | -| height | Length | 0 | 否 | 折线所在矩形的高度。 | -| points | Array<Point> | - | 是 | 折线经过坐标点列表。 | +| 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 | +| -------- | ---------------- | ------ | ---- | -------------------- | +| width | Length | 0 | 否 | 折线所在矩形的宽度。 | +| height | Length | 0 | 否 | 折线所在矩形的高度。 | +| points | Array<any> | - | 是 | 折线经过坐标点列表。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-rect.md b/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-rect.md index aaf992b52b8af25b7b99a8e822cd23d29d28fb4e..e54a0af65504ffe1a943db2df962abdf69502ab0 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-rect.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-rect.md @@ -20,17 +20,17 @@ ## 接口 -Rect(value:{options?: {width: Length,height: Length,radius?: Length | Array<Length>} | {width: Length,height: Length,radiusWidth?: Length,radiusHeight?: Length}}) +Rect(value:{value?: {width?: number | string ,height?: number | string ,radius?: number | string | Array<Length>} | {width?: number | string ,height?: number | string ,radiusWidth?: number | string ,radiusHeight?: number | string }}) **options参数说明:** -| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | -| ------------ | --------------------------------------- | ---- | ---- | -------------------- | -| width | Length | 是 | - | 宽度。 | -| height | Length | 是 | - | 高度。 | -| radius | Length \| Array<Length> | 否 | 0 | 圆角半径,支持分别设置四个角的圆角度数。 | -| radiusWidth | Length | 否 | 0 | 圆角宽度。 | -| radiusHeight | Length | 否 | 0 | 圆角高度。 | +| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | +| ------------ | ----------------------------------------------------------- | ---- | ------ | ---------------------------------------- | +| width | number \| string | 是 | - | 宽度。 | +| height | number \| string | 是 | - | 高度。 | +| radius | number \| string \| Array<Length> | 否 | 0 | 圆角半径,支持分别设置四个角的圆角度数。 | +| radiusWidth | number \| string | 否 | 0 | 圆角宽度。 | +| radiusHeight | number \| string | 否 | 0 | 圆角高度。 | ## 属性 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-shape.md b/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-shape.md index 20e292bc8fd18b7bc8ae373f85613a5dbc8c2ae6..77886ed90b1afee8399f68bb4ec8954bdf68884e 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-shape.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-drawing-components-shape.md @@ -27,25 +27,27 @@ Shape(value:{target?: PixelMap}) **参数:** -| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | -| ------ | -------- | ---- | ---- | ---------------------------------------- | -| target | PixelMap | 否 | null | 绘制目标,可将图形绘制在指定的PixelMap对象中,若未设置,则在当前绘制目标中进行绘制。 | +| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 | +| ------ | -------- | ---- | ------ | ------------------------------------------------------------ | +| target | PixelMap | 否 | null | 绘制目标,可将图形绘制在指定的PixelMap对象中,若未设置,则在当前绘制目标中进行绘制。 | ## 属性 -| 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 | -| ---------------- | ---------------------------------------- | ------------------- | ---- | ------------ | -| viewPort | {
x: Length,
y: Length,
width: Length,
height: Length
} | - | 是 | 形状的视口。 | -| fill | Color | Black | 否 | 填充颜色。 | -| stroke | Color | - | 否 | 边框颜色。 | -| strokeDashArray | Array<Length> | [] | 否 | 设置边框的间隙。 | -| strokeDashOffset | Length | 0 | 否 | 边框绘制起点的偏移量。 | -| strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | 否 | 路径端点绘制样式。 | -| strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | 否 | 边框拐角绘制样式。 | -| strokeMiterLimit | number | 4 | 否 | 锐角绘制成斜角的极限值。 | -| strokeOpacity | number | 1 | 否 | 设置边框的不透明度。 | -| strokeWidth | Length | 1 | 否 | 设置边框的宽度。 | -| antiAlias | boolean | true | 否 | 是否开启抗锯齿。 | +| 参数名称 | 参数类型 | 默认值 | 必填 | 参数描述 | +| ---------------- | ------------------------------------------------------------ | ------------------- | ---- | -------------------------- | +| viewPort | {
x?: [Length](ts-types.md#length),
y?:  [Length](ts-types.md#length),
width?:  [Length](ts-types.md#length),
height?:  [Length](ts-types.md#length)
} | - | 是 | 形状的视口。 | +| fill | [ResourceColor](ts-types.md#resourcecolor8) | Black | 否 | 填充颜色。 | +| stroke | [ResourceColor](ts-types.md#resourcecolor8) | - | 否 | 边框颜色。 | +| strokeDashArray | Array<any> | [] | 否 | 设置边框的间隙。 | +| strokeDashOffset | number \| string | 0 | 否 | 边框绘制起点的偏移量。 | +| strokeLineCap | [LineCapStyle](ts-appendix-enums.md#linecapstyle) | LineCapStyle.Butt | 否 | 路径端点绘制样式。 | +| strokeLineJoin | [LineJoinStyle](ts-appendix-enums.md#linejoinstyle) | LineJoinStyle.Miter | 否 | 边框拐角绘制样式。 | +| strokeMiterLimit | number \| string | 4 | 否 | 锐角绘制成斜角的极限值。 | +| strokeOpacity | number \| string \| [Resource](ts-types.md#resource) | 1 | 否 | 设置边框的不透明度。 | +| strokeWidth | number \| string | 1 | 否 | 设置边框的宽度。 | +| antiAlias | boolean | true | 否 | 是否开启抗锯齿。 | +| mesh | Array<any>,
column:number,
row:number | - | 否 | 绘制网格时调用。 | +| fillOpacity | number \| string \|  [Resource](ts-types.md#resource) | 1 | 否 | 设置形状填充部分的透明度。 | ## 示例 diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-media-components-video.md b/zh-cn/application-dev/reference/arkui-ts/ts-media-components-video.md index a4c6b77ee6ddcc91a3205de1bf6a9fff2647f466..9bddf8e7df0b163e6c9190f75d3c9e608da5a735 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-media-components-video.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-media-components-video.md @@ -61,16 +61,17 @@ Video(value: VideoOptions) ## 事件 -| 名称 | 功能描述 | -| ---------------------------------------- | ---------------------------------------- | -| onStart() => void | 播放时触发该事件。 | -| onPause() => void | 暂停时触发该事件。 | -| onFinish() => void | 播放结束时触发该事件。 | -| onError() => void | 播放失败时触发该事件。 | -| onPrepared(event?: { duration: number }) => void | 视频准备完成时触发该事件,通过duration可以获取视频时长,单位为秒(s)。 | -| onSeeking(event?: { time: number }) => void | 操作进度条过程时上报时间信息,单位为s。 | -| onSeeked(event?: { time: number }) => void | 操作进度条完成后,上报播放时间信息,单位为s。 | -| onUpdate(event?: { time: number }) => void | 播放进度变化时触发该事件,单位为s,更新时间间隔为250ms。 | +| 名称 | 功能描述 | +| ------------------------------------------------------------ | ------------------------------------------------------------ | +| onStart(event: () => void) | 播放时触发该事件。 | +| onPause(event: () => void) | 暂停时触发该事件。 | +| onFinish(event: () => void) | 播放结束时触发该事件。 | +| onError(event:() => void) | 播放失败时触发该事件。 | +| onPrepared(callback:(event?: { time: number }) => void) | 视频准备完成时触发该事件,通过duration可以获取视频时长,单位为秒(s)。 | +| onSeeking(callback:(event?: { time: number }) => void) | 操作进度条过程时上报时间信息,单位为s。 | +| onSeeked(callback:(event?: { time: number }) => void) | 操作进度条完成后,上报播放时间信息,单位为s。 | +| onUpdate(callback:(event?: { time: number }) => void) | 播放进度变化时触发该事件,单位为s,更新时间间隔为250ms。 | +| onFullscreenChange(callback: (event?: { fullscreen: boolean }) => void) | 当视频进入和退出全屏时调用。 | ## VideoController