说明:左边是正常版本,右边是拍平版本
width: 100px
width: 200rpx
width: 30%
scroll-view 组件
width: 100px
width: 200px
setProperty 设置与 getPropertyValue 获取
view 组件
设置值: {{data.width}}
获取值: {{data.widthActual}}
view
text 组件
设置值: {{data.width}}
获取值: {{data.widthActualText}}
text
image 组件
设置值: {{data.width}}
获取值: {{data.widthActualImage}}
view 组件拍平
设置值: {{data.width}}
获取值: {{data.widthActualFlat}}
view
text 组件拍平
设置值: {{data.width}}
获取值: {{data.widthActualTextFlat}}
text
image 组件拍平
设置值: {{data.width}}
获取值: {{data.widthActualImageFlat}}
第一个枚举值,'' (空字符串) - 空值情况
默认宽高规则 (无宽高会不显示或使用默认值)
空 view - 无宽高,有背景色 (预期不显示)
getPropertyValue: width={{emptyElementValues.emptyViewWidth}}, height={{emptyElementValues.emptyViewHeight}}
空 text - 无文字、无宽高,有背景色
getPropertyValue: width={{emptyElementValues.emptyTextWidth}}, height={{emptyElementValues.emptyTextHeight}}
空 image - 无 src、无宽高,有背景色 (image 有默认宽高)
getPropertyValue: width={{emptyElementValues.emptyImageWidth}}, height={{emptyElementValues.emptyImageHeight}}
空 scroll-view - 无宽高,有背景色
getPropertyValue: width={{emptyElementValues.emptyScrollViewWidth}}, height={{emptyElementValues.emptyScrollViewHeight}}
空 native-view - 无宽高,有背景色
getPropertyValue: width={{emptyElementValues.emptyNativeViewWidth}}, height={{emptyElementValues.emptyNativeViewHeight}}
native-view组件: width: 100px 和 width: 200px
嵌套子元素 v-deep width: 150rpx