index.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <!-- 修改客户资料-->
  3. <a-modal class="modify-custom" title="修改客户资料" v-model:visible="visible" @cancel="cancel" width="890px">
  4. <template #footer>
  5. <a-button key="submit" type="primary" :loading="loading" @click="submit">完成</a-button>
  6. </template>
  7. </a-modal>
  8. </template>
  9. <script lang="ts">
  10. import { defineComponent, ref } from 'vue';
  11. import { closeModal } from '@/common/setup/modal/index';
  12. export default defineComponent({
  13. name: 'modify-custom',
  14. components: {},
  15. setup() {
  16. const { visible, cancel } = closeModal('recoverCustomInfo');
  17. const loading = ref<boolean>(false);
  18. function submit() {
  19. loading.value = true;
  20. setTimeout(() => {
  21. loading.value = false;
  22. cancel();
  23. }, 2000);
  24. }
  25. return {
  26. visible,
  27. cancel,
  28. submit,
  29. loading,
  30. };
  31. },
  32. });
  33. </script>
  34. <style lang="less">
  35. .modify-custom {
  36. }</style
  37. >;