<template>
  <view class="eusing-view">
    <view class="fixed-button">
      <ApplyButton
        :type.sync="buttonType"
        icon="dingdan-button.png"
        text="最近查看"
        clickedType="hidden"
        :show.sync="showApplyButton"
        @click="visible = true"
      />
    </view>
    <FiveOrders
      :visible.sync="visible"
      @close="showApplyButton = true"
    ></FiveOrders>
  </view>
</template>
<script>
import ApplyButton from '@/components/parts/applyButton.vue'
import FiveOrders from '@/components/order/fiveOrders.vue'

export default {
  components: {
    ApplyButton,
    FiveOrders,
  },
  props: {
    type: {
      // 按钮宽'collapse': '80rpx', 'expand': '220rpx'
      type: String,
      default: 'expand',
    },
  },
  data() {
    return {
      buttonType: this.type || 'expand', // 申请按钮宽 collapse': '80rpx', 'expand': '220rpx''
      showApplyButton: true,
      visible: false,
    }
  },
}
</script>
<style lang="scss" scoped>
.eusing-view {
  .fixed-button {
    position: fixed;
    right: 10rpx;
    bottom: 64rpx;
  }
}
</style>
