mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
style(Sku): fix header height when hide header image
This commit is contained in:
parent
84e09a54bd
commit
ecb6bfccb5
@ -1,4 +1,5 @@
|
|||||||
export const skuData = {
|
export function getSkuData(large_picture_preview = false) {
|
||||||
|
return {
|
||||||
goods_id: '946755',
|
goods_id: '946755',
|
||||||
quota: 15,
|
quota: 15,
|
||||||
quota_used: 0,
|
quota_used: 0,
|
||||||
@ -35,7 +36,7 @@ export const skuData = {
|
|||||||
],
|
],
|
||||||
k_s: 's1',
|
k_s: 's1',
|
||||||
count: 2,
|
count: 2,
|
||||||
large_picture_preview: true,
|
large_picture_preview,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
k: '尺寸',
|
k: '尺寸',
|
||||||
@ -200,6 +201,7 @@ export const skuData = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export const initialSku = {
|
export const initialSku = {
|
||||||
s1: '30349',
|
s1: '30349',
|
||||||
|
@ -83,15 +83,15 @@
|
|||||||
<div class="sku-container">
|
<div class="sku-container">
|
||||||
<van-sku
|
<van-sku
|
||||||
v-model="showLargePicturePreview"
|
v-model="showLargePicturePreview"
|
||||||
:sku="skuData.sku"
|
:sku="skuData2.sku"
|
||||||
:quota="skuData.quota"
|
:quota="skuData2.quota"
|
||||||
:goods="skuData.goods_info"
|
:goods="skuData2.goods_info"
|
||||||
:goods-id="skuData.goods_id"
|
:goods-id="skuData2.goods_id"
|
||||||
:hide-stock="skuData.sku.hide_stock"
|
:hide-stock="skuData2.sku.hide_stock"
|
||||||
:properties="skuData.properties"
|
:properties="skuData2.properties"
|
||||||
:quota-used="skuData.quota_used"
|
:quota-used="skuData2.quota_used"
|
||||||
:message-config="messageConfig"
|
:message-config="messageConfig"
|
||||||
:start-sale-num="skuData.start_sale_num"
|
:start-sale-num="skuData2.start_sale_num"
|
||||||
:show-header-image="false"
|
:show-header-image="false"
|
||||||
:custom-sku-validator="customSkuValidator"
|
:custom-sku-validator="customSkuValidator"
|
||||||
:close-on-click-overlay="closeOnClickOverlay"
|
:close-on-click-overlay="closeOnClickOverlay"
|
||||||
@ -175,7 +175,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { skuData, initialSku } from './data';
|
import { initialSku, getSkuData } from './data';
|
||||||
import { LIMIT_TYPE } from '../constants';
|
import { LIMIT_TYPE } from '../constants';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -203,7 +203,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
this.skuData = skuData;
|
this.skuData = getSkuData();
|
||||||
|
this.skuData2 = getSkuData(true);
|
||||||
this.initialSku = initialSku;
|
this.initialSku = initialSku;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
box-sizing: border-box;
|
||||||
min-height: 96px;
|
min-height: 96px;
|
||||||
padding: @padding-sm 20px @padding-sm @padding-xs;
|
padding: @padding-sm 20px @padding-sm @padding-xs;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -282,6 +283,7 @@
|
|||||||
|
|
||||||
&__content {
|
&__content {
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
|
||||||
&::-webkit-scrollbar {
|
&::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { mount } from '../../../test';
|
import { mount } from '../../../test';
|
||||||
import Sku from '..';
|
import Sku from '..';
|
||||||
import { skuData, initialSku } from '../demo/data';
|
import { getSkuData, initialSku } from '../demo/data';
|
||||||
|
|
||||||
|
const skuData = getSkuData();
|
||||||
|
|
||||||
test('resetSelectedSku method', () => {
|
test('resetSelectedSku method', () => {
|
||||||
skuData.sku.messages = [];
|
skuData.sku.messages = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user