Commit 8b5fefcd authored by 郭志伟's avatar 郭志伟

fix: 问题修复

parent c7974d2e
...@@ -2,8 +2,8 @@ const TXT_SIZE = 17; ...@@ -2,8 +2,8 @@ const TXT_SIZE = 17;
const TXT_MIN_SIZE = 12; const TXT_MIN_SIZE = 12;
export default { export default {
inserted(el) { inserted(el, binding) {
let txtSize = TXT_SIZE; let txtSize = binding.value || TXT_SIZE;
const containerWidth = el.offsetWidth; const containerWidth = el.offsetWidth;
const txtLength = el.innerText.length * TXT_SIZE; const txtLength = el.innerText.length * TXT_SIZE;
const overTxtWidth = txtLength - containerWidth; const overTxtWidth = txtLength - containerWidth;
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
@dialog-border-radius: @border-radius-lg; @dialog-border-radius: @border-radius-lg;
@dialog-has-title-message-text-color: @text-grey; @dialog-has-title-message-text-color: @text-grey;
@popup-close-icon-color: @gray-3;
@navbar-default-height: @nav-bar-height; @navbar-default-height: @nav-bar-height;
@picker-toolbar-padding: @padding-unit - 2 @padding-md; @picker-toolbar-padding: @padding-unit - 2 @padding-md;
@picker-font-size: 14px; @picker-font-size: 14px;
......
...@@ -14,13 +14,13 @@ ...@@ -14,13 +14,13 @@
@click="item.hasStock && parent.handleSkuSelected(item, index)" @click="item.hasStock && parent.handleSkuSelected(item, index)"
> >
<div v-if="props.showUnit" class="Vl__sku-name unit"> <div v-if="props.showUnit" class="Vl__sku-name unit">
{{ props.threeCol ? item.salePrice : item.skuName }} {{ props.threeCol ? item.price : item.skuName }}
<span></span> <span></span>
</div> </div>
<div v-else v-font-resize class="Vl__sku-name"> <div v-else v-font-resize class="Vl__sku-name">
{{ props.threeCol ? item.salePrice : item.skuName }} {{ props.threeCol ? item.price : item.skuName }}
</div> </div>
<div class="Vl__sku-price">售价{{ item.price }}</div> <div class="Vl__sku-price">售价{{ item.salePrice }}</div>
</div> </div>
</template> </template>
<cr-empty v-else class="Vl__sku-empty" image="commodity" description="暂无商品~" /> <cr-empty v-else class="Vl__sku-empty" image="commodity" description="暂无商品~" />
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
@click="$parent.handleSpuSelected(item)" @click="$parent.handleSpuSelected(item)"
> >
<img :src="item.icon" class="Vl__spu-icon" /> <img :src="item.icon" class="Vl__spu-icon" />
<div class="Vl__spu-name">{{ item.name }}</div> <div v-font-resize="14" class="Vl__spu-name">{{ item.name }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -72,7 +72,6 @@ export default { ...@@ -72,7 +72,6 @@ export default {
} }
} }
}, },
mounted() { mounted() {
this.createScroller(); this.createScroller();
}, },
...@@ -130,8 +129,8 @@ export default { ...@@ -130,8 +129,8 @@ export default {
overflow: hidden; overflow: hidden;
} }
&-icon { &-icon {
width: 40px; width: 48px;
height: 40px; height: 48px;
object-fit: contain; object-fit: contain;
} }
&-placeholder { &-placeholder {
...@@ -179,7 +178,7 @@ export default { ...@@ -179,7 +178,7 @@ export default {
&-name { &-name {
.text-14(); .text-14();
color: @text-grey; color: @text-grey;
padding: 0 @padding-sm; padding: 0 @padding-unit;
margin-top: @padding-xs; margin-top: @padding-xs;
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment