view
View container Equivalent with the div of web or the view of react-native.
Scan QR code to try:

Property | Type | Default | Description |
| disable-scroll | Boolean | false | Forbid scroll page within region. |
| hover-class | String | Style class to be added upon clicking. | |
| hover-start-time | Number | Start the clicking status after a period of holding, in millisecond. | |
| hover-stay-time | Number | Hold the clicking status after release, in millisecond. | |
| hidden | boolean | false | Hide or not. |
| class | String | Custom style name. | |
| style | String | Inline style. | |
| onTap | EventHandle | Click. | |
| onTouchStart | EventHandle | Start of touch action. | |
| onTouchMove | EventHandle | Move after touch. | |
| onTouchEnd | EventHandle | End of touch action. | |
| onTouchCancel | EventHandle | Touch action interrupted, such as incoming call and pop-up. | |
| onLongTap | EventHandle | Trigger on 500ms-duration pressing. After long-press event, moving does not trigger screen scroll. |
Note: The animation generated with my.createAnimation is realized via transition and triggers only onTransitionEnd, but does not trigger onAnimationStart, onAnimationIteration or onAnimationEnd.
Sample Code
copy
<view class="post">
<!-- hidden -->
<view class="postUser" hidden>
<view class="postUser__name">Jessie</view>
</view>
<!-- hover class -->
<view class="postBody" hover-class="red">
<view class="postBody__content">
Good!
</view>
<view class="postBody__date">
June 1
</view>
</view>
</view>