<template>
	<!-- 规格商品 -->
	<view class="specsShop">
		
		<view>此处应有下拉切换 略</view>
		<view>这个页面还没弄完 </view>
		
		<!-- 属性 -->
		<QSCheckbox @changeupdata="changeupdata"  :name="name"  variableName="checkbox" layout="column" title="尺码" v-model="form.checkbox" :itemArray="checkboxlist[0]"></QSCheckbox>
		<!-- 属性end -->
		
		<!-- 属性 -->
		<QSCheckbox @changeupdata="changeupdata"  :name="name"  variableName="checkbox" layout="column" title="颜色" v-model="form.checkbox1" :itemArray="checkboxlist[1]"></QSCheckbox>
		<!-- 属性end -->
		
		<!-- 属性 -->
		<QSCheckbox @changeupdata="changeupdata"  :name="name"  variableName="checkbox" layout="column" title="身高" v-model="form.checkbox2" :itemArray="checkboxlist[2]"></QSCheckbox>
		<!-- 属性end -->
		
		
		<view class="specsShop_list">
			<view class="specsShop_list_item" v-for="(item,index) in 5" :key="index">
				<view class="itemnames">商品名称哦~</view>
				<QSInput :name="name"  titleColor="#000000" variableName="shoptitle" required layout="row" title="库存" v-model="form.shoptitle"></QSInput>
				<QSInput :name="name"  titleColor="#000000" variableName="shoptitle" required layout="row" title="sku" v-model="form.shoptitle"></QSInput>
				<QSPics :name="name"  variableName="pics" title="商品图片" v-model="form.pics"></QSPics>
			</view>
		</view>
		
		
		<view class="submitbtn active">
			提交
		</view>
	
		
	</view>
</template>

<script>
	
	export default {
		data() {
			return {
				name:"shops",
				form:{
					pics: [{name: '测试'}],
					shoptitle:"",
					checkbox:{
						
					},
					checkbox1:{
						
					},
					checkbox2:{
						
					}
				},
				checkboxlist:[
					[
						{
							name: '28',
							value: '28',
							color: '#f5105c'
						},
						{
							name: '29',
							value: '29',
							color: '#f5105c'
						},
						{
							name: '30',
							value: '30',
							color: '#f5105c'
						},
						{
							name: '31',
							value: '31',
							color: '#f5105c'
						},
						{
							name: '32',
							value: '32',
							color: '#f5105c'
						}
					],
					 [
						{
							name: '红色',
							value: 'reg',
							color: '#f5105c'
						},
						{
							name: '蓝色',
							value: 'green',
							color: '#f5105c'
						},
						{
							name: '黄色',
							value: 'yellow',
							color: '#f5105c'
						},
						{
							name: '黑色',
							value: 'heise',
							color: '#f5105c'
						},
						{
							name: '白色',
							value: 'baise',
							color: '#f5105c'
						}
					],
					[
						{
							name: '150',
							value: '150',
							color: '#f5105c'
						},
						{
							name: '155',
							value: '155',
							color: '#f5105c'
						},
						{
							name: '160',
							value: '160',
							color: '#f5105c'
						},
						{
							name: '170',
							value: '170',
							color: '#f5105c'
						},
						{
							name: '180',
							value: '180',
							color: '#f5105c'
						}
					]
				]
			};
		},
		methods:{
			changeupdata(e){
				console.info("数据改变后",e);
			},
			//初始化数据呀
			initdatalist(){
				var arr1 = [1,2,3];
				var arr2 = [4,5,6];
				var arr3 = [7,8,9];
				
				for(let i1 = 0;i1<arr1.length;i1++){
					for(let i2 = 0;i2<arr1.length;i2++){
						for(let i3 = 0;i3<arr1.length;i3++){
							console.info(arr1[i1],arr1[i2],arr1[i3]);
						}
					}
				}
				
				
			},
			inititemdata(){
				
			}
		},
		watch:{
			form(e,c){
				console.info(e,c,"watch");
			}
		}
	}
</script>

<style lang="scss">
	@import  "./specsShop.scss";
</style>
