Skip to content

Commit

Permalink
perf(Popup): remove bodyLockClass after the component instance is unm…
Browse files Browse the repository at this point in the history
…ounted (#1504)
  • Loading branch information
QuentinHsu committed Jul 23, 2024
1 parent 2294eac commit 52f89f9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/popup/popup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</template>

<script lang="ts">
import { computed, watch, defineComponent, h, getCurrentInstance, ref, nextTick } from 'vue';
import { computed, watch, defineComponent, h, getCurrentInstance, ref, nextTick, onUnmounted } from 'vue';
import { CloseIcon } from 'tdesign-icons-vue-next';
import popupProps from './props';
Expand Down Expand Up @@ -150,7 +150,9 @@ export default defineComponent({
value ? lock() : unlock();
},
);
onUnmounted(() => {
unlock();
});
return {
name,
to,
Expand Down

0 comments on commit 52f89f9

Please sign in to comment.