index.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <!-- 修改客户资料-->
  3. <a-modal class="modify-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 '@/setup/controlModal/index';
  19. export default defineComponent({
  20. name: 'modify-custom',
  21. components: {},
  22. setup() {
  23. const { visible, cancel } = closeModal('modifyCustomInfo');
  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. .modify-custom {
  43. }
  44. </style>;