<template>
	<view>
		<view
			style="display: flex; align-items: center; justify-content: space-between; padding: 10px 15px; width: 100%; border-bottom: 1px solid #eee;">
			<view style="display: flex; align-items: center;">
				<uni-icons :type="iconName" size="18"></uni-icons>
				<view style="margin-left: .5em;">{{title}}</view>
			</view>
			<slot>
				<view>
					<u--input :value="value" inputAlign="right" border="none" :disabled="da" :readonly="ro" :placeholder="ph" @input="updateValue" clearable ></u--input>
				</view>
			</slot>
			

		</view>
	</view>
</template>

<script>
	export default {
		props: ['value', 'iconName', 'title', 'ph', 'ro', 'da'], // 接受来自父组件的值
		methods: {
			updateValue(str) {
				this.$emit('input', str); // 向父组件发送更新后的值
			}
		}
	}
</script>

<style>

</style>