<!-- packageE/cube/cube.wxml -->
<view class="component-wrapper {{'component-'+component_id}}" style="background-color: {{datas.preview_color}}">
    <view class="decorate-cube" wx:if="{{datas.preview_color}}" style="width: {{cubeWidth}}px;height: {{datas.picture.icon == '1' ? cubeItemHeight*2 : cubeItemHeight*cubeX}}px;margin: 0px {{datas.margin/2}}px 0px {{datas.margin/2}}px">
        <view wx:if="{{!havePicture}}" style="text-align: center;display: flex;height: 100%;font-size: 16px">
            <view style="flex: 1;align-self: center">暂无设置图片</view>
        </view>
        <block wx:if="{{havePicture}}">
            <view class="cube-selected" catchtap="goimgurl"
                wx:for="{{datas.picture.cudeSelected}}" data-item="{{item}}" data-url="{{item.h5_link}}"
                wx:key="index" wx:for-index="index"
                wx:for-item="item"
                style="background-repeat: no-repeat;background-position: center;background-size: 100% 100%;background-image:  url({{item.value.image ? item.value.image : ''}});width: {{(item.end.y - item.start.y + 1) * cubeItemWidth - datas.margin}}px;height: {{(item.end.x - item.start.x + 1) * cubeItemHeight - datas.margin}}px;top: {{(item.start.x-1) * cubeItemHeight + datas.margin/2}}px;left: {{(item.start.y-1) * cubeItemWidth}}px"></view>
        </block>
    </view>
</view>
