Skip to content

Commit

Permalink
fix: lazy dialog mutation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tsuk1ko committed Jul 31, 2023
1 parent 3fb93af commit 131f42e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/LazyDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import { getWrapper } from '@/mixins/mduiDialog';
import { sleep } from '@/utils/common';
import { ref } from 'vue';
import { mutation } from 'mdui';
defineProps({ component: Object });
const emit = defineEmits(['full-closed']);
Expand All @@ -39,6 +40,7 @@ const open = async (...args) => {
isOpen.value = true;
await sleep();
wrapper.open(...args);
mutation(dialogRef.value.$el);
};
const close = async (...args) => {
Expand Down
2 changes: 2 additions & 0 deletions src/components/material/PresetSettingDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ import DataImg from '@/components/DataImg.vue';
export default defineComponent({
components: { DataImg },
inject: ['parent'],
emits: ['close'],
data: () => ({
overflow: 'hidden',
updateOverflowDebounce: null,
Expand Down Expand Up @@ -246,6 +247,7 @@ export default defineComponent({
handleClosed() {
this.parent().selectedPresetName = '';
this.unbindEvents();
this.$emit('closed');
},
bindEvents() {
window.addEventListener('resize', this.updateOverflowDebounce);
Expand Down

0 comments on commit 131f42e

Please sign in to comment.