Skip to content

Commit

Permalink
[#778][3.0] Window 컴포넌트 모달 스펙 변경
Browse files Browse the repository at this point in the history
################
- 중첩된 window 로직 수정
- 예시 샘플 내 옵션 수정
  • Loading branch information
kimdoeun committed Mar 16, 2021
1 parent 7578a3a commit f29a2ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/views/window/example/Default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
:icon-class="'ev-icon-info2'"
:width="'40%'"
:height="'60%'"
:hide-scroll="true"
>
<template #header>
<div>
Expand Down
11 changes: 7 additions & 4 deletions src/components/window/Window.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
>
<div
v-if="visible"
class="ev-window-wrapper"
:class="[
'ev-window-wrapper',
{ 'hide-scroll-layer': hideScroll },
]"
>
<div
v-if="isModal"
Expand Down Expand Up @@ -166,13 +169,13 @@ export default {
emit('update:visible', false);
};
const changeBodyCls = (isVisibleModal) => {
if (isVisibleModal) {
const changeBodyCls = (isVisible) => {
if (isVisible) {
if (props.hideScroll) {
document.body.classList.add('ev-window-scroll-lock');
}
} else {
const windowCount = root?.getElementsByClassName('ev-window-wrapper')?.length;
const windowCount = root?.getElementsByClassName('hide-scroll-layer')?.length;
if (windowCount === 1) {
document.body.classList.remove('ev-window-scroll-lock');
}
Expand Down

0 comments on commit f29a2ff

Please sign in to comment.