<template>
  <form data-vv-scope="form1" v-form name="online-form">
    <table>
      <tbody>
        <tr>
          <th width="10%">开始时间：</th>
          <td>
            <ht-date v-model="data.start" :show-date="true" />
          </td>
          <th>结束时间：</th>
          <td>
            <ht-date v-model="data.end" :show-date="true" :day="3" />
          </td>
        </tr>
        <tr>
          <th>时长：</th>
          <td>
            <ht-input
              v-model="data.duration"
              :date-calc-exp="{
                start: 'data.start',
                end: 'data.end',
                diffType: 'day',
              }"
            />
          </td>
        </tr>
      </tbody>
    </table>
  </form>
</template>

<script>
export default {
  name: 'Datetime',
  data() {
    return {
      data: {
        start: '',
        end: '',
        duration: ''
      }
    }
  },
  methods: {}
}
</script>

<style lang="scss" scoped></style>
