<template>
  <v-header title="意见反馈" scroll backgroundColor="#fff">
    <view class="feedback-container flex">

      <view
        v-for="(item,index) in inputData"
        :key="index"
      >
        <v-upload v-model="item.value" v-if="item.component === 'upload'" custom>
          <view class="screen_all center feedback-upload">
            <text class="iconfont iconfont-puls feedback-icon"></text>
          </view>
        </v-upload>
        <view v-else class="feedback-textarea overflow">
          <textarea :placeholder="item.placeholder"
                    :maxlength="item.maxLength || 400"
                    v-model="item.value"
                    class="screen_all"
                    placeholder-class="feedback-textarea-placeholder"
          ></textarea>
        </view>
      </view>

      <view class="flex-all-1"></view>

      <view class="feedback-button-wrap center">
        <view @click="submit" class="feedback-button center">提交</view>
      </view>

    </view>
  </v-header>
</template>

<script>
import vHeader from '@/components/v-header/main.vue';
import vUpload from '@/components/upload/main.vue';
import inputData from './data/input';
import mixins from './mixins';
export default {
  name: "feedback",
  data(){
    return {
      inputData:inputData()
    }
  },
  components:{
    vHeader,
    vUpload
  },
  mixins
}
</script>

<style lang="scss" src="./style.scss">

</style>