180 行
3.6 KiB
Vue
180 行
3.6 KiB
Vue
<template>
|
|
<view class="sh-paramsr-box">
|
|
<view class="u-flex u-row-between params-box" @tap="showModal = true">
|
|
<view class="u-flex">
|
|
<text class="title">参数</text>
|
|
<view class="tip u-flex">
|
|
<view class="tip-list" v-for="(params, index) of paramsList" v-if="index < 2" :key="params.title">
|
|
<view class="">
|
|
<text>{{ params.title }}:{{ params.content }}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="u-iconfont uicon-arrow-right" style="color: #bfbfbf;font-size: 28rpx;"></view>
|
|
</view>
|
|
<u-popup v-model="showModal" mode="bottom" :closeable="true" close-icon-pos="top-right">
|
|
<view class="paramsr-modal">
|
|
<view class="paramsr-modal-box page_box">
|
|
<view class="modal-head u-flex u-row-center u-col-center"><text class="head-title">商品参数</text>
|
|
</view>
|
|
<view class="modal-content content_box">
|
|
<scroll-view class="goods-size" scroll-y="true" >
|
|
<view class="table-box">
|
|
<view class="t-tr u-flex" v-for="t in paramsList" :key="t.title">
|
|
<view class="t-head u-flex">{{ t.title }}</view>
|
|
<view class="t-detail">{{ t.content }}</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</view>
|
|
<view class="modal-foot u-flex u-row-center u-col-center"><button class=" u-reset-button params-btn"
|
|
@tap="showModal = false">确定</button></view>
|
|
</view>
|
|
</view>
|
|
</u-popup>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
/**
|
|
* 商品参数卡片
|
|
* @property {Array} paramsList - 商品参数列表
|
|
* @property {Boolean} showModal- 显隐
|
|
*/
|
|
export default {
|
|
components: {},
|
|
data() {
|
|
return {
|
|
showModal: false
|
|
};
|
|
},
|
|
props: {
|
|
paramsList: {
|
|
type: Array,
|
|
default: () => []
|
|
}
|
|
},
|
|
computed: {},
|
|
methods: {}
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.goods-size {
|
|
height: 970rpx;
|
|
|
|
.table-box {
|
|
// width: 710rpx;
|
|
margin: auto;
|
|
background: rgba(255, 255, 255, 1);
|
|
border: 1rpx solid rgba(223, 223, 223, 1);
|
|
|
|
.t-tr {
|
|
border-bottom: 1rpx solid rgba(223, 223, 223, 1);
|
|
|
|
&:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.t-head {
|
|
font-size: 26rpx;
|
|
color: #999;
|
|
flex: 2;
|
|
padding: 15rpx 20rpx;
|
|
height: 100%;
|
|
}
|
|
|
|
.t-detail {
|
|
font-size: 26rpx;
|
|
border-left: 1rpx solid rgba(223, 223, 223, 1);
|
|
flex: 2;
|
|
padding: 15rpx 20rpx;
|
|
height: 100%;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.params-box {
|
|
line-height: 82rpx;
|
|
background: #fff;
|
|
padding: 0 20rpx;
|
|
margin: 10rpx 0;
|
|
|
|
.title {
|
|
font-size: 28rpx;
|
|
color: #999;
|
|
margin-right: 20rpx;
|
|
}
|
|
|
|
.tip {
|
|
.tip-list {
|
|
font-size: 28rpx;
|
|
margin-right: 20rpx;
|
|
|
|
.tip-img {
|
|
width: 30rpx;
|
|
height: 30rpx;
|
|
margin-right: 10rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.paramsr-modal-box {
|
|
width: 750rpx;
|
|
height: 100%;
|
|
border-radius: 30rpx 30rpx 0 0;
|
|
background: #fff;
|
|
padding: 30rpx;
|
|
|
|
.params-btn {
|
|
width: 690rpx;
|
|
line-height: 80rpx;
|
|
background: linear-gradient(90deg, rgba(240, 199, 133, 1), rgba(246, 214, 157, 1));
|
|
border-radius: 40rpx;
|
|
font-size: 30rpx;
|
|
color: rgba(#fff, 0.9);
|
|
margin-top: 40rpx;
|
|
}
|
|
|
|
.modal-head {
|
|
margin-bottom: 30rpx;
|
|
position: relative;
|
|
|
|
.head-title {
|
|
font-size: 32rpx;
|
|
font-weight: bold;
|
|
}
|
|
}
|
|
|
|
.modal-content {
|
|
overflow-y: auto;
|
|
|
|
.params-list {
|
|
padding-bottom: 40rpx;
|
|
|
|
.title-tag {
|
|
width: 38rpx;
|
|
height: 38rpx;
|
|
margin-right: 20rpx;
|
|
}
|
|
|
|
.params-title {
|
|
font-size: 28rpx;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.params-detail {
|
|
text-align: left;
|
|
font-size: 26rpx;
|
|
color: #999;
|
|
line-height: 42rpx;
|
|
padding-left: 58rpx;
|
|
margin-top: 20rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style> |