sliderView海报滑动轮播
sliderView为容器型元素,与container非常类似,其包含私有styleBinding元素如下:
属性 | 值 | 说明 |
isPointHide | false | 是否隐藏轮播的圆点提示符,默认都显示 |
borderColor | 无 | 边框颜色 |
borderWidth | 无 | 边框的宽度 |
实例:
<ui> <view> <container> <editProperty> <dataDefines> <dataDefine name="banner_array" type="jsonArray" propertyName="图片数组" min="1" max="3"> <param name="mk_image" type="image" propertyName="图片"/> <param name="mk_url" type="url" propertyName="淘宝链接" validateType="taokeurl||wirelessurl" /> </dataDefine> </dataDefines> </editProperty> <subViews> <sliderView> <foreach start="0" step="1" > <array value="$banner_array"/> <template> <image url="$banner_array.[?].mk_image"> <styleBinding> <attribute name="height" value="304"/> <attribute name="width" value="608"/> </styleBinding> <events> <event type="click"> <actions> <userTrack utType="Image" utName="image"> <utParams> <params> <param name="wp_app" value="weapp" /> <param name="wp_pk" value="$wp_pk" /> <param name="wp_m" value="MODULE_KEY_PLACE_HOLDER" /> </params> </utParams> </userTrack> <openURL url="$banner_array.[?].mk_url"> <params> <param name="wp_app" value="weapp" /> <param name="wp_pk" value="$wp_pk" /> <param name="wp_m" value="MODULE_KEY_PLACE_HOLDER" /> </params> </openURL> </actions> </event> </events> </image> </template> </foreach> <!-- sliderView --> <styleBinding> <attribute name="height" value="360"/> <attribute name="width" value="640"/> <attribute name="paddingLeft" value="16"/> <attribute name="paddingRight" value="16"/> <attribute name="paddingTop" value="16"/> <attribute name="paddingBottom" value="16"/> <attribute name="borderColor" value="#dddddd"/> <attribute name="backgroundColor" value="#FFFFFF"/> <attribute name="borderWidth" value="1"/> <attribute name="isPointHide" value="false"/> </styleBinding> </sliderView> </subViews> </container> </view> </ui>
2024还活着,挺好的,向着星辰与深渊,加油,博客园不要倒下啊!