<template>
	<view class="form-item">
		<view class="title" :style="{width : (width || 'auto')}">{{title}}</view>
		<view class="item">
			<slot></slot>
		</view>
	</view>
</template>

<script setup>
	const props = defineProps(['title', 'width'])
</script>

<style scoped>
	.title {
		display: inline-block;
		margin-right: 20rpx;
		line-height: 60rpx;
	}

	.item {
		flex: 1;
		width: 200rpx;
		display: inline-block;
		vertical-align: top;
	}
</style>