first
This commit is contained in:
63
src/components/cellGroup.vue
Normal file
63
src/components/cellGroup.vue
Normal file
@ -0,0 +1,63 @@
|
||||
<template>
|
||||
<van-cell-group>
|
||||
<van-field
|
||||
:value="value"
|
||||
:label="label"
|
||||
:placeholder="placeholder"
|
||||
required
|
||||
@input="$emit('input', $event)"
|
||||
input-align="right"
|
||||
/>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "cellGroup",
|
||||
props:{
|
||||
label:{
|
||||
type:String,
|
||||
default:''
|
||||
},
|
||||
placeholder:{
|
||||
type:String,
|
||||
default: ''
|
||||
},
|
||||
value: [String, Number]
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
name:''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// this.name='我是测试东西'
|
||||
},
|
||||
methods:{
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
::v-deep .van-cell{
|
||||
padding:0 25px 0 0;
|
||||
line-height: 57px;
|
||||
}
|
||||
::v-deep .van-cell--required::before{
|
||||
background-image: url("@/assets/start.png");
|
||||
background-repeat: no-repeat;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 25px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
margin-right: 3px;
|
||||
content:''
|
||||
}
|
||||
::v-deep .van-field__label{
|
||||
color: #323643;
|
||||
margin-left: 20px;
|
||||
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user