<template>
  <div class="ibps-cell-wrapper">
    <van-field
      ref="input"
      :label="label"
      :name="name"
      :size="size"
      :border="border"
      :disabled="disabled"
      :required="required"
      :clearable="clearable"
      :clickable="clickable"
      :is-link="isLink"
      :error="error"
      :error-message="errorMessage"

      :arrow-direction="arrowDirection"
      :label-class="labelClass"
      :label-width="labelWidth"
      :label-align="labelAlign"
      :input-align="inputAlign"
      :error-message-align="errorMessageAlign"
      :autosize="autosize"
      :left-icon="leftIcon"
      :right-icon="rightIcon"
      :icon-prefix="iconPrefix"
      :rules="editable?rules:null"
      readonly
    >
      <template #label>
        {{ label }}<van-icon v-if="desc && descPosition==='lableIcon'" name="warning" class="ibps-dialog-icon" @click="$action.descDialog({ title:label, message:desc })" />
      </template>
    </van-field>
    <approval-history
      :task-id="taskId"
      :inst-id="instId"
      :biz-key="bizKey"
      init
    />
  </div>
</template>
<script>
import FieldMixin from '@/mixins/field'
import ApprovalHistory from './index'

export default {
  name: 'ibps-approval-history',
  components: {
    ApprovalHistory
  },
  mixins: [FieldMixin],
  props: {
    title: String,
    taskId: String,
    instId: String,
    bizKey: String
  }
}
</script>

