select-color-panel.hbs 2 KB
<div class="goods-choose-box">
    <div class="goods-info" data-skn="{{skn}}">
        <div class="dl choose-color">
            <div class="dd">颜色:</div>
            <div class="color-row">
                {{#each colors}}
                    <div class="dt {{#if active}} active current-color{{/if}} {{#if disable}} disabled{{/if}}"
                         data-pic="{{image2 pic w=100 h=134}}"
                         data-pid="{{pid}}"
                        {{!--data-target="{{proId}}-color-{{@index}}"
                        data-title="{{this.color}}" --}}
                         data-color="{{name}}" data-total="{{total}}"
                         title="{{title}}">
                        <img src="{{src}}"/>
                    </div>
                {{/each}}
            </div>
        </div>
        <div class="dl choose-size">
            <div class="dd">{{skuTitle}}:</div>
            {{#each colors}}
                <div class="size-row {{#unless active}} hide{{/unless}}">
                    <div class="choose-size-detail">
                      {{#each sizes}}
                        <div class="dt {{#if sizeActive}}active{{/if}} {{#unless num}}disabled{{/unless}}"
                             data-sku="{{sku}}"
                             data-num="{{num}}"
                             data-name="{{name}}">{{name}}</div>
                      {{/each}}
                    </div>
                </div>
            {{/each}}
        </div>
        <div class="button-group">
            <button class="button-sure">确定</button>
            <button class="button-cancel">取消</button>
        </div>
    </div>
    <div class="goods-info-bigimg">
        {{# colors}}
            <div class="big-img {{#unless active}} hide{{/unless}}">
                {{#if pic}}
                    <img src="{{image2 pic w=100 h=134}}" />
                {{else}}
                    <img src="{{image2 ../defaultImg w=100 h=134}}" />
                {{/if}}
            </div>
        {{/ colors}}
    </div>
</div>