index.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <!-- 删除现货合同--->
  3. <a-modal class="recover-custom"
  4. title="删除现货合同"
  5. v-model:visible="visible"
  6. @cancel="cancel"
  7. width="890px">
  8. <template #footer>
  9. <a-button key="submit"
  10. type="primary"
  11. :loading="loading"
  12. @click="submit">完成</a-button>
  13. </template>
  14. </a-modal>
  15. </template>
  16. <script lang="ts">
  17. import { defineComponent, ref } from 'vue';
  18. import { closeModal } from '@/common/setup/modal/index';
  19. export default defineComponent({
  20. name: 'delete-spot-contract',
  21. components: {},
  22. setup() {
  23. const { visible, cancel } = closeModal('deleteSpotContract');
  24. const loading = ref<boolean>(false);
  25. function submit() {
  26. loading.value = true;
  27. setTimeout(() => {
  28. loading.value = false;
  29. cancel();
  30. }, 2000);
  31. }
  32. return {
  33. visible,
  34. cancel,
  35. submit,
  36. loading,
  37. };
  38. },
  39. });
  40. </script>
  41. <style lang="less">
  42. .recover-custom {
  43. }
  44. </style
  45. >;