<template>
  <div class="common-wrap-elem" style="width: 60%;padding: 20px;">
    <div class="btn-wrap">
      <Button
        type="primary"
        size="small"
        @click="confirmFn">确定
      </Button>
      <Button
        type="primary"
        size="small"
        @click="cancelFn">取消
      </Button>
    </div>
  </div>
</template>

<script>
export default {
  components: {},
  filters: {},
  props: {
    componentData: {
      type: Object,
      default: ()=> {}
    },
  },
  data() {
    return {
      isRequesting: false,
    }
  },
  computed: {
    //没跳转前选中的条数只有一个
    selectedDetailList() {
      return this.$store.state.customize.returnExchangeSelectDetail;
    }
  },
  watch: {},
  created() {},
  mounted() {},
  destroyed() {},
  methods: {
    async tempHandle() {
      if (this.isRequesting) return;
      this.isRequesting = true;
      const param = {
        "amount": "",
      }
      const res = await this.axios({
        url: '/fastapi/creadit_card/simulated_staging',
        method: "post",
        data: param,
      });
      const resData = res.data || {};
      const { code, data, message } = resData;
      if (code == 0) {
        this.isRequesting = false;
      } else {
        this.isRequesting = false;
        this.$store.commit("messageDialog", {
          show: true,
          message: message,
          callback: ()=> {}
        });
      }
    },
    confirmFn() {},
    cancelFn() {},
    //输入框获取焦点
    inputFocus(id) {
      try {
        this.$nextTick(()=> {
          const elem = document.getElementById(id);
          if (elem) elem.focus();
        })
      } catch (error) {
        console.log(`focus-error`, error)
      }
    },
  }
}
</script>

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