<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>物品信息</title>
<script src="js/rem.js"></script>
<style>
*{
margin: 0;
padding: 0;
list-style: none;
}
.form{
width:100%;
height: 100%;
background: rgb(117, 111, 111);
}
.heavy{
width: 100%;
height: 2.5rem;
background: #fff;
margin-top: 0.5rem;
}
.heavyList{
width: 100%;
display: -webkit-flex;
display: flex;
justify-content: space-between;
}
.heavy p{
font-size: 25px;
color: #ccc;
}
.heavyList li{
font-size: 20px;
}
.heavyList input{
width: 0.5rem;
}
.heavyList input{
width: 0.5rem;height: 0.5rem;
}
.type1{
color: #fff;
font-size: 20px;
}
.type1 div{
padding-left: 0.5rem;
padding-top: 0.2rem;
width: 2rem;
height: 1rem;
}
button{
width: 0.5rem;height: 0.5rem;
}
.type1 div{
/* color: red; */
}
.shaohua1{
font-size: 20px;
color: #fff;
}
.shaohuaKuaidi textarea{
width: 100%;
height: 2rem;
background: #fff;
color: black;
font-size: 20px;
}
</style>
</head>
<body>
<div class="form">
<div class="heavy">
<ul class="heavyList">
<li>重量</li>
<li>
<button @click="num--" :disabled="num<=1">-</button>
<input type="text" v-model="num">KG
<button @click="num++">+</button>
</li>
</ul>
<p>注:重量已快递员承重为准,快递"虚胖"要按照体积收费呦</p>
</div>
<div class="Itemtype">
<p>物品类型</p>
<div class="type1">
<div v-for="i in typeList" @click="i.done=!i.done" :key="i" :style="{'color':i.done?rCd:'#fff'}">{{i.type}}</div>
</div>
</div>
<div class="shaohuaKuaidi">
<textarea v-model="xuanran"></textarea>
<div class="shaohua1">
<div v-for="i in shaohua" @click="xuanran+=i + ' '">{{i}}</div>
</div>
</div>
</div>
</body>
</html>
<script src="js/vue.min.js"></script>
<script>
new Vue({
el:".form",
data:{
num:'',
typeList:[{
type:'文件证照',
done:true
},{
type:'数码产品',
done:false
},{
type:'珠宝首饰',
done:false
},{
type:'美妆日用',
done:false
},{
type:'服装鞋帽',
done:false
},{
type:'特产',
done:false
},{
type:'年货',
done:false
},{
type:'易碎物品',
done:false
},{
type:'其他',
done:false
}],
addTrue:true,
rCd:'red',
shaohua:['带文件封','带防水袋','带纸箱','要爬楼梯','上门联系'],
xuanran:"",
},
methods:{
redCo(val){
this.rCd=val
}
},
watch: {
xuanran(val, oldVal) {
if(val <= 10) {
this.xuanran = oldVal
}
}
}
})
</script>