<!-- components/diy-myfunction/index.wxml -->
<block wx:if="{{style.styleType == 'one'}}">
    <view style="width:{{style.width}}%;margin:{{style.areaMargin.top*2}}rpx {{style.areaMargin.right*2}}rpx {{style.areaMargin.bottom*2}}rpx {{style.areaMargin.left*2}}rpx;padding:{{style.padding.top*2}}rpx {{style.padding.right*2}}rpx {{style.padding.bottom*2}}rpx {{style.padding.left*2}}rpx;background:{{style.backgroundColor}};">
        <block wx:for="{{list}}" wx:key="index">
            <block wx:if="{{item.switch == true}}" wx:key="index">
                <div class="box" bind:tap="goNovaURL" data-url="{{item.url}}">
                    <div class="box-title">
                        <image wx:if="{{item.showIcon == true}}" src="{{item.backgroundimg}}" class="icon-img" style="width:{{style.iconWidth*2}}rpx;height:{{style.iconHeight*2}}rpx" />
                        <div class="functionname" style="font-size:{{style.fontSize*2}}rpx">
                            {{item.name}}
                        </div>
                    </div>
                    <van-icon name="arrow" />
                </div>
            </block>
        </block>
    </view>
</block>
<block wx:if="{{style.styleType == 'two'}}">
    <div class="myfunction-sudoku" style="width:{{style.width}}%;margin:{{style.areaMargin.top*2}}rpx {{style.areaMargin.right*2}}rpx {{style.areaMargin.bottom*2}}rpx {{style.areaMargin.left*2}}rpx;padding:{{style.padding.top*2}}rpx {{style.padding.right*2}}rpx {{style.padding.bottom*2}}rpx {{style.padding.left*2}}rpx;background:{{style.backgroundColor}};">
        <block wx:for="{{list}}" wx:key="index">
            <div wx:if="{{item.switch == true}}" wx:key="index">
                <div class="sudoku-box" bind:tap="goNovaURL" data-url="">
                    <image class="sudoku-img" src="{{item.backgroundimg}}" style="width:{{style.iconWidth*2}}rpx;height:{{style.iconHeight*2}}rpx" />
                    <div class="sudoku-name" style="font-size:{{style.fontSize*2}}rpx">
                        {{item.name}}
                    </div>
                </div>
            </div>
        </block>
    </div>
</block>