<template>
    <view class="item-card">
        <view class="item-card-right">
            <slot name="title"></slot>
            <view class="item-card-input">
                <input class="input" type="text" placeholder="请输入" onInput="onBindInput" :value="value" />
            </view>
        </view>
        <view class="item-card-left-unit">单位：元</view>
    </view>
</template>

<script>
export default {
    data() {
        return {
            value: ''
        };
    },
    mixins: [],
    props: {
        onBindInput: () => {}
    },
    didMount() {},
    didUpdate() {},
    didUnmount() {},
    methods: {
        onBindInputFun(e) {
            this.setData({
                value: e.detail.value
            });
            this.props.onBindInput(e.detail.value);
        }
    },
    created: function () {}
};
</script>
<style>
.item-card {
    border-top: 24rpx solid #f8f8f8;
    padding: 26rpx 32rpx 40rpx 44rpx;
    box-sizing: border-box;
    background-color: #fff;
    max-height: 176rpx;
    display: flex;
    flex-direction: row;
}
.item-card-right {
    flex: 2;
}
.item-card-title {
    color: #484747;
    font-size: 32rpx;
    text-align: left;
    font-family: SourceHanSansSC-medium;
    margin-bottom: 20rpx;
}
.item-card-text {
    color: #aeaeae;
    text-align: left;
    font-family: SourceHanSansSC-regular;
    font-size: 30rpx;
}
.item-card-left-arrow {
    width: 42rpx;
    height: 42rpx;
    align-self: center;
}
.arrow-right {
    width: 100%;
    height: 100%;
}
.item-card-left-unit {
    color: #8a8a8a;
    font-size: 26rpx;
    text-align: left;
    font-family: SourceHanSansSC-regular;
}
.input {
    width: 90%;
    padding: 0;
}
</style>
