Authored by hongweigao

默认选中第一个库存不为0的颜色,尺码

... ... @@ -28,10 +28,16 @@
<div class="chose-done">您已选择:
<span class="pkg-color">
{{#each colors}}
{{#if focus}}{{name}}{{/if}}
{{#if focus}}"{{name}}"{{/if}}
{{/each}}
</span>
<span class="pkg-size"></span>
<span class="pkg-size">
{{#each colors}}
{{#each size}}
{{#if focus}}"{{name}}码"{{/if}}
{{/each}}
{{/each}}
</span>
</div>
</div>
</div>
... ...
{{#each colors}}
<ul class="size{{#unless focus}} hide{{/unless}}">
{{#each size}}
<li {{#unless num}}class="disable"{{/unless}} data-sku="{{sku}}"
<li class="{{#unless num}}disable{{/unless}}{{#if focus}}focus{{/if}}" data-sku="{{sku}}"
data-num="{{num}}" data-name="{{name}}" data-title="{{title}}">{{name}}</li>
{{/each}}
... ...
... ... @@ -2229,6 +2229,7 @@
}
li {
margin-bottom: 5px;
margin-right: 10px;
cursor: pointer;
border: 1px solid #eaeceb;
... ...