c-edit-item.vue
2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<template>
<view class='c-edit-item' v-if="true">
<text v-if='isrequre' style='color:red;font-size: 30rpx;line-height: 100rpx;float:left;'>*</text>
<text :style="isrequre?'' : 'padding-left:14rpx'" class='text_666_30 float_left'>{{label}}</text>
<view v-if='showarrow' style="position: absolute;right: 0rpx;display: flex;height: 100rpx;">
<u-icon name="arrow-right" style="align-self: center;" color="#999999"></u-icon>
</view>
<view class="weui-cell__bd " >
<view class="picker_view" >
<input :disabled="disabled" class="text_black_30 float_right text-single center_vertical" style='text-align:right;max-width:650rpx ;'
placeholder-class="text_999_30 float_right center_vertical" :placeholder="placeholder" :value="selected" @click="click"></input>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'c-edit-item',
props: {
label: {
type: String,
default: ''
},
placeholder: {
type: String,
default: '请选择'
},
selected: {
type: String,
default: ''
},
showarrow: {
type: Boolean,
default: true
},
isrequre: {
type: Boolean,
default: false
},
disabled: {
type: Boolean,
default: false
}
},
data() {
return {
}
},
computed: {
},
methods: {
click(){
this.$emit('click');
}
}
}
</script>
<style lang="scss" scoped>
// @import "../../libs/css/style.components.scss";
.c-edit-item {
width: 100%;
height: 100rpx;
display: flex;
border-bottom: solid 2rpx #F2F2F2;
position: relative;
.weui-cell__bd {
-webkit-box-flex: 1;
-webkit-flex: 1;
flex: 1;
}
.picker_view{
float: right;
text-align: right;
height: 100rpx;
margin-right: 36rpx;
display: flex;
}
.text_black_30 {
font-family: PingFangSC-Regular;
font-size: 30rpx;
color: #333;
line-height: 100rpx;
}
.text_666_30 {
font-family: PingFangSC-Regular;
font-size: 30rpx;
color: #666;
text-align: right;
line-height: 100rpx;
}
.text_999_30 {
font-family: PingFangSC-Regular;
font-size: 30rpx;
color: #999;
line-height: 100rpx;
}
.center_vertical{
display: flex;
height: auto;
align-items: center;
}
}
</style>