<template>
  <!-- 上传交付物 -->
  <view class="py-2">
    <u-input v-model="content" :type="type" :border="border" :height="height" :auto-height="autoHeight" />
    <view class="flex flex-row-reverse text-xs text-gray-400 mt-2">{{ wordNum }}/140</view>

    <view class="flex justify-between">
      <u-button type="primary" size="mini" class="m-0" @click="submit">提交</u-button>
    </view>
  </view>
</template>

<script>
export default {
  name: 'p-deliver-check',
  data() {
    return {
      content: '',
      type: 'textarea',
      border: true,
      height: 100,
      autoHeight: true,
      wordNum: 0,
    };
  },

  watch: {
    content(val) {
      this.wordNum = val.length;
    },
  },

  methods: {
    // 提交交付物
    async submit() {
      try {
        console.log('检查');
      } catch (error) {
        console.error('p-deliver-check.vue submit error: ', error);
      }
    },
  },
};
</script>

<style></style>
