# view ## Instructions 所有的视图组件,包括view、swiper等,本身不显示任何可视化元素。它们的用途都是为了包裹其他真正显示的组件。 视图容器。 它类似于传统html中的div,用于包裹各种元素内容。 ### Syntax - 使用 ``(或 ``,当需要包裹子节点时)。 - 遇到平台差异时,建议使用条件编译(`#ifdef / #endif`)显式处理。 #### Properties | 属性名 | 类型 | 默认值 | 说明 | | --- | --- | --- | --- | | hover-class | String | none | 指定按下去的样式类。当 hover-class="none" 时,没有点击态效果 | | hover-stop-propagation | Boolean | false | 指定是否阻止本节点的祖先节点出现点击态,App、H5、支付宝小程序、百度小程序不支持(支付宝小程序、百度小程序文档中都有此属性,实测未支持)、小红书小程序 | | hover-start-time | Number | 50 | 按住后多久出现点击态,单位毫秒 | | hover-stay-time | Number | 400 | 手指松开后点击态保留时间,单位毫秒 | #### Events See official docs for full events list: `https://doc.dcloud.net.cn/uni-app-x/component/view.html` #### Platform Compatibility See official docs for platform support table: `https://doc.dcloud.net.cn/uni-app-x/component/view.html` ### Examples ### Example (Example 1) ```vue ``` ### Example (Example 2) ```html ``` Reference: [Official Documentation](https://doc.dcloud.net.cn/uni-app-x/component/view.html)