<template name="cm-parameter">
	<!-- 相关参数 -->
	<tui-bottom-popup :radius="true" :show="popupShow" @close="hidePopup">
		<view class="tui-popup-box clearfix">
			<view class="title">商品参数</view>
			<div class="tui-popup-main">
				<scroll-view class="tui-popup-scroll" scroll-y="true">
					<view class="content-tr">
						<view class="content-td">品牌</view>
						<view class="content-th">{{
							product.brandName == null ? '其他' : product.brandName
						}}</view>
					</view>
					<view class="content-tr">
						<view class="content-td">分类</view>
						<view class="content-th">{{
							product.typeName == null ? '暂无' : product.typeName
						}}</view>
					</view>
					<view class="content-tr">
						<view class="content-td">包装规格</view>
						<view class="content-th">{{ skuStext }}</view>
					</view>
					<view class="content-tr">
						<view class="content-td">商品编码</view>
						<view class="content-th">{{ product.productCode }}</view>
					</view>
					<view
						class="content-tr"
						v-if="product.parametersList.length > 0"
						v-for="(item, index) in product.parametersList"
						:key="index"
					>
						<view class="content-td">{{ item.paramsName }}</view>
						<view class="content-th">{{ item.paramsContent }}</view>
					</view>
				</scroll-view>
			</div>
			<view
				class="tui-right-flex tui-popup-btn"
				:style="{ paddingBottom: isIphoneX ? '68rpx' : '34rpx' }"
			>
				<view class="tui-flex-1"> <view class="tui-button" @click="hidePopup">收起</view> </view>
			</view>
		</view>
	</tui-bottom-popup>		
</template>

<script>
	export default{
		name:'cm-prams-popup',
		props:{
			product:{
				type:Object,
			},
			popupShow:{
				type:Boolean,
				default:false
			}
		},
		data() {
			return{
				data:[],
				skuStext:''
			}
		},
		created() {
			let newArray = this.product.skus
			this.skuStext = newArray.map(item =>{ return item.unit }).join(',')
		},
		methods:{
			hidePopup(){
				this.$parent.popupShow0 = false
			},
		},
		
	}
</script>

<style lang="scss">
	
</style>





















