select-color-panel.hbs 1.98 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="{{image pic 100 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">尺码:</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="{{image pic 100 134}}" />
                {{else}}
                    <img src="{{image ../defaultImg 100 134}}" />
                {{/if}}
            </div>
        {{/ colors}}
    </div>
</div>