提交 3adaabe8 编写于 作者: H HelloCrease

update docs

Signed-off-by: NHelloCrease <lian15@huawei.com>
上级 5a9dff07
......@@ -306,8 +306,7 @@
- [Event Parameter](reference/arkui-js/js-components-custom-event-parameter.md)
- [slot](reference/arkui-js/js-components-custom-slot.md)
- [Lifecycle Definition](reference/arkui-js/js-components-custom-lifecycle.md)
- Appendix
- [Type Attributes](reference/arkui-js/js-appendix-types.md)
- [Type Attributes](reference/arkui-js/js-appendix-types.md)
- Compent Reference (TypeScript-based Declarative Development Paradigm)
- Components
- Universal Components
......@@ -364,24 +363,34 @@
- [DataPanel](reference/arkui-ts/ts-basic-components-datapanel.md)
- [DatePicker](reference/arkui-ts/ts-basic-components-datepicker.md)
- [Divider](reference/arkui-ts/ts-basic-components-divider.md)
- [Gauge](reference/arkui-ts/ts-basic-components-gauge.md)
- [Image](reference/arkui-ts/ts-basic-components-image.md)
- [ImageAnimator](reference/arkui-ts/ts-basic-components-imageanimator.md)
- [LoadingProgress](reference/arkui-ts/ts-basic-components-loadingprogress.md)
- [Marquee](reference/arkui-ts/ts-basic-components-marquee.md)
- [PatternLock](reference/arkui-ts/ts-basic-components-patternlock.md)
- [PluginComponent](reference/arkui-ts/ts-basic-components-plugincomponent.md)
- [Progress](reference/arkui-ts/ts-basic-components-progress.md)
- [QRCode](reference/arkui-ts/ts-basic-components-qrcode.md)
- [Radio](reference/arkui-ts/ts-basic-components-radio.md)
- [Rating](reference/arkui-ts/ts-basic-components-rating.md)
- [RichText](reference/arkui-ts/ts-basic-components-richtext.md)
- [Search](reference/arkui-ts/ts-basic-components-search.md)
- [Select](reference/arkui-ts/ts-basic-components-select.md)
- [Slider](reference/arkui-ts/ts-basic-components-slider.md)
- [Span](reference/arkui-ts/ts-basic-components-span.md)
- [Stepper](reference/arkui-ts/ts-basic-components-stepper.md)
- [StepperItem](reference/arkui-ts/ts-basic-components-stepperitem.md)
- [Text](reference/arkui-ts/ts-basic-components-text.md)
- [TextArea](reference/arkui-ts/ts-basic-components-textarea.md)
- [TextClock](reference/arkui-ts/ts-basic-components-textclock.md)
- [TextInput](reference/arkui-ts/ts-basic-components-textinput.md)
- [TextPicker](reference/arkui-ts/ts-basic-components-textpicker.md)
- [TextTimer](reference/arkui-ts/ts-basic-components-texttimer.md)
- [TimePicker](reference/arkui-ts/ts-basic-components-timepicker.md)
- [Toggle](reference/arkui-ts/ts-basic-components-toggle.md)
- [TextClock](reference/arkui-ts/ts-basic-components-textclock.md)
- [Web](reference/arkui-ts/ts-basic-components-web.md)
- [Xcomponent](reference/arkui-ts/ts-basic-components-xcomponent.md)
- Container Components
- [AlphabetIndexer](reference/arkui-ts/ts-container-alphabet-indexer.md)
- [Badge](reference/arkui-ts/ts-container-badge.md)
......@@ -397,6 +406,7 @@
- [Navigator](reference/arkui-ts/ts-container-navigator.md)
- [Navigation](reference/arkui-ts/ts-container-navigation.md)
- [Panel](reference/arkui-ts/ts-container-panel.md)
- [Refresh](reference/arkui-ts/ts-container-refresh.md)
- [Row](reference/arkui-ts/ts-container-row.md)
- [RowSplit](reference/arkui-ts/ts-container-rowsplit.md)
- [Scroll](reference/arkui-ts/ts-container-scroll.md)
......@@ -406,7 +416,6 @@
- [Swiper](reference/arkui-ts/ts-container-swiper.md)
- [Tabs](reference/arkui-ts/ts-container-tabs.md)
- [TabContent](reference/arkui-ts/ts-container-tabcontent.md)
- [Refresh](reference/arkui-ts/ts-container-refresh.md)
- Media Components
- [Video](reference/arkui-ts/ts-media-components-video.md)
- Drawing Components
......@@ -438,7 +447,6 @@
- [Matrix Transformation](reference/arkui-ts/ts-matrix-transformation.md)
- [Interpolation Calculation](reference/arkui-ts/ts-interpolation-calculation.md)
- Global UI Methods
- [Image Cache](reference/arkui-ts/ts-methods-image-cache.md)
- Dialog Box
- [Alert Dialog Box](reference/arkui-ts/ts-methods-alert-dialog-box.md)
- [Action Sheet](reference/arkui-ts/ts-methods-action-sheet.md)
......@@ -446,8 +454,7 @@
- [Date Picker Dialog Box](reference/arkui-ts/ts-methods-datepicker-dialog.md)
- [Text Picker Dialog Box](reference/arkui-ts/ts-methods-textpicker-dialog.md)
- [Menu](reference/arkui-ts/ts-methods-menu.md)
- Appendix
- [Built-in Enums](reference/arkui-ts/ts-appendix-enums.md)
- [Built-in Enums](reference/arkui-ts/ts-appendix-enums.md)
- APIs
- Ability Framework
- [FeatureAbility Module](reference/apis/js-apis-featureAbility.md)
......
# TypeScript-based Declarative Development Paradigm
# JavaScript-based Web-like Development Paradigm
- [Components](js-components.md)
- [Common](js-components-common.md)
- Components
- Common
- [Universal Attributes](js-components-common-attributes.md)
- [Universal Styles](js-components-common-styles.md)
- [Universal Events](js-components-common-events.md)
......@@ -13,7 +13,7 @@
- [Custom Font Styles](js-components-common-customizing-font.md)
- [Atomic Layout](js-components-common-atomic-layout.md)
- [Container Component](js-components-container.md)
- Container Component
- [badge](js-components-container-badge.md)
- [dialog](js-components-container-dialog.md)
- [div](js-components-container-div.md)
......@@ -32,7 +32,7 @@
- [tab-bar](js-components-container-tab-bar.md)
- [tab-content](js-components-container-tab-content.md)
- [Basic Components](js-components-basic.md)
- Basic Components
- [button](js-components-basic-button.md)
- [chart](js-components-basic-chart.md)
- [divider](js-components-basic-divider.md)
......@@ -62,10 +62,10 @@
- [toggle](js-components-basic-toggle.md)
- [web](js-components-basic-web.md)
- [Media Components](js-components-media.md)
- Media Components
- [video](js-components-media-video.md)
- [Canvas Components](js-components-canvas.md)
- Canvas Components
- [canvas](js-components-canvas-canvas.md)
- [CanvasRenderingContext2D](js-components-canvas-canvasrenderingcontext2d.md)
- [Image](js-components-canvas-image.md)
......@@ -76,13 +76,13 @@
- [OffscreenCanvas](js-components-canvas-offscreencanvas.md)
- [OffscreenCanvasRenderingContext2D](js-offscreencanvasrenderingcontext2d.md)
- [Grid](js-components-grid.md)
- Grid
- [Basic Concepts](js-components-grid-basic-concepts.md)
- [grid-container](js-components-grid-container.md)
- [grid-row](js-components-grid-row.md)
- [grid-col](js-components-grid-col.md)
- [SVG Components](js-svg.md)
- SVG Components
- [Universal Attributes](js-components-svg-common-attributes.md)
- [svg](js-components-svg.md)
- [rect](js-components-svg-rect.md)
......@@ -99,14 +99,12 @@
- [animateMotion](js-components-svg-animatemotion.md)
- [animateTransform](js-components-svg-animatetransform.md)
- [Custom Components](js-components-custom.md)
- Custom Components
- [Basic Usage](js-components-custom-basic-usage.md)
- [Custom Events](js-components-custom-events.md)
- [props](js-components-custom-props.md)
- [Event Parameter](js-components-custom-event-parameter.md)
- [slot](js-components-custom-slot.md)
- [Lifecycle Definition](js-components-custom-lifecycle.md)
- [Appendix](js-appendix.md)
- [Type Attributes](js-appendix-types.md)
- [Type Attributes](js-appendix-types.md)
# Appendix<a name="EN-US_TOPIC_0000001173324659"></a>
- **[Type Attributes](js-appendix-types.md)**
# Basic Components<a name="EN-US_TOPIC_0000001127284922"></a>
- **[button](js-components-basic-button.md)**
- **[chart](js-components-basic-chart.md)**
- **[divider](js-components-basic-divider.md)**
- **[image](js-components-basic-image.md)**
- **[image-animator](js-components-basic-image-animator.md)**
- **[input](js-components-basic-input.md)**
- **[label](js-components-basic-label.md)**
- **[marquee](js-components-basic-marquee.md)**
- **[menu](js-components-basic-menu.md)**
- **[option](js-components-basic-option.md)**
- **[picker](js-components-basic-picker.md)**
- **[picker-view](js-components-basic-picker-view.md)**
- **[piece](js-components-basic-piece.md)**
- **[progress](js-components-basic-progress.md)**
- **[qrcode](js-components-basic-qrcode.md)**
- **[rating](js-components-basic-rating.md)**
- **[richtext](js-components-basic-richtext.md)**
- **[search](js-components-basic-search.md)**
- **[select](js-components-basic-select.md)**
- **[slider](js-components-basic-slider.md)**
- **[span](js-components-basic-span.md)**
- **[switch](js-components-basic-switch.md)**
- **[text](js-components-basic-text.md)**
- **[textarea](js-components-basic-textarea.md)**
- **[toolbar](js-components-basic-toolbar.md)**
- **[toolbar-item](js-components-basic-toolbar-item.md)**
- **[toggle](js-components-basic-toggle.md)**
# Canvas Components<a name="EN-US_TOPIC_0000001173164681"></a>
- **[canvas](js-components-canvas-canvas.md)**
- **[CanvasRenderingContext2D](js-components-canvas-canvasrenderingcontext2d.md)**
- **[Image](js-components-canvas-image.md)**
- **[CanvasGradient](js-components-canvas-canvasgradient.md)**
- **[ImageData](js-components-canvas-imagedata.md)**
- **[Path2D](js-components-canvas-path2d.md)**
- **[ImageBitmap](js-components-canvas-imagebitmap.md)**
- **[OffscreenCanvas](js-components-canvas-offscreencanvas.md)**
- **[OffscreenCanvasRenderingContext2D](js-offscreencanvasrenderingcontext2d.md)**
......@@ -8,18 +8,18 @@
### Attributes
| Name| Type| Default Value| Description|
| -------- | -------- | -------- | -------- |
| shareid | string | -| Used for the transition of shared elements and takes effect only when it is configured.**list-item**, **image**, **text**, **button**, and **label** components are supported for the transition of shared elements.|
| Name | Type | Default Value | Description |
| ------- | ------ | ------------- | ---------------------------------------- |
| shareid | string | - | Used for the transition of shared elements and takes effect only when it is configured.**list-item**, **image**, **text**, **button**, and **label** components are supported for the transition of shared elements. |
### Styles
| Name| Type| Default Value| Description|
| -------- | -------- | -------- | -------- |
| shared-transition-effect | string | exchange | Entry style of a shared element during transition.<br>-&nbsp;**exchange** (default): The source page element is moved to the position of the target page element and is zoomed in or out properly.<br>-&nbsp;**static**: The position of the target page element remains unchanged. You can configure the opacity animation. Currently, only the static effect configured on the target page takes effect.|
| shared-transition-name | string | - | During the transition, the style configured on the target page takes effect preferentially. This style is used to configure the animation effect of shared elements. The animation effect is an animation sequence defined by **@keyframes** supporting transform and opacity animations. If the effect of shared elements conflicts with the custom animation, the latter is used.|
| shared-transition-timing-function | string | friction | During the transition, the style configured on the target page takes effect preferentially. This style defines the difference curve during the transition of shared elements. If it is not configured, the friction curve is used.|
| Name | Type | Default Value | Description |
| --------------------------------- | ------ | ------------- | ---------------------------------------- |
| shared-transition-effect | string | exchange | Entry style of a shared element during transition.<br>-&nbsp;**exchange** (default): The source page element is moved to the position of the target page element and is zoomed in or out properly.<br>-&nbsp;**static**: The position of the target page element remains unchanged. You can configure the opacity animation. Currently, only the static effect configured on the target page takes effect. |
| shared-transition-name | string | - | During the transition, the style configured on the target page takes effect preferentially. This style is used to configure the animation effect of shared elements. The animation effect is an animation sequence defined by **@keyframes** supporting transform and opacity animations. If the effect of shared elements conflicts with the custom animation, the latter is used. |
| shared-transition-timing-function | string | friction | During the transition, the style configured on the target page takes effect preferentially. This style defines the difference curve during the transition of shared elements. If it is not configured, the friction curve is used. |
### Important Notes
......@@ -118,9 +118,9 @@ export default {
### Styles
| Name| Type| Default Value| Description|
| -------- | -------- | -------- | -------- |
| transition-effect | string | - | Whether a component on the current page displays the transition effect during a card transition. Available values are as follows:<br>-&nbsp;**unfold**: The component will move upwards by one card height if the component is located above the card tapped by the user, or move downwards by one card height if the component is located below the card.<br>-&nbsp;**none**: No transition effect is displayed.|
| Name | Type | Default Value | Description |
| ----------------- | ------ | ------------- | ---------------------------------------- |
| transition-effect | string | - | Whether a component on the current page displays the transition effect during a card transition. Available values are as follows:<br>-&nbsp;**unfold**: The component will move upwards by one card height if the component is located above the card tapped by the user, or move downwards by one card height if the component is located below the card.<br>-&nbsp;**none**: No transition effect is displayed. |
### Example
......@@ -214,12 +214,12 @@ export default {
### Styles
| Name| Type| Default Value| Description|
| -------- | -------- | -------- | -------- |
| transition-enter | string | - | Works with **@keyframes** and supports transform and opacity animations. For details, see [Attributes available for the @keyframes rule](../arkui-js/js-components-common-animation.md).|
| transition-exit | string | - | Works with **@keyframes** and supports transform and opacity animations. For details, see [Attributes available for the @keyframes rule](../arkui-js/js-components-common-animation.md).|
| transition-duration | string | Follows the default page transition time of the device| The unit can be s or ms. The default unit is ms. If no value is specified, the default value is used. |
| transition-timing-function | string | friction | Speed curve of the transition animation, which makes the animation more fluent. For details, see the description of **animation-timing-function **in [Animation Styles](../arkui-js/js-components-common-animation.md).|
| Name | Type | Default Value | Description |
| -------------------------- | ------ | ---------------------------------------- | ---------------------------------------- |
| transition-enter | string | - | Works with **@keyframes** and supports transform and opacity animations. For details, see [Attributes available for the @keyframes rule](../arkui-js/js-components-common-animation.md). |
| transition-exit | string | - | Works with **@keyframes** and supports transform and opacity animations. For details, see [Attributes available for the @keyframes rule](../arkui-js/js-components-common-animation.md). |
| transition-duration | string | Follows the default page transition time of the device | The unit can be s or ms. The default unit is ms. If no value is specified, the default value is used. |
| transition-timing-function | string | friction | Speed curve of the transition animation, which makes the animation more fluent. For details, see the description of **animation-timing-function **in [Animation Styles](../arkui-js/js-components-common-animation.md). |
### Important Notes
......@@ -255,7 +255,7 @@ export default {
import router from '@system.router';
export default {
data: {
},
jump() {
router.push({
......@@ -283,13 +283,13 @@ export default {
transition-duration: 5s;
transition-timing-function: friction;
}
@keyframes go_page {
from {
opacity: 0;
transform: translate(0px) rotate(60deg) scale(1.0);
}
to {
opacity: 1;
transform: translate(100px) rotate(360deg) scale(1.0);
......@@ -300,7 +300,7 @@ export default {
opacity: 1;
transform: translate(200px) rotate(60deg) scale(2);
}
to {
opacity: 0;
transform: translate(200px) rotate(360deg) scale(2);
......@@ -308,7 +308,6 @@ export default {
}
```
2. Page2
......@@ -325,7 +324,7 @@ export default {
import router from '@system.router';
export default {
data: {
},
jumpBack() {
router.back()
......@@ -342,7 +341,7 @@ export default {
width: 100%;
height: 100%;
}
.move_page {
width: 100px;
height: 100px;
......@@ -352,7 +351,7 @@ export default {
transition-duration: 5s;
transition-timing-function: ease;
}
@keyframes go_page {
from {
opacity: 0;
......@@ -363,7 +362,7 @@ export default {
transform:translate(100px) rotate(180deg) scale(2.0);
}
}
@keyframes exit_page {
from {
opacity: 1;
......@@ -375,5 +374,5 @@ export default {
}
}
```
![transition](figures/transition.gif)
# Common<a name="EN-US_TOPIC_0000001127284874"></a>
- **[Universal Attributes](js-components-common-attributes.md)**
- **[Universal Styles](js-components-common-styles.md)**
- **[Universal Events](js-components-common-events.md)**
- **[Universal Methods](js-components-common-methods.md)**
- **[Animation Styles](js-components-common-animation.md)**
- **[Gradient Styles](js-components-common-gradient.md)**
- **[Transition Styles](js-components-common-transition.md)**
- **[Media Query](js-components-common-mediaquery.md)**
- **[Custom Font Styles](js-components-common-customizing-font.md)**
- **[Atomic Layout](js-components-common-atomic-layout.md)**
# Container Component<a name="EN-US_TOPIC_0000001127125102"></a>
- **[badge](js-components-container-badge.md)**
- **[dialog](js-components-container-dialog.md)**
- **[div](js-components-container-div.md)**
- **[form](js-components-container-form.md)**
- **[list](js-components-container-list.md)**
- **[list-item](js-components-container-list-item.md)**
- **[list-item-group](js-components-container-list-item-group.md)**
- **[panel](js-components-container-panel.md)**
- **[popup](js-components-container-popup.md)**
- **[refresh](js-components-container-refresh.md)**
- **[stack](js-components-container-stack.md)**
- **[stepper](js-components-container-stepper.md)**
- **[stepper-item](js-components-container-stepper-item.md)**
- **[swiper](js-components-container-swiper.md)**
- **[tabs](js-components-container-tabs.md)**
- **[tab-bar](js-components-container-tab-bar.md)**
- **[tab-content](js-components-container-tab-content.md)**
# Custom Components<a name="EN-US_TOPIC_0000001173164753"></a>
- **[Basic Usage](js-components-custom-basic-usage.md)**
- **[Custom Events](js-components-custom-events.md)**
- **[props](js-components-custom-props.md)**
- **[Event Parameter](js-components-custom-event-parameter.md)**
- **[slot](js-components-custom-slot.md)**
- **[Lifecycle Definition](js-components-custom-lifecycle.md)**
# Grid<a name="EN-US_TOPIC_0000001127125024"></a>
- **[Basic Concepts](js-components-grid-basic-concepts.md)**
- **[grid-container](js-components-grid-container.md)**
- **[grid-row](js-components-grid-row.md)**
- **[grid-col](js-components-grid-col.md)**
# Media Components<a name="EN-US_TOPIC_0000001127284858"></a>
- **[video](js-components-media-video.md)**
# Components<a name="EN-US_TOPIC_0000001127125066"></a>
- **[Common](js-components-common.md)**
- **[Container Component](js-components-container.md)**
- **[Basic Components](js-components-basic.md)**
- **[Media Components](js-components-media.md)**
- **[Canvas Components ](js-components-canvas.md)**
- **[Grid](js-components-grid.md)**
- **[SVG Components](js-svg.md)**
# SVG Components<a name="EN-US_TOPIC_0000001127284910"></a>
- **[Universal Attributes](js-components-svg-common-attributes.md)**
- **[svg](js-components-svg.md)**
- **[rect](js-components-svg-rect.md)**
- **[circle](js-components-svg-circle.md)**
- **[ellipse](js-components-svg-ellipse.md)**
- **[path](js-components-svg-path.md)**
- **[line](js-components-svg-line.md)**
- **[polyline](js-components-svg-polyline.md)**
- **[polygon](js-components-svg-polygon.md)**
- **[text](js-components-svg-text.md)**
- **[tspan](js-components-svg-tspan.md)**
- **[textPath](js-components-svg-textpath.md)**
- **[animate](js-components-svg-animate.md)**
- **[animateMotion](js-components-svg-animatemotion.md)**
- **[animateTransform](js-components-svg-animatetransform.md)**
......@@ -2,7 +2,7 @@
- Components
- Universal Components
- [Universal Events](ts-universal-event-index.md)
- Universal Events
- [Click Event](ts-universal-events-click.md)
- [Touch Event](ts-universal-events-touch.md)
- [Show/Hide Event](ts-universal-events-show-hide.md)
......@@ -11,7 +11,7 @@
- [Focus Event](ts-universal-focus-event.md)
- [Mouse Event](ts-universal-mouse-key.md)
- [Component Area Change Event](ts-universal-component-area-change-event.md)
- [Universal Attributes](ts-universal-attributes-index.md)
- Universal Attributes
- [Size](ts-universal-attributes-size.md)
- [Location](ts-universal-attributes-location.md)
- [Layout Constraints](ts-universal-attributes-layout-constraints.md)
......@@ -139,7 +139,6 @@
- [Matrix Transformation](ts-matrix-transformation.md)
- [Interpolation Calculation](ts-interpolation-calculation.md)
- Global UI Methods
- [Image Cache](ts-methods-image-cache.md)
- Pop-up Window
- [Alert Dialog Box](ts-methods-alert-dialog-box.md)
- [Action Sheet](ts-methods-action-sheet.md)
......
......@@ -24,24 +24,24 @@ Column(value:{space?: Length})
- Parameters
| Name | Type | Mandatory | Default Value | Description |
| -------- | -------- | -------- | -------- | -------- |
| space | Length | No | 0 | Space between any two adjacent child components in the vertical layout. |
| Name | Type | Mandatory | Default Value | Description |
| ----- | ------ | --------- | ------------- | ---------------------------------------- |
| space | Length | No | 0 | Space between any two adjacent child components in the vertical layout. |
## Attributes
| Name | Type | Default Value | Description |
| -------- | -------- | -------- | -------- |
| alignItems | HorizontalAlign | HorizontalAlign.Center | Alignment mode of child components in the horizontal direction. |
| justifyContent<sup>8+</sup> | [FlexAlign](ts-container-flex.md) | FlexAlign.Start | Alignment mode of child components in the vertical direction. |
| Name | Type | Default Value | Description |
| --------------------------- | --------------------------------- | ---------------------- | ---------------------------------------- |
| alignItems | HorizontalAlign | HorizontalAlign.Center | Alignment mode of child components in the horizontal direction. |
| justifyContent<sup>8+</sup> | [FlexAlign](ts-container-flex.md) | FlexAlign.Start | Alignment mode of child components in the vertical direction. |
- HorizontalAlign enums
| Name | Description |
| -------- | -------- |
| Start | Aligned with the start edge in the same direction as the language in use. |
| Center | Center alignment. This is the default alignment mode. |
| End | Aligned with the end edge in the same direction as the language in use. |
| Name | Description |
| ------ | ---------------------------------------- |
| Start | Aligned with the start edge in the same direction as the language in use. |
| Center | Center alignment. This is the default alignment mode. |
| End | Aligned with the end edge in the same direction as the language in use. |
## Example
......@@ -86,4 +86,4 @@ struct ColumnExample {
}
```
![](figures/column.png)
![](figures/Column.png)
# Universal Attributes
- **[Size](ts-universal-attributes-size.md)**
- **[Location](ts-universal-attributes-location.md)**
- **[Layout Constraints](ts-universal-attributes-layout-constraints.md)**
- **[Flex Layout](ts-universal-attributes-flex-layout.md)**
- **[Border](ts-universal-attributes-border.md)**
- **[Background](ts-universal-attributes-background.md)**
- **[Opacity](ts-universal-attributes-opacity.md)**
- **[Visibility](ts-universal-attributes-visibility.md)**
- **[Enable/Disable](ts-universal-attributes-enable.md)**
- **[Overlay](ts-universal-attributes-overlay.md)**
- **[Z-order Control](ts-universal-attributes-z-order.md)**
- **[Transformation](ts-universal-attributes-transformation.md)**
- **[Image Effect Configuration](ts-universal-attributes-image-effect.md)**
- **[Shape Clipping](ts-universal-attributes-sharp-clipping.md)**
- **[Text Style](ts-universal-attributes-text-style.md)**
- **[Grid](ts-universal-attributes-grid.md)**
- **[Gradient Color](ts-universal-attributes-gradient-color.md)**
- **[Popup Control](ts-universal-attributes-popup.md)**
- **[Menu Control](ts-universal-attributes-menu.md)**
- **[Click Control](ts-universal-attributes-click.md)**
- **[Focus Control](ts-universal-attributes-focus.md)**
- **[Hover Effect](ts-universal-attributes-hover-effect.md)**
- **[Component ID](ts-universal-attributes-component-id.md)**
- **[Touch Target](ts-universal-attributes-touch-target.md)**
- **[Polymorphic Style](ts-universal-attributes-polymorphic-style.md)**
\ No newline at end of file
# Universal Events
- **[Click Event](ts-universal-events-click.md)**
- **[Touch Event](ts-universal-events-touch.md)**
- **[Show/Hide Event](ts-universal-events-show-hide.md)**
- **[Drag/Drop Event](ts-universal-events-drag-drop.md)**
- **[Key Event](ts-universal-events-key.md)**
- **[Focus Event](ts-universal-focus-event.md)**
- **[Mouse Event](ts-universal-mouse-key.md)**
- **[Component Area Change Event](ts-universal-component-area-change-event.md)**
\ No newline at end of file
......@@ -106,15 +106,15 @@
- [Example: Component Creation and Re-Initialization](ui/ts-component-creation-re-initialization.md)
- Syntactic Sugar
- [@Decorator](ts-syntactic-sugar-decorator.md)
- [Chain Call](ts-syntactic-sugar-chaining.md)
- [struct](ts-syntactic-sugar-struct.md)
- [Instantiating a struct Without the new Keyword](ts-instantiating-a-struct-without-new-keyword.md)
- [Using a Separate Line for New Component](ts-using-a-separate-line-for-new-component.md)
- [Restrictions on Using TypeScript for Generators](ts-restrictions-for-generators.md)
- Experiencing the Declarative UI
- [Creating a Declarative UI Project](ui/ui-ts-creating-project.md)
......@@ -279,8 +279,7 @@
- [Event Parameter](reference/arkui-js/js-components-custom-event-parameter.md)
- [slot](reference/arkui-js/js-components-custom-slot.md)
- [Lifecycle Definition](reference/arkui-js/js-components-custom-lifecycle.md)
- Appendix
- [Type Attributes](reference/arkui-js/js-appendix-types.md)
- [Type Attributes](reference/arkui-js/js-appendix-types.md)
- Compent Reference (TypeScript-based Declarative Development Paradigm)
- Components
- Universal Components
......@@ -401,8 +400,7 @@
- [Image Cache](reference/arkui-ts/ts-methods-image-cache.md)
- [Media Query](reference/arkui-ts/ts-methods-media-query.md)
- [List Selection Dialog Box](reference/arkui-ts/ts-methods-action-sheet.md)
- Appendix
- [Built-in Enums](reference/arkui-ts/ts-appendix-enums.md)
- [Built-in Enums](reference/arkui-ts/ts-appendix-enums.md)
- APIs
- Ability Framework
- [FeatureAbility Module](reference/apis/js-apis-featureAbility.md)
......
- [应用开发导读](application-dev-guide.md)
- 快速开始
- 快速入门
- [前言](quick-start/start-overview.md)
- [使用eTS语言开发](quick-start/start-with-ets.md)
- [使用JS语言开发(传统代码方式)](quick-start/start-with-js.md)
- [使用JS语言开发(低代码方式)](quick-start/start-with-js-low-code.md)
- 开发基础知识
- [应用开发包结构说明](quick-start/package-structure.md)
- [资源文件的分类](quick-start/basic-resource-file-categories.md)
......@@ -362,8 +362,7 @@
- [事件参数](reference/arkui-js/js-components-custom-event-parameter.md)
- [slot插槽](reference/arkui-js/js-components-custom-slot.md)
- [生命周期定义](reference/arkui-js/js-components-custom-lifecycle.md)
- 附录
- [类型说明](reference/arkui-js/js-appendix-types.md)
- [类型说明](reference/arkui-js/js-appendix-types.md)
- 组件参考(基于TS扩展的声明式开发范式)
- 组件
- 通用
......@@ -420,24 +419,33 @@
- [DataPanel](reference/arkui-ts/ts-basic-components-datapanel.md)
- [DatePicker](reference/arkui-ts/ts-basic-components-datepicker.md)
- [Divider](reference/arkui-ts/ts-basic-components-divider.md)
- [Gauge](reference/arkui-ts/ts-basic-components-gauge.md)
- [Image](reference/arkui-ts/ts-basic-components-image.md)
- [ImageAnimator](reference/arkui-ts/ts-basic-components-imageanimator.md)
- [LoadingProgress](reference/arkui-ts/ts-basic-components-loadingprogress.md)
- [Marquee](reference/arkui-ts/ts-basic-components-marquee.md)
- [PatternLock](reference/arkui-ts/ts-basic-components-patternlock.md)
- [PluginComponent](reference/arkui-ts/ts-basic-components-pluginComponent.md)
- [Progress](reference/arkui-ts/ts-basic-components-progress.md)
- [QRCode](reference/arkui-ts/ts-basic-components-qrcode.md)
- [Radio](reference/arkui-ts/ts-basic-components-radio.md)
- [Rating](reference/arkui-ts/ts-basic-components-rating.md)
- [RichText](reference/arkui-ts/ts-basic-components-richtext.md)
- [Search](reference/arkui-ts/ts-basic-components-search.md)
- [Select](reference/arkui-ts/ts-basic-components-select.md)
- [Slider](reference/arkui-ts/ts-basic-components-slider.md)
- [Stepper](reference/arkui-ts/ts-basic-components-stepper.md)
- [StepperItem](reference/arkui-ts/ts-basic-components-stepperitem.md)
- [Span](reference/arkui-ts/ts-basic-components-span.md)
- [Text](reference/arkui-ts/ts-basic-components-text.md)
- [TextArea](reference/arkui-ts/ts-basic-components-textarea.md)
- [TextInput](reference/arkui-ts/ts-basic-components-textinput.md)
- [TextPicker](reference/arkui-ts/ts-basic-components-textpicker.md)
- [TextTimer](reference/arkui-ts/ts-basic-components-texttimer.md)
- [TimePicker](reference/arkui-ts/ts-basic-components-timepicker.md)
- [Toggle](reference/arkui-ts/ts-basic-components-toggle.md)
- [TextClock](reference/arkui-ts/ts-basic-components-textclock.md)
- [Web](reference/arkui-ts/ts-basic-components-web.md)
- [Xcomponent](reference/arkui-ts/ts-basic-components-xcomponent.md)
- 容器组件
- [AlphabetIndexer](reference/arkui-ts/ts-container-alphabet-indexer.md)
- [Badge](reference/arkui-ts/ts-container-badge.md)
......@@ -453,6 +461,7 @@
- [Navigator](reference/arkui-ts/ts-container-navigator.md)
- [Navigation](reference/arkui-ts/ts-basic-components-navigation.md)
- [Panel](reference/arkui-ts/ts-container-panel.md)
- [Refresh](reference/arkui-ts/ts-container-refresh.md)
- [Row](reference/arkui-ts/ts-container-row.md)
- [RowSplit](reference/arkui-ts/ts-container-rowsplit.md)
- [Scroll](reference/arkui-ts/ts-container-scroll.md)
......@@ -462,7 +471,6 @@
- [Swiper](reference/arkui-ts/ts-container-swiper.md)
- [Tabs](reference/arkui-ts/ts-container-tabs.md)
- [TabContent](reference/arkui-ts/ts-container-tabcontent.md)
- [Refresh](reference/arkui-ts/ts-container-refresh.md)
- 媒体组件
- [Video](reference/arkui-ts/ts-media-components-video.md)
- 绘制组件
......@@ -501,8 +509,7 @@
- [日期时间选择弹窗](reference/arkui-ts/ts-methods-datepicker-dialog.md)
- [文本选择弹窗](reference/arkui-ts/ts-methods-textpicker-dialog.md)
- [菜单](reference/arkui-ts/ts-methods-menu.md)
- 附录
- [文档中涉及到的内置枚举值](reference/arkui-ts/ts-appendix-enums.md)
- [文档中涉及到的内置枚举值](reference/arkui-ts/ts-appendix-enums.md)
- 接口参考
- Ability框架
- [FeatureAbility模块](reference/apis/js-apis-featureAbility.md)
......
......@@ -2,7 +2,7 @@
- 组件
- 通用
- [通用事件](ts-universal-events-index.md)
- 通用事件
- [点击事件](ts-universal-events-click.md)
- [触摸事件](ts-universal-events-touch.md)
- [挂载卸载事件](ts-universal-events-show-hide.md)
......@@ -11,7 +11,7 @@
- [焦点事件](ts-universal-focus-event.md)
- [鼠标事件](ts-universal-mouse-key.md)
- [组件区域变化事件](ts-universal-component-area-change-event.md)
- [通用属性](ts-universal-attributes-index.md)
- 通用属性
- [尺寸设置](ts-universal-attributes-size.md)
- [位置设置](ts-universal-attributes-location.md)
- [布局约束](ts-universal-attributes-layout-constraints.md)
......
......@@ -22,40 +22,40 @@
TextArea(value?:{placeholder?: string controller?: TextAreaController})
- 参数
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- |
| placeholder | string | 否 | - | 无输入时的提示文本。 |
| controller<sup>8+</sup> | [TextAreaController](#textareacontroller8) | 否 | - | 设置TextArea控制器。 |
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| ----------------------- | ---------------------------------------- | ---- | ---- | -------------- |
| placeholder | string | 否 | - | 无输入时的提示文本。 |
| controller<sup>8+</sup> | [TextAreaController](#textareacontroller8) | 否 | - | 设置TextArea控制器。 |
## 属性
除支持[通用属性](ts-universal-attributes-index.md)外,还支持以下属性:
除支持通用属性外,还支持以下属性:
| 名称 | 参数类型 | 默认值 | 描述 |
| -------- | -------- | -------- | -------- |
| placeholderColor | Color | - | 设置placeholder文本颜色。 |
| placeholderFont | {<br/>size?:&nbsp;number,<br/>weight?:number&nbsp;\|&nbsp;[FontWeight](ts-universal-attributes-text-style.md),<br/>family?:&nbsp;string,<br/>style?:&nbsp;[FontStyle](ts-universal-attributes-text-style.md)<br/>} | - | 设置placeholder文本样式:<br/>-&nbsp;size:&nbsp;设置文本尺寸,Length为number类型时,使用fp单位。<br/>-&nbsp;weight:&nbsp;设置文本的字体粗细,number类型取值[100,&nbsp;900],取值间隔为100,默认为400,取值越大,字体越粗。<br/>-&nbsp;family:&nbsp;设置文本的字体列表。使用多个字体,使用','进行分割,优先级按顺序生效,例如:'Arial,&nbsp;sans-serif'。<br/>-&nbsp;style:&nbsp;设置文本的字体样式。 |
| textAlign | TextAlign | Start | 设置文本水平对齐方式。 |
| caretColor | Color | - | 设置输入框光标颜色。 |
| inputFilter<sup>8+</sup> | {<br/>value:&nbsp;[ResourceStr](../../ui/ts-types.md)<sup>8+</sup>,<br/>error?:&nbsp;(value:&nbsp;string)<br/>} | - | 通过正则表达式设置输入过滤器。满足表达式的输入允许显示,不满足的输入被忽略。仅支持单个字符匹配,不支持字符串匹配。例如:^(?=.\*\d)(?=.\*[a-z])(?=.\*[A-Z]).{8,10}$,不支持过滤8到10位的强密码。<br/>-&nbsp;value:设置正则表达式。<br/>-&nbsp;error:正则匹配失败时,返回被忽略的内容。 |
| 名称 | 参数类型 | 默认值 | 描述 |
| ------------------------ | ---------------------------------------- | ----- | ---------------------------------------- |
| placeholderColor | Color | - | 设置placeholder文本颜色。 |
| placeholderFont | {<br/>size?:&nbsp;number,<br/>weight?:number&nbsp;\|&nbsp;[FontWeight](ts-universal-attributes-text-style.md),<br/>family?:&nbsp;string,<br/>style?:&nbsp;[FontStyle](ts-universal-attributes-text-style.md)<br/>} | - | 设置placeholder文本样式:<br/>-&nbsp;size:&nbsp;设置文本尺寸,Length为number类型时,使用fp单位。<br/>-&nbsp;weight:&nbsp;设置文本的字体粗细,number类型取值[100,&nbsp;900],取值间隔为100,默认为400,取值越大,字体越粗。<br/>-&nbsp;family:&nbsp;设置文本的字体列表。使用多个字体,使用','进行分割,优先级按顺序生效,例如:'Arial,&nbsp;sans-serif'。<br/>-&nbsp;style:&nbsp;设置文本的字体样式。 |
| textAlign | TextAlign | Start | 设置文本水平对齐方式。 |
| caretColor | Color | - | 设置输入框光标颜色。 |
| inputFilter<sup>8+</sup> | {<br/>value:&nbsp;[ResourceStr](../../ui/ts-types.md)<sup>8+</sup>,<br/>error?:&nbsp;(value:&nbsp;string)<br/>} | - | 通过正则表达式设置输入过滤器。满足表达式的输入允许显示,不满足的输入被忽略。仅支持单个字符匹配,不支持字符串匹配。例如:^(?=.\*\d)(?=.\*[a-z])(?=.\*[A-Z]).{8,10}$,不支持过滤8到10位的强密码。<br/>-&nbsp;value:设置正则表达式。<br/>-&nbsp;error:正则匹配失败时,返回被忽略的内容。 |
- TextAlign枚举说明
| 名称 | 描述 |
| -------- | -------- |
| Start | 水平对齐首部。 |
| Center | 水平居中对齐。 |
| End | 水平对齐尾部。 |
| 名称 | 描述 |
| ------ | ------- |
| Start | 水平对齐首部。 |
| Center | 水平居中对齐。 |
| End | 水平对齐尾部。 |
## 事件
| 名称 | 功能描述 |
| -------- | -------- |
| onChange(callback:&nbsp;(value:&nbsp;string)&nbsp;=&gt;&nbsp;void) | 输入发生变化时,触发回调。 |
| onCopy<sup>8+</sup>(callback:(value:&nbsp;string)&nbsp;=&gt;&nbsp;void) | 长按输入框内部区域弹出剪贴板后,点击剪切板复制按钮,触发回调。<br/>value:复制的文本内容。 |
| onCut<sup>8+</sup>(callback:(value:&nbsp;string)&nbsp;=&gt;&nbsp;void) | 长按输入框内部区域弹出剪贴板后,点击剪切板剪切按钮,触发回调。<br/>value:剪切的文本内容。 |
| onPaste<sup>8+</sup>(callback:(value:&nbsp;string)&nbsp;=&gt;&nbsp;void) | 长按输入框内部区域弹出剪贴板后,点击剪切板粘贴按钮,触发回调。<br/>value:粘贴的文本内容。 |
| 名称 | 功能描述 |
| ---------------------------------------- | ---------------------------------------- |
| onChange(callback:&nbsp;(value:&nbsp;string)&nbsp;=&gt;&nbsp;void) | 输入发生变化时,触发回调。 |
| onCopy<sup>8+</sup>(callback:(value:&nbsp;string)&nbsp;=&gt;&nbsp;void) | 长按输入框内部区域弹出剪贴板后,点击剪切板复制按钮,触发回调。<br/>value:复制的文本内容。 |
| onCut<sup>8+</sup>(callback:(value:&nbsp;string)&nbsp;=&gt;&nbsp;void) | 长按输入框内部区域弹出剪贴板后,点击剪切板剪切按钮,触发回调。<br/>value:剪切的文本内容。 |
| onPaste<sup>8+</sup>(callback:(value:&nbsp;string)&nbsp;=&gt;&nbsp;void) | 长按输入框内部区域弹出剪贴板后,点击剪切板粘贴按钮,触发回调。<br/>value:粘贴的文本内容。 |
## TextAreaController<sup>8+</sup>
......@@ -75,9 +75,9 @@ caretPosition(value: number): void
设置输入光标的位置。
- 参数
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- |
| value | number | 是 | - | 从字符串开始到光标所在位置的字符长度。 |
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| ----- | ------ | ---- | ---- | ------------------- |
| value | number | 是 | - | 从字符串开始到光标所在位置的字符长度。 |
## 示例
......
......@@ -22,55 +22,55 @@
TextInput(value?:{placeholder?: string controller?: TextInputController})
- 参数
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- | -------- | -------- | -------- |
| placeholder | string | 否 | - | 无输入时的提示文本。 |
| controller<sup>8+</sup> | [TextInputController](#textinputcontroller8) | 否 | - | 设置TextInput控制器。 |
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| ----------------------- | ---------------------------------------- | ---- | ---- | --------------- |
| placeholder | string | 否 | - | 无输入时的提示文本。 |
| controller<sup>8+</sup> | [TextInputController](#textinputcontroller8) | 否 | - | 设置TextInput控制器。 |
## 属性
除支持[通用属性](ts-universal-attributes-index.md)外,还支持以下属性:
除支持通用属性外,还支持以下属性:
| 名称 | 参数类型 | 默认值 | 描述 |
| -------- | -------- | -------- | -------- |
| type | InputType | InputType.Normal | 设置输入框类型。 |
| placeholderColor | Color | - | 设置placeholder颜色。 |
| placeholderFont | {<br/>size?:&nbsp;Length,<br/>weight?:&nbsp;number\|[FontWeight](ts-universal-attributes-text-style.md),<br/>family?:&nbsp;string,<br/>style?:&nbsp;[FontStyle](ts-universal-attributes-text-style.md)<br/>} | - | 设置placeholder文本样式:<br/>-&nbsp;size:&nbsp;设置文本尺寸,Length为number类型时,使用fp单位。<br/>-&nbsp;weight:&nbsp;设置文本的字体粗细,number类型取值[100,&nbsp;900],取值间隔为100,默认为400,取值越大,字体越粗。<br/>-&nbsp;family:&nbsp;设置文本的字体列表。使用多个字体,使用','进行分割,优先级按顺序生效。例如:'Arial,&nbsp;sans-serif'。<br/>-&nbsp;style:&nbsp;设置文本的字体样式。 |
| enterKeyType | EnterKeyType | EnterKeyType.Done | 设置输入法回车键类型。 |
| caretColor | Color | - | 设置输入框光标颜色。 |
| maxLength | number | - | 设置文本的最大输入字符数。 |
| inputFilter<sup>8+</sup> | {<br/>value:&nbsp;[ResourceStr](../../ui/ts-types.md)<sup>8+</sup>,<br/>error?:&nbsp;(value:&nbsp;string)<br/>} | - | 正则表达式,满足表达式的输入允许显示,不满足正则表达式的输入被忽略。仅支持单个字符匹配,不支持字符串匹配。例如:^(?=.\*\d)(?=.\*[a-z])(?=.\*[A-Z]).{8,10}$,8到10位的强密码不支持过滤。<br/>-&nbsp;value:设置正则表达式。<br/>-&nbsp;error:正则匹配失败时,返回被忽略的内容。 |
| 名称 | 参数类型 | 默认值 | 描述 |
| ------------------------ | ---------------------------------------- | ----------------- | ---------------------------------------- |
| type | InputType | InputType.Normal | 设置输入框类型。 |
| placeholderColor | Color | - | 设置placeholder颜色。 |
| placeholderFont | {<br/>size?:&nbsp;Length,<br/>weight?:&nbsp;number\|[FontWeight](ts-universal-attributes-text-style.md),<br/>family?:&nbsp;string,<br/>style?:&nbsp;[FontStyle](ts-universal-attributes-text-style.md)<br/>} | - | 设置placeholder文本样式:<br/>-&nbsp;size:&nbsp;设置文本尺寸,Length为number类型时,使用fp单位。<br/>-&nbsp;weight:&nbsp;设置文本的字体粗细,number类型取值[100,&nbsp;900],取值间隔为100,默认为400,取值越大,字体越粗。<br/>-&nbsp;family:&nbsp;设置文本的字体列表。使用多个字体,使用','进行分割,优先级按顺序生效。例如:'Arial,&nbsp;sans-serif'。<br/>-&nbsp;style:&nbsp;设置文本的字体样式。 |
| enterKeyType | EnterKeyType | EnterKeyType.Done | 设置输入法回车键类型。 |
| caretColor | Color | - | 设置输入框光标颜色。 |
| maxLength | number | - | 设置文本的最大输入字符数。 |
| inputFilter<sup>8+</sup> | {<br/>value:&nbsp;[ResourceStr](../../ui/ts-types.md)<sup>8+</sup>,<br/>error?:&nbsp;(value:&nbsp;string)<br/>} | - | 正则表达式,满足表达式的输入允许显示,不满足正则表达式的输入被忽略。仅支持单个字符匹配,不支持字符串匹配。例如:^(?=.\*\d)(?=.\*[a-z])(?=.\*[A-Z]).{8,10}$,8到10位的强密码不支持过滤。<br/>-&nbsp;value:设置正则表达式。<br/>-&nbsp;error:正则匹配失败时,返回被忽略的内容。 |
- EnterKeyType枚举说明
| 名称 | 描述 |
| -------- | -------- |
| EnterKeyType.Go | 显示Go文本。 |
| EnterKeyType.Search | 显示为搜索样式。 |
| EnterKeyType.Send | 显示为发送样式。 |
| EnterKeyType.Next | 显示为下一个样式。 |
| EnterKeyType.Done | 标准样式。 |
| 名称 | 描述 |
| ------------------- | --------- |
| EnterKeyType.Go | 显示Go文本。 |
| EnterKeyType.Search | 显示为搜索样式。 |
| EnterKeyType.Send | 显示为发送样式。 |
| EnterKeyType.Next | 显示为下一个样式。 |
| EnterKeyType.Done | 标准样式。 |
- InputType枚举说明
| 名称 | 描述 |
| -------- | -------- |
| InputType.Normal | 基本输入模式。 |
| InputType.Password | 密码输入模式。 |
| InputType.Email | e-mail地址输入模式。 |
| InputType.Number | 纯数字输入模式。 |
| 名称 | 描述 |
| ------------------ | ------------- |
| InputType.Normal | 基本输入模式。 |
| InputType.Password | 密码输入模式。 |
| InputType.Email | e-mail地址输入模式。 |
| InputType.Number | 纯数字输入模式。 |
## 事件
| 名称 | 功能描述 |
| -------- | -------- |
| onChange(value:&nbsp;string)&nbsp;=&gt;&nbsp;void | 输入发生变化时,触发回调。 |
| onSubmit(callback:&nbsp;(enterKey:&nbsp;EnterKeyType)&nbsp;=&gt;&nbsp;void) | 回车键或者软键盘回车键触发该回调,参数为当前软键盘回车键类型。 |
| onEditChanged(callback:&nbsp;(isEditing:&nbsp;boolean)&nbsp;=&gt;&nbsp;void)<sup>(deprecated) </sup> | 输入状态变化时,触发回调。 |
| onEditChange(callback:&nbsp;(isEditing:&nbsp;boolean)&nbsp;=&gt;&nbsp;void) <sup>8+</sup>| 输入状态变化时,触发回调。 |
| onCopy<sup>8+</sup>(callback:(value:&nbsp;string)&nbsp;=&gt;&nbsp;void) | 长按输入框内部区域弹出剪贴板后,点击剪切板复制按钮,触发回调。<br/>value:复制的文本内容。 |
| onCut<sup>8+</sup>(callback:(value:&nbsp;string)&nbsp;=&gt;&nbsp;void) | 长按输入框内部区域弹出剪贴板后,点击剪切板剪切按钮,触发回调。<br/>value:剪切的文本内容。 |
| onPaste<sup>8+</sup>(callback:(value:&nbsp;string)&nbsp;=&gt;&nbsp;void) | 长按输入框内部区域弹出剪贴板后,点击剪切板粘贴按钮,触发回调。<br/>value:粘贴的文本内容。 |
| 名称 | 功能描述 |
| ---------------------------------------- | ---------------------------------------- |
| onChange(value:&nbsp;string)&nbsp;=&gt;&nbsp;void | 输入发生变化时,触发回调。 |
| onSubmit(callback:&nbsp;(enterKey:&nbsp;EnterKeyType)&nbsp;=&gt;&nbsp;void) | 回车键或者软键盘回车键触发该回调,参数为当前软键盘回车键类型。 |
| onEditChanged(callback:&nbsp;(isEditing:&nbsp;boolean)&nbsp;=&gt;&nbsp;void)<sup>(deprecated) </sup> | 输入状态变化时,触发回调。 |
| onEditChange(callback:&nbsp;(isEditing:&nbsp;boolean)&nbsp;=&gt;&nbsp;void) <sup>8+</sup> | 输入状态变化时,触发回调。 |
| onCopy<sup>8+</sup>(callback:(value:&nbsp;string)&nbsp;=&gt;&nbsp;void) | 长按输入框内部区域弹出剪贴板后,点击剪切板复制按钮,触发回调。<br/>value:复制的文本内容。 |
| onCut<sup>8+</sup>(callback:(value:&nbsp;string)&nbsp;=&gt;&nbsp;void) | 长按输入框内部区域弹出剪贴板后,点击剪切板剪切按钮,触发回调。<br/>value:剪切的文本内容。 |
| onPaste<sup>8+</sup>(callback:(value:&nbsp;string)&nbsp;=&gt;&nbsp;void) | 长按输入框内部区域弹出剪贴板后,点击剪切板粘贴按钮,触发回调。<br/>value:粘贴的文本内容。 |
### TextInputController<sup>8+</sup>
......@@ -87,9 +87,9 @@ caretPosition(value:&nbsp;number): void
设置光标移动到指定位置。
- 参数
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| -------- | -------- |-------- |-------- |-------- |
| value | number |是 | - |设置输入光标的位置。<br/>value:从字符串开始到光标所在位置的字符长度。 |
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| ----- | ------ | ---- | ---- | ---------------------------------------- |
| value | number | 是 | - | 设置输入光标的位置。<br/>value:从字符串开始到光标所在位置的字符长度。 |
## 示例
......
......@@ -18,21 +18,21 @@ Canvas(context: CanvasRenderingContext2D)
- 参数
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| ------- | ---------------------------------------------------------- | ---- | ------ | -------------------------------- |
| context | [CanvasRenderingContext2D](ts-canvasrenderingcontext2d.md) | 是 | - | 见CanvasRenderingContext2D对象。 |
| 参数名 | 参数类型 | 必填 | 默认值 | 参数描述 |
| ------- | ---------------------------------------- | ---- | ---- | ---------------------------- |
| context | [CanvasRenderingContext2D](ts-canvasrenderingcontext2d.md) | 是 | - | 见CanvasRenderingContext2D对象。 |
## 属性
支持[通用属性](ts-universal-attributes-index.md)
支持通用属性
## 事件
除支持[通用事件](ts-universal-events-index.md)外,还支持如下事件:
除支持通用事件外,还支持如下事件:
| 名称 | 参数 | 描述 |
| ----------------------------- | ---- | ---------------------------------------- |
| onReady(callback: () => void) | 无 | 画布组件的事件回调,可以在此时进行绘制。 |
| 名称 | 参数 | 描述 |
| ----------------------------- | ---- | -------------------- |
| onReady(callback: () => void) | 无 | 画布组件的事件回调,可以在此时进行绘制。 |
## 示例
......
# 通用属性
- **[尺寸设置](ts-universal-attributes-size.md)**
- **[位置设置](ts-universal-attributes-location.md)**
- **[布局约束](ts-universal-attributes-layout-constraints.md)**
- **[Flex布局](ts-universal-attributes-flex-layout.md)**
- **[边框设置](ts-universal-attributes-border.md)**
- **[背景设置](ts-universal-attributes-background.md)**
- **[透明度设置](ts-universal-attributes-opacity.md)**
- **[显隐控制](ts-universal-attributes-visibility.md)**
- **[禁用控制](ts-universal-attributes-enable.md)**
- **[浮层](ts-universal-attributes-overlay.md)**
- **[Z序控制](ts-universal-attributes-z-order.md)**
- **[图形变换](ts-universal-attributes-transformation.md)**
- **[图像效果](ts-universal-attributes-image-effect.md)**
- **[形状裁剪](ts-universal-attributes-sharp-clipping.md)**
- **[文本样式设置](ts-universal-attributes-text-style.md)**
- **[栅格设置](ts-universal-attributes-grid.md)**
- **[颜色渐变](ts-universal-attributes-gradient-color.md)**
- **[Popup控制](ts-universal-attributes-popup.md)**
- **[Menu控制](ts-universal-attributes-menu.md)**
- **[点击控制](ts-universal-attributes-click.md)**
- **[焦点控制](ts-universal-attributes-focus.md)**
- **[悬浮态效果](ts-universal-attributes-hover-effect.md)**
- **[组件标识](ts-universal-attributes-component-id.md)**
- **[触摸热区设置](ts-universal-attributes-touch-target.md)**
- **[多态样式](ts-universal-attributes-polymorphic-style.md)**
\ No newline at end of file
# 通用事件
- **[点击事件](ts-universal-events-click.md)**
- **[触摸事件](ts-universal-events-touch.md)**
- **[挂载卸载事件](ts-universal-events-show-hide.md)**
- **[拖拽事件](ts-universal-events-drag-drop.md)**
- **[按键事件](ts-universal-events-key.md)**
- **[焦点事件](ts-universal-focus-event.md)**
- **[鼠标事件](ts-universal-mouse-key.md)**
- **[组件区域变化事件](ts-universal-component-area-change-event.md)**
......@@ -2,7 +2,7 @@
@Styles装饰器将新的属性函数添加到基本组件上,如Text、Column、Button等。当前@Styles仅支持[通用属性](../reference/arkui-ts/ts-universal-attributes-index.md)。通过@Styles装饰器可以快速定义并复用组件的自定义样式。
@Styles装饰器将新的属性函数添加到基本组件上,如Text、Column、Button等。当前@Styles仅支持通用属性。通过@Styles装饰器可以快速定义并复用组件的自定义样式。
@Styles可以定义在组件内或组件外,在组件外定义时需带上function关键字,组件内定义时不需要。
......
......@@ -2,17 +2,17 @@
- [应用开发导读](application-dev-guide.md)
- 快速开始
- 快速入门
- [前言](quick-start/start-overview.md)
- [使用eTS语言开发](quick-start/start-with-ets.md)
- [使用JS语言开发(传统代码方式)](quick-start/start-with-js.md)
- [使用JS语言开发(低代码方式)](quick-start/start-with-js-low-code.md)
- 开发基础知识
- [应用开发包结构说明](quick-start/package-structure.md)
- [资源文件的分类](quick-start/basic-resource-file-categories.md)
- 开发
- Ability开发
- [Ability框架概述](ability/ability-brief.md)
......@@ -270,14 +270,14 @@
- [国际化开发概述](internationalization/international-overview.md)
- [Intl开发指导](internationalization/intl-guidelines.md)
- [I18n开发指导](internationalization/i18n-guidelines.md)
- 工具
- [DevEco Studio(OpenHarmony)使用指南](quick-start/deveco-studio-user-guide-for-openharmony.md)
- 示例教程
- [示例代码](https://gitee.com/openharmony/app_samples/blob/master/README_zh.md)
- [Codelabs](https://gitee.com/openharmony/codelabs/blob/master/README.md)
- API参考
- 组件参考(基于JS扩展的类Web开发范式)
- 组件
......@@ -378,8 +378,7 @@
- [事件参数](reference/arkui-js/js-components-custom-event-parameter.md)
- [slot插槽](reference/arkui-js/js-components-custom-slot.md)
- [生命周期定义](reference/arkui-js/js-components-custom-lifecycle.md)
- 附录
- [类型说明](reference/arkui-js/js-appendix-types.md)
- [类型说明](reference/arkui-js/js-appendix-types.md)
- 组件参考(基于TS扩展的声明式开发范式)
- 组件
- 通用
......@@ -451,6 +450,8 @@
- [Search](reference/arkui-ts/ts-basic-components-search.md)
- [Select](reference/arkui-ts/ts-basic-components-select.md)
- [Slider](reference/arkui-ts/ts-basic-components-slider.md)
- [Stepper](reference/arkui-ts/ts-basic-components-stepper.md)
- [StepperItem](reference/arkui-ts/ts-basic-components-stepperitem.md)
- [Span](reference/arkui-ts/ts-basic-components-span.md)
- [Text](reference/arkui-ts/ts-basic-components-text.md)
- [TextArea](reference/arkui-ts/ts-basic-components-textarea.md)
......@@ -484,8 +485,6 @@
- [ScrollBar](reference/arkui-ts/ts-basic-components-scrollbar.md)
- [SideBarContainer](reference/arkui-ts/ts-container-sidebarcontainer.md)
- [Stack](reference/arkui-ts/ts-container-stack.md)
- [Stepper](reference/arkui-ts/ts-basic-components-stepper.md)
- [StepperItem](reference/arkui-ts/ts-basic-components-stepperitem.md)
- [Swiper](reference/arkui-ts/ts-container-swiper.md)
- [Tabs](reference/arkui-ts/ts-container-tabs.md)
- [TabContent](reference/arkui-ts/ts-container-tabcontent.md)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册