<config>
{
    "navigationBarTitleText": "投诉/建议",
}
</config>
<template>
    <div class="container">
        <div class="content">
            <div class="box-bottom">
                <van-field :border="false" label="投诉/建议" readonly> </van-field>
                <van-field
                    :value="content"
                    @input="content = $event.detail"
                    :border="false"
                    rows="1"
                    autosize
                    type="textarea"
                    placeholder="请输入你的投诉信息或建议信息"
                />
                <div class="num">{{ content.length }}/200</div>
            </div>
        </div>

        <div class="btn-list">
            <van-button :disabled="!canSubmit" type="default" @click="submit">提交</van-button>
        </div>
    </div>
</template>
<script>
export default {
    data() {
        return {
            content: ''
        };
    },
    computed: {
        canSubmit() {
            if (this.content) {
                return true;
            } else {
                return false;
            }
        }
    },
    methods: {
        submit() {}
    }
};
</script>
<style lang="scss" scoped>
.container {
    .content {
        width: calc(100vw - 8px);
        height: 150px;
        display: block;
        margin: 20px auto 0 auto;
        // background: #f2f4f5;
        border-radius: 5px;
        .num {
            font-size: 13px;
            color: #aaacad;
            padding-right: 15px;
            line-height: 18px;
            text-align: right;
        }
    }
    .box-bottom {
        /deep/ .van-field__label {
            margin: 10px 0 0 2px;
            font-weight: bold;
            color: #000;
            /deep/ .van-field__body {
                margin-left: 3px !important;
            }
        }
    }
    .btn-list {
        // .bottom();
        position: fixed;
        width: 100%;
        bottom: 0;
        background: #ffffff;
        padding-left: 43px;
        z-index: 999;
        padding-bottom: 40px;
        /deep/.van-button {
            width: 290px;
            height: 48px;
            background: #00ba64;
            border-radius: 12px;
            line-height: 48px;
            text-align: center;
            font-size: 16px;
            font-weight: normal;
            color: #ffffff;
        }
    }
}
</style>
