c-edit-item.vue 2.3 KB
<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>